Hi Everyone,
I am trying to set my data as a panel by using xtset command. I have uasid as identifier and year variables. When I use uasid, since it is a string variable my command doesn't work.
I did encode uasid to id to make sure I destring uasid. when I did that, I had the following problem on the attachement. After encoding, uasid and id do not match each other for each observations. How can I solve this problem?
Related Posts with Xtset and string variables
Standard Deviation /Volatility of Sales Growth Dear all I need to take the standard deviation of every realization of annual sales growth over the…
Doubly multivariate repeated measure model/Introducing flexibility in within-group error correlationDear Statalisters, I'm using Stata 15.1. I have a dataset with multiple outcomes and three time pe…
Diaplay full labels for labels with longer length in stata outputDear All Is it possible to display in the STATA output full labels . For example consider my datase…
Create factor dummy variables from a long variableHello I have a variable called categories which is weirdly stored in numeric long (it was a string v…
Duration variableGood evening: Below is a sample of data from my data set. The last column, NoBust, is how I want th…
Subscribe to:
Post Comments (Atom)
0 Response to Xtset and string variables
Post a Comment