0
$\begingroup$

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
$\endgroup$
2
  • $\begingroup$ Please make a more descriptive title $\endgroup$ Commented Oct 7, 2022 at 0:57
  • $\begingroup$ What do you want to test? $\endgroup$
    – Dave
    Commented Oct 7, 2022 at 3:59

1 Answer 1

0
$\begingroup$

If your response is body length (BL) and your predictors sex and species (sp), it seems that a two-way ANOVA might be adequate. You need to make some assumptions, like common variance, independence of observations and normality (although ANOVA is fairly robust to lack of normality).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.