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
Oaxaca decompositionHi friends, I am trying to estimate the ethnic pay gap in Sri Lanka and want to use oaxaca decompos…
How to save each Latent Class model (n=3) as predictor to run a regression model?Hi there, I am trying to look at the typologies of food outlets (within 1km from home) and eating be…
Minimum Detectable Effect Using Non-parametric Power Simulations on Existing Data and AssignmentI am interested in calculating the minimum detectable effect (MDE) using non-parametric power simula…
Replacing values in multiple string variableI have string variables asset1-asset25. For each variable, I want to change NA to missing values Th…
How do I make multiple variables in each dataset the same 'type' in order to append datasets and avoid losing data?I have a large number of datasets that contain 30+ of the same variables. I am attempting to append …
Subscribe to:
Post Comments (Atom)
0 Response to Reshape long with multiple variables
Post a Comment