Hi,
I`m fairly new to Stata and I know this question is previously answered however I could not make it work for me.
This is the type of data I`m working with:
id date r i
1 2002_11 1.307071 .87494
1 2002_12 1.403008 1.019082
1 2003_01 1.570926 1.152942
1 2003_02 1.894784 1.307366
1 2003_03 1.798847 1.235295
This is the command i`m using:
reshape wide r i, i(id) j(date) str
This is the error:
values of variable date not unique within id
Your data are currently long. You are performing a reshape wide. You specified i(id) and j(date). There are observations
within i(id) with the same value of j(date). In the long data, variables i() and j() together must uniquely identify the
observations.
What do I need to change or add ?
Thanks for all replies.
Best,
Emerson
Related Posts with Reshaping wide error values of variable date not unique within id
query of correlation and coefficientDear all, I have a question of correlation and my coefficient. I use pwcorr to test the correlation…
Converting from long to wide formatDear all, I'm trying to convert from long to wide format: Code: reshape wide _proc_code _proc_eye…
mvnp ml maxmize plugin not loaded : use the adoonly optionI am currently running the test_mc_mvp3_train_h.do file of Cappellari and Jenkins (2006) , Calculati…
How do I load data in Stata from the internet? I am not able to make -webuse- work...Good morning, I am trying to load from within Stata a file on this website https://www.lisdatacente…
Polygons hidden behind others when creating choropleth map using spmapHi everyone - this is my first ever post on this forum. I've been having a problem using the spmap …
Subscribe to:
Post Comments (Atom)
0 Response to Reshaping wide error values of variable date not unique within id
Post a Comment