Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 205399

2 by 2 table (Class*Sex) using Titanic data from R package "titanic"

$
0
0

I am working on R system data from the R package titanic install.packages("titanic"). The name of the dataset is titanic.

I want to conduct a Chi-square test between Class and Sex. I think before doing Chi-square I need to come up with 2 by 2 table. How can I come up with a 2 by 2 table ? or how can I do Chi-square test considering the data structure.

Expected 2 by 2 table: letter represent number(frequency)

                         Sex
                    Male      Female

Class     1st        a          b
          2nd        c          d
          3rd        e          f
          crew       g          h

Viewing all articles
Browse latest Browse all 205399

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>