Thanks so much for the quick response.Now I have run into a new
problem.I have svyset the data.For each district in a state I am
actually trying to estimate ratios of a no of variables and the
corresponding standard errors,no of observations and the design effect
and get them into a matrix form so that copy pasting it into an EXCEL
worksheet is easier.Here s the program I wrote(this is for a state
which has 37 districts):
program define myprog,rclass
syntax varname
return local varname `r1',`r2'
matrix define T=J(37,4,0)
forvalues i=1(1)37{
use "C:\Documents and Settings\Xp\Desktop\data files\state1.dta",clear
keep if district==`i'
svy:ratio `r1' `r2'
matrix define A`i'=e(b)
matrix define B`i'=e(N)
matrix define C`i'=e(V)
estat effects,deff
matrix define D`i'=r(deff)
matrix define Z`i'=A`i',B`i',C`i',D`i'
matrix T[`i',1]=Z`i'
}
end
myprog var1 var2
Typing myprog var1 var2 yields the following error message in Stata:
unrecognized command: var1 var2
I can not figure out what is wrong.Can I not use e( ) and r( ) in the
same program?Please advice.Thanks
Arka Roy Chaudhuri
Indian Statistical Institute
On Mon, Aug 4, 2008 at 8:07 AM, Maarten buis <[email protected]> wrote:
> --- arka roy <[email protected]> wrote:
>> Could anybody tell me where Stata stores the confidence level and
>> standard error estimates when I am using the svy:ratio command in
>> Stata?I know that Stata stores the no of observations in e(N),
>> variance estimates in e(V) but I really need to know where Stata
>> stores the confidence level estimates and standard error
>> estimates.Thanks
>
> This is discussed in (Buis 2007).
>
> Hope this helps,
> Maarten
>
> Buis, Maarten L. (2007) Stata Tip 54: Where did my p-values go? The
> Stata Journal, vol. 7 no. 4, pp. 584-586. http://home.fsw.vu.nl/m.buis/wp/pvalue.html
>
> -----------------------------------------
> Maarten L. Buis
> Department of Social Research Methodology
> Vrije Universiteit Amsterdam
> Boelelaan 1081
> 1081 HV Amsterdam
> The Netherlands
>
> visiting address:
> Buitenveldertselaan 3 (Metropolitan), room Z434
>
> +31 20 5986715
>
> http://home.fsw.vu.nl/m.buis/
> -----------------------------------------
>
>
> __________________________________________________________
> Not happy with your email address?.
> Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/