Hello,
I collected data on BMI and social support at 3 time points (all continuous variables). I also collected race (0/1) and group (0/1).
I want to look at the association between the change in social support and the change in BMI from Time 1 to Time 3 (calculated by subtracting the value at Time 1 from that at Time 3). I was interested in testing the interaction between race and change in social support. I start off with 48 participants and at Time 3, I have data from only 39 participants. I wanted to use -sem- to use the mlmv option to get around the problem of missing data. However, I learned this does not support categorical variables (race and group). So I made the interaction term by multiplying the change in social support by the race variable.
I wanted to further inspect the interaction using -margins-, however, it seems this cannot be done. Thus, I turned to -lincom-. However, because the race variable is not being treated as a categorical variable in my model, it seems this cannot be done either.
Can anyone suggest a way around this? I will repeat this same model for 3 additional types of social interactions.
Here is my code:
sem (BMI_31 <- SS31 Ethnicity XSS BMI_T1 Ver_SocialSupportT1 Interventionorcontrol), method(mlmv) nocapslatent
BMI_31: change in BMI
SS31: change in social support
Ethnicity: race variable
XSS: Ethnicity * SS31
BMI_T1: BMI at time 1
Ver_SocialSupportT1: social support at time 1
Interventionorcontrol: group
Related Posts with SEM and lincom with categorical variables
Frequency for multiple variables in tabular formHi everyone, I am working on a dataset on mortgage lending in USA, Nevada. I have multiple variable…
Odd-ratios & marginal effects in non-linear probability models with firm fixed effectsDear Statalist members, First, I would like to take the occasion to thank the Statalist forum and i…
Creating survival time variableDear All, I try to create a survival time variable. Data were collected between 1997 and 2015 and I…
Intra-Day Data SummationHi, I am working with the following sample of intra-day data: Code: * Example generated by -dataex-…
CAR tesingHello, I would like to test whether the event CAR (cumulative abnormal return) is equal to zero. Is …
Subscribe to:
Post Comments (Atom)
0 Response to SEM and lincom with categorical variables
Post a Comment