Skip to main content
Updated title
Link
bee
  • 3
  • 2

What Types of statistical tests can be run in R Studio onstudio that can be used to analyze a dataset with multiple categorical and 1 numerical variables

edited tags
Link
kjetil b halvorsen
  • 82.8k
  • 32
  • 201
  • 663
Post Migrated Here from stackoverflow.com (revisions)
Source Link
bee
bee

What statistical tests can be run in R Studio on a dataset with multiple categorical and 1 numerical variables

Hi I am new to R programming, and have begun learning the different types of statistical tests that can be run on a dataset.

I am trying to analyze a set of data with both numerical and categorical variables, and determine which statistical tests would be best to run.

I am looking to compare the body length (BL) between two species of birds (sp) for each sex (sex).

I have selected the variables I want and organized into a data frame and calculated the average body length by species and sex and organized it into a data table below.

But am a bit lost on which tests I can use or would be best to use (t-test, chi, fisher, ANOVA, etc.) considering I have 2 categorical variables and not just 1 like a straightforward t-test.

Any advice for a newbie getting started?

bird.df<- select(birdData, BL, sex, sp)
bird.df


bird.dt <- bird.df %>%
   group_by(sp,sex) %>%
   summarize(mean_bl = mean(BL)) %>%
   filter(mean_bl == min(mean_bl) | mean_bl == max(mean_bl))
bird.dt