Date: Thu, 1 Feb 2001 15:00:06 -0500 Scott Carl "SAS(r) Discussion" Scott Carl Re: Confidence Intervals To: Sharavi Gandham

On Tue, 30 Jan 2001 22:18:19 -0500, Sharavi Gandham <SHARAVI@WORLDNET.ATT.NET> wrote:

>Hello, > >Does anyone out there know about the confidence intervals for Capture >Recapture Statistics??? >We have a point estimate of 1, i think, but when we do the intervals we get >negative values and that doesn't make any sense, so i was wondering if there >is any constraints like they have in Binomial ditributuin (npq<0.05 or >something like that, don't remember offhand). > >Thanks much in advance, >Sharavi.

Sharavi,

I suggest you consider bootstrapping to estimate the distributional properties of the statistic. Here is an example to get you started, written in V8. Hope this helps.

Scott Carl Tricision, Inc. (203) 512-4257 scott.carl@tricision.com

***** Create bootstrap sampler macro *****;

%macro create_boot_ds(indsid,outdsid,ss,n,seed=12345);

data &outdsid(index=(_boot_id) drop=_i _n); do _boot_id=1 to &n; do _i=1 to &ss; row_pointer=ceil(ranuni(&seed)*_n); set &indsid point=row_pointer nobs=_n; output; end; end; stop; run;

%mend create_boot_ds;

***** Evaluate Properties of the Statistic *****;

%macro Evaluate_boot_ds(indsid,outdsid,variable,statistic); ** Run your analysis here, by _boot_id. **; ** In this case I am using a statistic that has well understood properties **; ** The mean. We could replace the mean with P10, to look at the distributional...**; ** properties of a less familiar statistic. **; proc summary data=&indsid &statistic; by _boot_id; var &variable; output out=_T1az mean=;

proc univariate data=_T1az ; var &variable; histogram; run;

%mend Evaluate_boot_ds;

***** Create dummy dataset y~N(1,4)*****;

data test; do i=1 to 100; y=2*normal(3635626)+1; * N(1,4). Note that mean is ~ 1, and SE is ~ 2/10=0.2; output; end; run;

***** Evaluate standard error for the statistic: mean(y) *****;

proc means data=test stderr std mean var; var y; run;

***** Create bootstrap dataset *****;

%create_boot_ds(test,test_out,100,500); title "Bootstrap Results."; title2 "Note that the Standard Deviation here is the estimate of the Standard Error."; %evaluate_boot_ds(test_out,summary_out,Y,mean); *Could replace mean with median here.; run; title; title2; quit;

Back to: Top of message | Previous page | Main SAS-L page