Dear all,
I am using Stata 16, on mac. I must collapse my data to region-by-year level. The problem is that the variable region is a string variable and 14 regions are included under this variable such as, Western Europe, North America, Australia and New Zealand. Under the year variable there are three years: 2015, 2016, and 2017.
I tried using collapse region, by(year), which resulted in the error message
type mismatch
r(109)
I would greatly appreciate it if someone could help me fix my command.
Thank you in advance for your help
Jason Browen
Related Posts with Problem with String Variable in Collapse Command
Using postfile with xtregHi guys, I would like to perform a regression within a loop and store the results in excel. Ideally…
replacing values of newly generated string variable if old string variable contains certain charactersHello, I have a string variable called relationship that describes the relationship between 2 peopl…
Interpolation/Missing Data QuestionHi, very very very beginner user here. I'm trying to linearly interpolate some missing values but am…
Split dataset for cross-validationHi all! I need to split my dataset into 10 folds to do cross-validation "manually" (I know about th…
Web scarping errorHello all, I downloaded the command nba2stata to get data from this website to STATA. However when …
Subscribe to:
Post Comments (Atom)
0 Response to Problem with String Variable in Collapse Command
Post a Comment