Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: RE: create one factor level from two existing

From   "Ben Hoen" <>
To   <>
Subject   st: RE: create one factor level from two existing
Date   Wed, 26 Dec 2012 13:21:36 -0500

I am not sure I understand your question but you might be able to create one
new variable that meets your criteria e.g., plcdose=1 when the when or the
other plc doses = 1.  

Ben Hoen
Office: 845-758-1896
Cell: 718-812-7589

-----Original Message-----
[] On Behalf Of Lane, Scott D
Sent: Wednesday, December 26, 2012 12:37 PM
Subject: st: create one factor level from two existing

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.
SD Lane
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index