I'm currently trying to run (what I believe is) an independent samples t-test to determine whether there are significant differences between scores, however I'm a little new to R and am in the process of trying to figure out the landscape.
Essentially, I have a dataset (a sample for which I've provided in the code below), of regions by year and their respective test scores for which I'm trying to gauge levels of significant differences
data <- read.table(text =
"Province Score Year
370 Alberta 549 2003
333 Alberta 517 2012
371 BC 538 2003
444 BC 522 2012
372 Ontario 530 2003
445 Ontario 514 2012
555 PEI 500 2003
373 PEI 479 2012"
, stringsAsFactors=F, header = T)
So far, I've tried:
pairwise.t.test(data$Score,data$Province, p.adjust="bonferroni")
However I'm not seeing any significant p-values, and I'm getting the feeling I might be overlooking something. I've also tried consulting the literature but have come up short. Just wanted to explore and consult some forums to make sure I'm covering my bases for my specific purposes. For instance, I'd want to know if the mean scores of Alberta were significant from 2003 to 2012, but right now I believe it's giving me a crosstabs of each province compared against other provinces.
Something like:
Saskatchewan 2003
Saskatchewan 2012
p-value = x
Ontario 2003
Ontario 2012
p-value = x
Would be what I'm looking for.
Thanks in advance for any guidance!