Hi everyone,
I am trying to run the following code:
count if productcode == 21
scalar nobs = r(N)
local n nobs
forvalues b = 1(1)`n' {
display `b'
}
However, I get invalid syntax error. Can anyone help me on this issue? Thanks in advance.
Best,
Ulas
Related Posts with Using local variable in forvalues loop
Creating Graphs with Regression OutputI am attempting to determine whether hours worked and wages have changed overtime differently for di…
sdid in case of unbalanced panelI need to run synthetic difference is difference regression. Therefore, I need balanced panel data. …
Calculate age from other occurrences and attribute it to specific observationHi, I'm working with consecutive censuses. I can follow the same individuals through several decade…
Mediation Analysis - Stata sem and medsem commands with fixed effects modelsHello everyone, I am trying to perform a mediation analysis, in which the variables of concern are…
SEM modeling ( path model)Dear ll, I hope you are doing well. I'm working on my paper and i would like to study the mediatin…
Subscribe to:
Post Comments (Atom)
0 Response to Using local variable in forvalues loop
Post a Comment