Hello everyone. I am new to Stata. I need your help for a short question.
I have a dataset, and I hope to write a loop that counts from a value I set, say, 300, to the total number of observation. This is my code:
import excel "data/xyz.xlsx", firstrow case(lower) clear
sca start_obs = 300
foreach i = start_obs/`r(N)'{
display `i'
}
However, I got error message repetatedy "invalid syntax". How may I write the loop to make it work?
I appreciate your help!!
Related Posts with forval with a variable
Propensity score matching and regression following matchingHi I have never used this technique and have been reading about it but I am still confused. Please …
Question about entity fixed effect and time fixed effectHello everyone, my name is Andy, I'm new here. I had a problem while working on my final essay, the …
Industry-level data analysisDear Statalist community, I'm new here, this is my first post and would like to kindly ask you for …
Probit and ordered probit IV post estimationDear all, I will please like to know how we can perform some tests for probit and ordered probit mo…
Robustness Checks for Panel Data Fixed Effects modelI am using the following fixed effects model: Log(CEO Compensationi,t) = b1Firmperformancei,t-1+ b2…
Subscribe to:
Post Comments (Atom)
0 Response to forval with a variable
Post a Comment