relative.importance {DECIDE} | R Documentation |

Calculates various estimates for measures of educational differentials, the relative importance of primary and secondary effects and corresponding standard errors and confidence intervals.

```
relative.importance(dataset)
```

`dataset` |
A data frame with 4 columns only, in the following order: 1: student's ID, 2: class, 3: transition (0 if not, 1 if yes) and 4: performance score. |

`sample_size` |
Total number of individuals |

`no_classes` |
Number of classes |

`class_size` |
A list of |

`percentage_overall` |
Overall percentage that made the transition |

`percentage_class` |
A list of |

`fifty_point` |
50% point of transition |

`parameters` |
A data frame with the parameters of logistic regression ( |

`transition_prob` |
A data frame with the transition probabilities |

`log_odds` |
A data frame with log odds of transition (diagonal elements: actual log odds for each class, off-diagonal: counterfactual log odds) |

`se_logodds` |
A data frame with the standard errors of the log odds of transition |

`ci_logodds` |
Approximate 95% confidence intervals for the log odds of transition |

`odds` |
Odds of transition |

`log_oddsratios` |
Log odds ratios |

`se_logoddsratios` |
Standard errors for the log odds ratios |

`ci_logoddsratios` |
Approximate 95% confidence intervals for the log odds ratios |

`oddsratios` |
Odds ratios |

`rel_imp_prim1` |
Estimates of the relative importance of primary effects using the first equation for calculating the relative importance |

`rel_imp_prim2` |
Estimates of the relative importance of primary effects using the second equation for calculating the relative importance |

`rel_imp_prim_avg` |
Estimates of the relative importance of primary effects using the the average of the two equations for calculating the relative importance |

`rel_imp_sec1` |
Estimates of the relative importance of secondary effects using the first equation for calculating the relative importance |

`rel_imp_sec2` |
Estimates of the relative importance of secondary effects using the second equation for calculating the relative importance |

`rel_imp_sec_avg` |
Estimates of the relative importance of secondary effects using the the average of the two equations for calculating the relative importance |

`se.ri.1` |
Standard errors of the relative importance estimates given by the first equation |

`ci.ri.1` |
Approximate 95% confidence intervals for the relative importance of secondary effects given by the first equation |

`se.ri.2` |
Standard errors of the relative importance estimates given by the second equation |

`ci.ri.2` |
Approximate 95% confidence intervals for the relative importance of secondary effects given by the second equation |

`se.ri.avg` |
Standard errors of the relative importance estimates given by the average of the two equations |

`ci.ri.avg` |
Approximate 95% confidence intervals for the relative importance of secondary effects given by the average of the two equations |

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 a dataset
set.seed(1)
data <- 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))
# run function
relative.importance(data)
```

[Package *DECIDE* version 1.3 Index]