|
|
Loglikelihood and cell mean coding |
|
Message/Author |
|
Ben Saville posted on Friday, September 08, 2006 - 10:05 am
|
|
|
I have a 2 part question. I am looking at a simple linear regression model, regressing an outcome on a treatment group variable with 4 levels (or classic ANOVA) using MPlus 4.1. 1) I first used reference cell coding, creating 3 dummy variables for treatment group membership and regressing them on the outcome. Although I get similar estimates, why are the loglikelihood and BIC values in MPlus different than what I get in SAS and S-Plus? DATA: File = combo.txt; VARIABLE: NAMES = dataset id ni rj ind1 ind2 ind3 ind4 y x1 x2 x3 x4 x5 x6; USEVARIABLES = ind1-ind3 y; ANALYSIS: type = meanstructure; MODEL: y ON ind1-ind3 ; |
|
Ben Saville posted on Friday, September 08, 2006 - 10:05 am
|
|
|
2) I then tried cell mean coding, where I created 4 dummy variables for treatment group membership. I constrained the overall intercept to be 0 using the [y@0] command (a second attempt uses a model constraint command). I get the following warning: WARNING: THE SAMPLE COVARIANCE OF THE INDEPENDENT VARIABLES IS SINGULAR. PROBLEM INVOLVING VARIABLE IND4. The parameter estimates match up with those in SAS/S-Plus with cell mean coding, but again the loglikelihood and BIC values do not match. Also, for a given constraint method the loglikelihood in Mplus changes between the 2 models (ref. cell coding and cell mean coding), when they should be the same. Am I doing something wrong? DATA: File = combo.txt; VARIABLE: NAMES = dataset id ni rj ind1 ind2 ind3 ind4 y x1 x2 x3 x4 x5 x6; USEVARIABLES = ind1-ind4 y; ANALYSIS: type = meanstructure; MODEL: y ON ind1-ind4 ; [y@0 ] ; ! try again using different constraint ! [y] (int); !MODEL CONSTRAINT: ! int = 0; |
|
|
The model you have specified is handled in Mplus by an approach that expresses the loglikelihood for [y, x] = [y|x]*[x], whereas perhaps the other programs work with [y |x]. Because the marginal part [x] is unrestricted by the model, the estimates will be the same under the two approaches. Also, the fact that Mplus includes [x] explains why changing the x coding will change the likelihood. If you want to consider [y|x], you can obtain that through ANALYSIS: Type=random (or Type=mixture with a 1-class model). |
|
Ben Saville posted on Monday, September 11, 2006 - 9:32 am
|
|
|
Thanks. Should I be concerned about the warning message (singular covariance matrix) when using cell mean coding? |
|
|
No, a singular sample covariance matrix is now handled in Mplus. |
|
Back to top |
|
|