Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Caroline Wilson <wilson_cj@hotmail.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | st: MI of a continuous by categorical interaction term |
Date | Sat, 27 Jul 2013 00:25:41 +0000 |
Hello everyone, I am doing multiple imputation and would like to impute an interaction variable using the "just another variable" approach. My interaction is between an unordered categorical variable and a continuous variable. I am trying to code this as a single variable so it can be included as a response variable in the imputation model. How would this single variable be created? For example, say the categorical variable is marital status (divorced, married, single. etc) and the continuous variable is time. It seems wrong just to multiply marital status (which is coded as 1, 2,3, etc.) by time in Stata to create the new variable. Is there another way to create it? Any help would be much appreciated. Thank you! Caroline * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/