

Lognormal distribution for withinpe... 

Message/Author 

Qiwen Zheng posted on Thursday, June 16, 2016  1:40 pm



Hi all, Anyone know how to specify a lognormal distribution instead of the default normal distribution of the withinperson residual? My model is a twopart random intercept model, the data is longitudinal with each person with 8 repeated measures. I want to compare modeldata fit under normal v.s. lognormal distribution for the withinperson residual e_ij. Below is the model for the continuous part: m_ij=a_0i+a_1X1_ij+a_2X2_i+e_ij a_0i=a_0+b_0i where i is person and j is time. My Mplus code: u is a binary dependent variable and m is a continuous dependent variable. Both X1 and X2 are timevarying covariates. VARIABLE: Names are ID u m X1 X2; Missing are all (999) ; usevariables are ID u m X1 X2; cluster = ID; within = X1 X2; categorical=u; ANALYSIS: type = twolevel random; estimator=ml; MODEL: %within% u on X1 X2; m on X1 X2; m*; %between% u with m*; u*; m*; [u$1*];[m*]; Many thanks! 


You can perform the log transformation in the define command and then compare the likelihoods. They are on different scale however  you need to add Sum Log (data) to put the likelihoods on the same scale. It is not possible to explicitly model only the residual using lognormal. Some other possibilities are available through the constraint = command as in user's guide example 5.23. 

Qiwen Zheng posted on Thursday, June 16, 2016  8:03 pm



Thank you Dr. Asparouhov! I now understand that I should do log transformation to the dependent variable. 

Back to top 

