Message/Author |
|
|
I have successfully run a conditional model following the UG ex. 9.16. Now I would like to add both continuos and categorical distal outcomes; however, I cannot find any examples for this. I ran a test-run with the following input, including only one continuous distal outcome (SWLSTOT) and I received an output with no alarming warnings. Can you confirm this is the correct way to do this? And how would my input change if I wanted to include categorical distal outcomes? Or, would I have to dichotomize my categorical v.'s for it to work? Thank you! USEVARIABLE = ID day2inpt AGE FIMTOTA EduYears PTA1 SWLSTOT cog day; CLUSTER = ID; WITHIN = DAY; BETWEEN = day2inpt AGE FIMTOTA EduYears PTA1 SWLSTOT; DEFINE: center day2inpt AGE FIMTOTA EduYears PTA1 (grandmean); ANALYSIS: TYPE = TWOLEVEL RANDOM; MODEL: %WITHIN% s | COG ON DAY; %BETWEEN% COG S ON day2inpt AGE FIMTOTA EduYears PTA1; SWLSTOT ON COG S day2inpt AGE FIMTOTA EduYears PTA1; COG WITH S; |
|
|
This input looks fine. A categorical distal is handled the same way, you just put it on the Categorical= list in the Variable command. |
|
|
Thank you for the quick feedback. I had been told that my time-invariant categorical covaraites needed to be dichotomized. Is that true, or could I also have simply used the Categorical = command? |
|
|
Covariates don't need to be dichotomized unless they are nominal in which case you split them up into dummies. You don't use Categorical= for covariates, only for DVs. |
|
Amber Fahey posted on Thursday, April 05, 2018 - 9:41 am
|
|
|
Thank you again. I have one more related question. If I include a predictor/covariate variable that has been split into dummies, should I center those on their granmean, or does that not make sense, e.g., gender (0,1). |
|
|
I would just use 0/1. |
|
|
Thank you, Now that I have added all of them to the model, and specified some of them as categorical. I am getting this error: TYPE=TWOLEVEL requires specification for the CLUSTER option. I can't figure out why I was working before, and now it is not. A sample of my input is: VARIABLE:NAMES ARE ID Empfu Trans SRS SWLST FIMfu DRSPI PARSum day2inpt AGE FIMTOTA TFCDays EduYears Sex Racec Emppre PTA1 olog day; CATEGORICAL = Empfu Trans SRS SWLST CLUSTER = ID; WITHIN = DAY; BETWEEN = Empfu Trans SRS SWLST FIMfu DRSPI PARSum day2inpt AGE FIMTOTA TFCDays EduYears Sex Racec Emppre PTA1; DEFINE: center day2inpt AGE FIMTOTA TFCDays EduYears PTA1 (grandmean); ANALYSIS: TYPE = TWOLEVEL RANDOM; MODEL: %WITHIN% s | OLOG ON DAY; %BETWEEN% OLOG S ON day2inpt AGE FIMTOTA TFCDays EduYears Sex Racec Emppre PTA1; Empfu ON OLOG S day2inpt AGE FIMTOTA TFCDays EduYears Sex Racec Emppre PTA1; Trans ON OLOG S day2inpt AGE FIMTOTA TFCDays EduYears Sex Racec Emppre PTA1; SRS ON OLOG S day2inpt AGE FIMTOTA TFCDays EduYears Sex Racec Emppre PTA1; SWLST ON OLOG S day2inpt AGE FIMTOTA TFCDays EduYears Sex Racec Emppre PTA1; FIMfu ON OLOG S day2inpt AGE FIMTOTA TFCDays EduYears Sex Racec Emppre PTA1; OLOG WITH S; |
|
|
Note that you are missing a semi colon after this statement: CATEGORICAL = Empfu Trans SRS SWLST If this doesn't help, we need to see your full output showing the error - send to Support along with your license number. |
|
Amber Fahey posted on Saturday, April 07, 2018 - 11:03 am
|
|
|
Oh my goodness, I am so sorry for wasting your time with that! I did it get it to run now; however, I am receiving the following error: ERROR in MODEL command Observed variable on the right-hand side of a between-level ON statement must be a BETWEEN variable. Problem with: OLOG Olog is my intercept- This is a little strange because when I ran this model before with just one distal outcome, I did not receive this error at all, and I was able to regress the distal outcome on the intercept of Olog. Am I missing something? Why would I be getting this now and not with a more simple model? And is there some other way to regress my distal outcomes on the intercept? And of course if I then include Olog on the between statement, I receive an error message saying a within variable cannot also be a between variable. Thank you again! |
|
|
Please send the output, your data set, and your license number to support@statmodel.com. |
|
Back to top |