Hello,
I have wide-structured data for answers on a 4 item scale at 2 time points. Please see data details below
promis_pc43 is 1 of 4 questions
m1 or m3 indicates the timepoint
Is it possible to reshape this to long data where I have a time variable (1 or 3) and the answer for each question at each time point per study ID?
Thank you!
Contains data
obs: 310
vars: 9
----------------------------------------------------------------------------------------------
storage display value
variable name type format label variable label
----------------------------------------------------------------------------------------------
record_id str8 %9s record_id
promis_pc43_2~1 byte %10.0g promis_pc43_2_m1
promis_pc44_2~1 byte %10.0g promis_pc44_2_m1
promis_pc45_2~1 byte %10.0g promis_pc45_2_m1
promis_pc47_2~1 byte %10.0g promis_pc47_2_m1
promis_pc43_2~3 byte %10.0g promis_pc43_2_m3
promis_pc44_2~3 byte %10.0g promis_pc44_2_m3
promis_pc45_2~3 byte %10.0g promis_pc45_2_m3
promis_pc47_2~3 byte %10.0g promis_pc47_2_m3
----------------------------------------------------------------------------------------------
Related Posts with Reshape long with multiple variables
Why probit works, but multinomial probit doesn't?In short, I estimate 4 probit regressions, examining the effects of a variable X on the probability …
Panel Unit Root Tests and Cointegration - Lag ProblemHello! I am a fresh Stata user and not very excellent on econometrics. My data is consisted of N=8 a…
Comparing coefficients between two ivregress modelsTo Statalist I used -gmm- to test the equality between two variables (b1, c1) in different models r…
operating a code only on the "not distinct" observationsHi everyone, I would like to use an if statement with the unique command, in order to operate a code…
When only one independent variable is non stationary does it make sense to run a cointegration test?Dear Stata users, after checking the stationarity of my panel data regression model: Y = f (X1, X2,…
Subscribe to:
Post Comments (Atom)
0 Response to Reshape long with multiple variables
Post a Comment