LoslegenKostenlos starten

Chi-square tests output

In chapter 3, you performed a chisq.test() of sex by agecat. In this exercise, you will perform the test again and save the output as cssexage and then display selected elements from the output list object.

The abaloneKeep dataset and dplyr package have been loaded for you.

Diese Übung ist Teil des Kurses

<Kurs>R For SAS Users</Kurs>
Kurs ansehen

Übungsanweisungen

  • Save the table() output of the two-way frequencies of sex by age category for abaloneKeep as tablesexage.
  • Run chisq.test() using tablesexage and save the output as cssexage.
  • Display the expected values and p.value from cssexage output.

Interaktive praktische Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Create frequency table of sex by agecat
tablesexage <- ___ %>% 
  with(___)

# Chi-square test using tablesexage
cssexage <- ___

# Display expected values and p.value from cssexage
___
___
Code bearbeiten und ausführen