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
Year and industry fixed effectsHi guys, In my regression model, I need to control for year and industry fixed effects. However, I'…
My fixed effects regression changes if I omit an omitted variableHello all, I run a fixed effects regression in a linear probability model of self rated health and …
creating quarter of birth dummyHow can i create a quarter of birth dummy with a variable expressed as 01jan1999 ? thank you …
Count the number of different values (ignoring missing)Hello everyone, I want to count the number of different values ignoring missing by pid. Code: * E…
Using Constraints with Movestay commandI want to test Lr test for endogenous switching regression equation (I have used movestay of this), …
Subscribe to:
Post Comments (Atom)
0 Response to Reshape long with multiple variables
Post a Comment