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
The spatial lag command does not generate the variableHi all, I am using the HTML Code: spmon command to generate the spatial lag term. However, I am …
Calculating the Smallest Effect Size of Interest and rejecting the presence of a meaningful effectHello, I came across this quite interesting blog article on the topic of the smallest effect size o…
twoway area and unwanted outlineI use twoway area to draw chronograms, and like to suppress the outline of the area, using fill-colo…
update available of smclpres: module for making interactive presentations in StataThanks to Kit Baum a new version of smclpres is now available from SSC. To install type in Stata ssc…
Opening huge data files in STATADear Satalist I am having difficulty opening and working with several huge data files in Stata. The…
Subscribe to:
Post Comments (Atom)
0 Response to SEM and lincom with categorical variables
Post a Comment