0

I'm trying to recreate some SAS output in R. I'm doing ordinal/multinomial regression using the polr and multinom functions from the MASS and nnet packages respectively.

The output I want to recreate in R from SAS is the test of the global null via LRT, Score, and Wald tests, as well as the type 3 analysis of effects, i.e. basically the test of the interaction (all interaction terms tested together) and of the main effects. I tried to use the wald.test function from the aod package but it was giving me errors about L and V not being conformable arrays, though I made sure L was a matrix of the same size as the matrix of coefficients entered into the function for the b = argument.

Lastly, is there a quick way to test the proportional odds assumption in R?

Any help/guidance is appreciated. Thanks!

Some example data:

educ <- runif(21483, min = 0, max = 20)
df <- cbind(gss_cat[, c("marital", "race")], educ)

model <- multinom(marital ~ race*educ, data = df)

Basically what I'm trying to reproduce from SAS are the following command lines:

proc logistic data=in desc;
    class race /param=ref;
    model marital = educ race educ*race /link=glogit;
    output out=predicted predprobs=individual;
run;
Michael
  • 111
  • 9
  • Could you provide some data, and what you have based on SAS and what you are expecting in R? – akash87 Dec 27 '19 at 15:20
  • If you can make a reproducible example you're more likely to get an answer. As posted this doesn't meet the SO guidelines for a question [ask] – Reeza Dec 27 '19 at 15:59
  • yes, i've created some sample data from the gss data set provided in R and showed the sas code i'm trying to replicate. the important parts are just the hypotheses tests for the global test, interaction, and marginal terms. – Michael Dec 27 '19 at 17:19

0 Answers0