Hi, I have a small dataset for the purpose of demonstration below, which is about a table of the disciplinary action probabilities that students from different ethnic groups may face after different levels of disciplinary infractions. What I need now is to run Stata code to test if these predicted probabilities are significantly different from each other.
I am not sure how to write the code, as this table is the result of running an ordinal longitudinal model and obtaining the results using the "margins" command.
race--1(black);2-hispanic;3-White;4-Other
outcome-1 (receiving minor disciplinary);2-(receiving medium disciplinary action);3- (receiving severe disciplinary action)
infraction1-(the predicted probability of receiving minor disciplinary action); infractioninfraction2- (the predicted probability of receiving medium disciplinary action); infraction3- (the predicted probability of receiving severe disciplinary action)
clear
input byte race outcome infraction1 infraction2 infraction3
1 1 0.674 0.698 0.228
2 1 0.690 0.465 0.125
3 1 0.712 0.577 0.290
4 1 0.718 0.547 0.147
1 2 0.284 0.388 0.528
2 2 0.255 0.390 0.367
3 2 0.240 0.329 0.435
4 2 0.235 0.353 0.390
1 3 0.069 0.146 0.353
2 3 0.056 0.148 0.510
3 3 0.050 0.094 0.276
4 3 0.048 0.111 0.417
end
Can someone help me with this problem? Thank you!
I am not sure how to write the code, as this table is the result of running an ordinal longitudinal model and obtaining the results using the "margins" command.
race--1(black);2-hispanic;3-White;4-Other
outcome-1 (receiving minor disciplinary);2-(receiving medium disciplinary action);3- (receiving severe disciplinary action)
infraction1-(the predicted probability of receiving minor disciplinary action); infractioninfraction2- (the predicted probability of receiving medium disciplinary action); infraction3- (the predicted probability of receiving severe disciplinary action)
clear
input byte race outcome infraction1 infraction2 infraction3
1 1 0.674 0.698 0.228
2 1 0.690 0.465 0.125
3 1 0.712 0.577 0.290
4 1 0.718 0.547 0.147
1 2 0.284 0.388 0.528
2 2 0.255 0.390 0.367
3 2 0.240 0.329 0.435
4 2 0.235 0.353 0.390
1 3 0.069 0.146 0.353
2 3 0.056 0.148 0.510
3 3 0.050 0.094 0.276
4 3 0.048 0.111 0.417
end
Can someone help me with this problem? Thank you!
Comment