Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: create one factor level from two existing
From 
 
"Lane, Scott D" <[email protected]> 
To 
 
"[email protected]" <[email protected]> 
Subject 
 
st: create one factor level from two existing 
Date 
 
Wed, 26 Dec 2012 11:37:17 -0600 
I have a design with 2 placebo (plc) doses (a baseline plc, designated 1, to familiarize/stabilize subjects on a lab task) plus three CNS-active doses and an additional plc dose (designated 2-5 and counterbalanced).  Performance on the 2 placebo doses is highly correlated and I thus wish the combine the 2 placebos into 1 plc factor in the analytic model (e.g., dose with 4 levels).  In the .dat file, the data are in long format with several other DVs and IVs for each subject.  Please advise re: how to use egen (or some other technique) to pull this off?  To date, I have tried:
1. egen rowmeans for each of the 2 plc doses, then attempted, by subject, to average the 2 newly created variables (result = a variable of blank values).
2. reshape to wide format, then use egen rowmeans (result = error message stating that most of the other IVs and DVs cannot be reshaped to wide format).  Thus, I cannot get started without deleting many other variables.
Any suggestions would be most welcome.
Regards,
SD Lane
*
*   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/