Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: create one factor level from two existing


From   "Lane, Scott D" <Scott.D.Lane@uth.tmc.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index