Saving Residuals Covariances/Residual... PreviousNext
Mplus Discussion > Categorical Data Modeling >
Message/Author
 Anonymous posted on Saturday, January 28, 2006 - 11:25 pm
Hello,

Is they any way I can save a residual covariance or a residual correlation matrix after conducting a CFA model?

I read the SAVEDATA section of mplus manual but I can't find info I need.

I checked an output file and tried to extract residual values but extracting elements of the residual matrix (either residual covariance or residual correlation) is not easy becasue it is not a nice looking lower diagonal matrix) if observed variables are more than five.

Is there a way that I can specify the column length of the mplus output file?
If I can do that I can use the mplus output file to extract those numbers for myself.

Thank in advance
 Linda K. Muthen posted on Sunday, January 29, 2006 - 9:30 am
We do not save the residual covariance or correlation matrix, and the column length of the output file is fixed. I will add that we save the residual covariance and correlation matrice to our suggestion list.
 Anonymous posted on Monday, January 30, 2006 - 12:52 pm
Thanks for your reply. I am looking forward to seeing a new MPLUS with that feature.

I have one more question about residual matrix.

I have 30 binary variables.
My input file is

TITLE: XXXX MODEL
DATA: FILE is data.dat;
VARIABLE: NAMES ARE u1-u30;
CATEGORICAL ARE u1-u30;
ANALYSIS: ESTIMATOR = WLS;
MODEL: factor by u1-u30*;
factor@1;
OUTPUT: RES;

in the output file, there is "Residuals for Covariances/Correlations/Residual Correlations"

are theres residuals for covariances or residuals for correlation? It seems residuals for covariances but I am not sure. If they are residuals for covariances how can I get residuals for correlation ?

Thank you in advance
 Linda K. Muthen posted on Monday, January 30, 2006 - 1:31 pm
In your case with categorical outcomes and no covariates in the model, they are correlations. With continuous outcomes, they are covariances.
 Anonymous posted on Friday, February 03, 2006 - 6:36 pm
Thank you for the reply

I have one question about the residual correlation. I think that the residual correlation is calculated by (data correlation - model predicted correlation). Am I right?

Is there any significance test for the elements of the residual correlation matrix? How big is big enough for causing concern?

Thank you
 Linda K. Muthen posted on Saturday, February 04, 2006 - 8:42 am
No, we don't provide significance tests for the elements of the residual correlation matrix. You can look at the overall SRMR value which it is recommended be below .05. It may be more informative to look at modification indices.
 Anonymous posted on Sunday, February 05, 2006 - 7:32 am
In your previous reply

"In your case with categorical outcomes and no covariates in the model, they are correlations. With continuous outcomes, they are covariances."

Is there any way let Mplus produce a residual covariance matrix?

Thanks
 Linda K. Muthen posted on Sunday, February 05, 2006 - 5:07 pm
Categorical outcomes do not have variances and covariances. They have correlations. This is because the mean and the variance for categorical outcomes are not independent.
  Anonymous posted on Sunday, February 12, 2006 - 7:51 pm
I have questions to ask

######################################
TITLE: XXXX MODEL
DATA: FILE is data.dat;
VARIABLE: NAMES ARE u1-u30;
CATEGORICAL ARE u1-u30;
ANALYSIS: ESTIMATOR = WLS;
MODEL: factor by u1-u30*;
factor@1;
[u1$1-u30$1];
OUTPUT: RES;
#######################################

Since I use WLS this kind of factor analysis is not full information factor analysis. Is it right?

If I like to conduct full information factor analysis, do I need to use ML instead of WLS or WLSMV ?

As I read the posts that other people asked I realized that the above model is a 2 parameter normal ogive model. If I like to run 2 parameter logistic model I need to use ML instead of WLS or WLSMV.
I learned that there is not much difference 2P logistic model and 2P normal ogive model as long as I include some scaling factor (1.7).

If so, i guess that there won't much difference between full information factor analysis (2PL model with ML) and "partial information" factor analysis (2P normal ogive model with WLS or WLSMV).

Is my understanding correct?

Thanks
 bmuthen posted on Sunday, February 12, 2006 - 8:56 pm
Yes, full info factor analysis means ML, not WLS or WLSMV.

ML uses the 2P logistic. There isn't much difference compared to the normal ogive (which will be available with ML in Mplus version 4).

And, yes, there won't be much different between the WLSMV normal ogive results and the ML 2P results (scaling with 1.7). That was established in early articles such as
Mislevy, R. (1986). Recent developments in the factor analysis of categorical variables. Journal of Educational Statistics, 11, 3-31.
 Anonymous  posted on Sunday, February 12, 2006 - 9:26 pm
