Logistic regression and dummy variables PreviousNext
Mplus Discussion > Categorical Data Modeling >
Message/Author
 Ron McDowell posted on Thursday, May 05, 2011 - 7:53 am
I am fitting a logistic model where the dependent variable is categorical and has say, 5 levels such as 5 countries. If I use dummy variables to identify countries 2-5, I obtain estimates for the threshold for country 1 plus changes in the threshold for each of the remaining 4 countries. Can I fit the same model in a way equivalent to say, the noconstant option in STATA, where instead I get estimates/SE of the 5 country-specific thresholds as part of the output?
 Linda K. Muthen posted on Thursday, May 05, 2011 - 7:57 am
I think what you want is a multinomial logistic regression. You will obtain that if you put the dependent variable on the NOMINAL list.
 Ron McDowell posted on Sunday, May 08, 2011 - 8:25 am
I'm thinking more along the lines of the following example:

each subject is coded one if they are ill, 0 otherwise ('outcome'), with a dummy variable dummyUS=1 if from the US (0 otherwise), and dummyUK if from the UK (0 otherwise).

If I fit the logistic model
outcome ON dummyUK

the threshold will be -the estimated log odds of being from the US, and the coefficient for dummyUK will the change in the estimated log odds of being ill between UK and the US.

Can I fit a model analogous to the STATA commmand:

logit outcome dummyUS dummyUK, noconstant

so that there will be a coefficient for dummyUS (the estimated log odds of being ill in the US), dummyUK (the estimated log odds of being ill in the UK), and with no additional 'threshold' estimated in the model?
 Bengt O. Muthen posted on Sunday, May 08, 2011 - 8:20 pm
You can try

[outcome$1@0];

outcome on dummyUS dummyUK;

I don't know what will happen with those two covariates creating singularity, however.
 Ron McDowell posted on Tuesday, May 10, 2011 - 12:47 am
Thanks. That's what I am looking for.
 R McDowell posted on Friday, July 22, 2016 - 9:20 am
This is a followup to an old thread-yes the above command does create a singularity problem.

Model:

[outcome$1@0];

outcome on dummyUS dummyUK;

*** FATAL ERROR
THE SAMPLE COVARIANCE MATRIX FOR THE INDEPENDENT VARIABLES IN THE MODEL CANNOT BE INVERTED. THIS CAN OCCUR IF A VARIABLE HAS NO VARIATION OR IF TWO VARIABLES ARE PERFECTLY CORRELATED. CHECK YOUR DATA.

Has anyone had any further thoughts on other ways that could get round this in Mplus?
 Linda K. Muthen posted on Friday, July 22, 2016 - 10:05 am
If two independent variables are perfectly correlated, both cannot both be used in the analysis.
 Aurelie Lange posted on Monday, September 09, 2019 - 6:25 am
Dear Dr Muthen,

I encounter the same problem as mentioned in the post above (fatal error: covariance matrix cannot be inverted) when including several dummies. However, none of my dummies are perfectly correlated and I have no other independent variables. Do you know what else could be going wrong, or how I could make sure I can run the model without error?

Thank you for your help!

Sincerely,
Aurelie Lange
 Bengt O. Muthen posted on Monday, September 09, 2019 - 3:51 pm
We need to see your full output - send to Support along with your license number. I assume that with C nominal categories, you have created C-1 dummies.
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: