compare.relimp | R Documentation |
Computes 95% confidence intervals for the differences in log odds of transition, log odds ratios and relative importance estimates between the two datasets. Also calculates chi-squared test statistics and p-values for testing whether the differences are different from zero.
compare.relimp(dataset1, dataset2)
dataset1 |
is the first dataset; a data frame with 4 columns, in the following order: 1: student's ID, 2: class, 3: transition (0 if not, 1 if yes) and 4: performance score. |
dataset2 |
is the second dataset; a data frame with 4 columns, in the following order: 1: student's ID, 2: class, 3: transition (0 if not, 1 if yes) and 4: performance score. |
ci.diff.lo |
95% confidence intervals for differences in log odds of transition |
test.diff.lo |
Test statistic for differences in log odds |
test.diff.lo.pvalue |
p-value for testing for differences in log odds |
ci.diff.lor |
95% confidence intervals for differences in log odds ratios |
test.diff.lo |
Test statistic for differences in log odds ratios |
test.diff.lo.pvalue |
p-value for testing for differences in log odds ratios |
ci.diff.ri.1 |
95% confidence intervals for relative importance estimates - 1 |
ci.diff.ri.2 |
95% confidence intervals for relative importance estimates - 2 |
ci.diff.ri.avg |
95% confidence intervals for relative importance estimates - average |
Christiana Kartsonaki
Kartsonaki, C., Jackson, M. and Cox, D. R. (2013). Primary and secondary effects: Some methodological issues, in Jackson, M. (ed.) Determined to succeed?, Stanford: Stanford University Press.
Erikson, R., Goldthorpe, J. H., Jackson, M., Yaish, M. and Cox, D. R. (2005) On Class Differentials in Educational Attainment. Proceedings of the National Academy of Sciences, 102: 9730–9733
Jackson, M., Erikson, R., Goldthorpe, J. H. and Yaish, M. (2007) Primary and secondary effects in class differentials in educational attainment: The transition to A-level courses in England and Wales. Acta Sociologica, 50 (3): 211–229
# generate two datasets set.seed(1) data1 <- data.frame(seq(1:10), rep(c(1, 2), length.out = 10), c(rep(0, times = 3), rep(1, times = 7)), c(rnorm(4, 0, 1), rnorm(4, 0.5, 1), NA, NA)) data2 <- data.frame(seq(1:10), rep(c(1, 2), length.out = 10), c(rep(0, times = 5), rep(1, times = 5)), c(rnorm(5, 1, 1), rnorm(5, 0.5, 1))) # run function compare.relimp(data1, data2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.