Hello
I am using the loop function for some simple merges of 5 datasets.
I did it before and it worked. now to redo it again I faced with" too many variables defined" error. Does anyone help me?
my syntax is:
forvalues loop=2002/2016{
clear
use "\\...................\F`loop'.dta",
gen local z=`loop'-1
merge 1:1 Id using "\\..................\G`z'.dta"
keep if _merge==3
drop _merge
save "\\...........................\Cohort`z'.dta", replace
}
Related Posts with Too many variables in loop
what is the correct specification of lagged variables using xtpmg ?Hi everyone, I'm using xtpmg to run an ardl model on panel data using the pooled mean group estimato…
FrequencyHi everyone, I want to calculate the cumulative frequency of firms which have different identifiers …
Program to calculate a percentile and rank by percentile and a factorI have a dataset that looks like this, 2 observations per id: id observation birth year diabetes …
Panel dataHi everyone ,I have panel data from BHPS and i want to use descriptive statistics (one table and one…
Question for logistic regression analysisGreetings, If i have an ordinal dependend variable , which is a 5 scale likert skala and i want to …
Subscribe to:
Post Comments (Atom)
0 Response to Too many variables in loop
Post a Comment