I'm getting an error running Bartlett’s test in R. I assume it's the format the data is in. I'm new to R.
I am working with one column from one .csv file, and another column from a second .csv file. The female dataset it about 25% larger than the male one.
I want to run the Bartlett test on the full datasets, not on equal sampled subsets. According to what I've read, this is valid.
I can run a t-test, but I can't figure out how to test the variance.
female <- read.csv("Set1.csv")
male <- read.csv("set2.csv")
female_1 <- subset(female, Region == 1, select = c("Rate"))
male_1 <- subset(male, Region ==1, select = c("Rate"))
bartlett.test(female1,male1)
Error: unexpected ',' in "bartlett.test(female1,male1)"
bt = table(female1,male1)
bartlett.test(female1 ~ male1, bt)
Error in bartlett.test.default(1L, 1L) :
all observations are in the same group
I need to run this on other data that will be in the same basic format, and the differences in sizes between the two files can vary a lot - so I'm looking for a general answer on calculating variances here.
Thanks for any help.