Dear,
Sorry in advance if I'm maybe not using the right STATA-language!
I'm using STATA 16.1 on Windows 10.
I'm using the conindex command to calculate concentration index and I have the data on national level and I want to do it by state. (I'm also using SVYSET).
conindex ml_act if hml16<5 [aweight=wt3], rankvar(hv270) truezero bounded limits(0 1) cluster(hv001) compare(shstate)
Since the sample is small in several states the answer will be zero and I'll get this message:
The mean of the variable (ml_act) is 0 - the standard concentration index is n
> ot defined in this case.
r(498);
So to override it and get the rest of the information I use "capture" before the code:
capture: conindex ml_act if hml16<5 [aweight=wt3], rankvar(hv270) truezero bounded limits(0 1) cluster(hv001) compare(shstate)
The code just get run but no results is given and even no error code.
This code works for my elderly collegue and I have no idea why it's not working for me!
I've tried to just paste the code into the command instead of using the DO-file and such and I'm out of ideas.
Maybe it is different for different computer systems?
Does anyone have an idea how I can do anything to run the code and get the information?
Kind regards
Related Posts with No data is running with adding "capture" to my code, but there is no new error message (this code works for my elder collegue)
What should we conclude when the Adjusted R square decrease when adding a dummy variable into the regression?In my regression using OLS, when I add a dummy variable into my regression, the Adjusted R-squared r…
Multiple imputation estimate excluding some imputationsHi everyone, I would like to run the following code on my imputed dataset: Code: foreach var in $l…
Picking highest real output per worker in sector i in year tDear all, In my dataset, I have variables of real output per worker across 34 different sectors in …
Writing loop to identify individuals with consecutive positive values (n, n+1, n+2, ...)Hi, First time Statalist poster, long time follower. Thanks for this great resource. I am working …
How to Create and Merge New VariablesHi All, I need to create two new variables (one for HIV questions and one for STD questions) that me…
Subscribe to:
Post Comments (Atom)
0 Response to No data is running with adding "capture" to my code, but there is no new error message (this code works for my elder collegue)
Post a Comment