Hello,
I keep receiving a message of "unexpected end of file message" when I am running this code. I have tried adding the word "end" and putting "}" at the end, but then I receive an "invalid syntax" message. I am new with STATA so I am probably missing something obvious. Any help would be awesome. Thanks!
Code:
foreach `var' of varlist age sex cbrd breed intact town tsign vax hosp snap vom dia eat drnk pain ttx hr rr tempc temp wi wf bg pcv ts mmc mmm crt pqual psync ment bcs dehyd txtot out cout {
quietly, su `va', d
scalar mean_`var' = r(mean)
scalar sd_`var'= r(sd)
scalar median_`var' = r(p50)
scalar min_`var' = r(min)
scalar max_`var' = r(max)
scalar sample_`var' = r(N)
display "`var'"_column(30)round(mean_`var',0.1)
I keep receiving a message of "unexpected end of file message" when I am running this code. I have tried adding the word "end" and putting "}" at the end, but then I receive an "invalid syntax" message. I am new with STATA so I am probably missing something obvious. Any help would be awesome. Thanks!
Code:
foreach `var' of varlist age sex cbrd breed intact town tsign vax hosp snap vom dia eat drnk pain ttx hr rr tempc temp wi wf bg pcv ts mmc mmm crt pqual psync ment bcs dehyd txtot out cout {
quietly, su `va', d
scalar mean_`var' = r(mean)
scalar sd_`var'= r(sd)
scalar median_`var' = r(p50)
scalar min_`var' = r(min)
scalar max_`var' = r(max)
scalar sample_`var' = r(N)
display "`var'"_column(30)round(mean_`var',0.1)
Comment