Thank you for the reply

I have one further question for residuals when I use MLR instead of WLSMV.

When I used WLSMV as estimator I got lower diagonal residual matrix in my output but I used MLR I have some like this,
########################################
BIVARIATE DISTRIBUTIONS FIT

Variable Variable Estimated Residual (Observed-Estimated)
U1 U2
Category 1 Category 1 0.320 0.000
Category 1 Category 2 0.087 0.001
Category 2 Category 1 0.419 0.000
Category 2 Category 2 0.174 -0.001
U1 U3
Category 1 Category 1 0.136 -0.004
Category 1 Category 2 0.272 0.004
Category 2 Category 1 0.129 0.006
Category 2 Category 2 0.464 -0.007

.....
.....
#########################################

I don't know which values I need to use as residual, for example, between U1 and U2. Why ML estimator didn't provide a similar residual matrix as ones with WLSMV ? I guess it might be related to numerical integration.

Could you provide some advice on this issue?
 Linda K. Muthen posted on Monday, February 13, 2006 - 3:33 pm
Please send your input, data, output, and license number to support@statmodel.com.
 Sara N.  posted on Monday, August 01, 2011 - 9:32 am
Hi
I am runnings a CFA model using the new version of Mplus. The model runs with no error and all of the fit indices indicate good fit except the chi-square statistics. I was trying to figure out why the chi-square statistic is significant and the firs step was to look a the the residual covariance or correlation matrix. However, I realized that my output does not contain the residual covariance or correlation matrix even though I have asked for tech1 and tech4 to be saved. Would you please give me some advise on this issue?
 Linda K. Muthen posted on Monday, August 01, 2011 - 10:52 am
Use the RESIDUAL option of the OUTPUT command.
 Lot Geels posted on Monday, August 15, 2011 - 3:45 am
Dear dr. Muthen,

I have some questions about the model estimated covariances/correlations/residual correlations matrix (obtained with RESIDUAL option).

Am I understanding correctly the elements in this matrix are covariances for pairs of continuous variables and correlations for pairs of categorical variables? In which cases are they residual correlations?

Is it possible to obtain model estimated correlations for all pairs of variables (also where both are continuous)? If not, can I compute them manually using model estimated variances?

Thank you very much in advance.
 Linda K. Muthen posted on Monday, August 15, 2011 - 8:15 am
Covariances are estimated for continuous variables. Correlations are estimated for categorical variables. They are residual correlations or in a conditional model. Yes, you can compute correlations using the model estimated variances.
 Lot Geels posted on Tuesday, August 16, 2011 - 1:01 am
Dear dr. Muthen,

Thanks very much for clearing that up.

I have one additional question; I'm fitting a path model with four exogenous variables, one of which is binary. In the output I get this:

'WARNING: VARIABLE X4 MAY BE DICHOTOMOUS BUT DECLARED AS CONTINUOUS.'

What, if anything, should I do about this? Again, thanks in advance for your answer.
 Linda K. Muthen posted on Tuesday, August 16, 2011 - 7:08 am
Post your MODEL command.
 Nan Zhou posted on Monday, October 01, 2012 - 5:42 pm
Hi Linda,

I am trying to create a partial regression plot with my data set.
My DV U1 is a binary variable. My IV is x1-x4. I would like to create my partial regression plot for x4 on U1. x1 is continuous variable. x2-x4 are all binary variable. When I use Output: residual; message below was shown.
RESIDUAL OUTPUT
RESIDUALS FOR DEPENDENT VARIABLES ARE NOT AVAILABLE FOR MODELS WITH COVARIATES BECAUSE THE RESIDUAL VALUES VARY AS A FUNCTION OF THE COVARIATE VALUES.

Is there any way that I can output the residual of U1 on x1-x3 and x4 on x1-x3?

Thanks,

Nan
 Linda K. Muthen posted on Tuesday, October 02, 2012 - 10:38 am
I'm not sure what the residual of a binary variable would be.
 Nan Zhou posted on Tuesday, October 02, 2012 - 2:26 pm
Hi Linda,
The residual I would like to calculate is Pearson residual, which is the difference between the observed and estimated probabilities divided by the binomial standard deviation of the estimated probability. Can mplus output that from logistics model?
 Bengt O. Muthen posted on Tuesday, October 02, 2012 - 3:51 pm
We don't give those residuals for "un-grouped" data, that is, with covariates.
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: