[R] Bootstrap and Jackknife Bias using Survey Package

2006-04-11 Thread Carlos Creva Singano \(M2004078\)
Dear R users,

I´m student of Master in Statistic and Data analysis, in New University of 
Lisbon. And now i´m writting my dissertation in variance estimation.So i´m  
using Survey Package to compute the principal estimators and theirs variances.

My data is from Incoming and Expendire Survey. This is stratified Multi-stage 
Survey care out by National Statistic Institute of Mozambique. My domain of 
analysis is Maputo City, the Capital of Mozambique. I just compute the sampling 
errors using Survey Package, but i have some droubles:

1. How to compute Bootstrap and Jackknife Bias of estimates, like mean?

2. How to see each replicate estimate of the parameter?

3. Is it possible to use the Sitter algoritm in Bootstrap for stratified and 
multi-stage sampling in Survey Package? Or is possible to use the 
pseudo-population (obtained by replication the sample) in estimation using 
Bootstrap?

Thanks before hand to anyone how can help me!

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Bootstrap and Jackknife Bias using Survey Package

2006-04-11 Thread Ramón Casero Cañas
Carlos Creva Singano (M2004078) wrote:
 
 1. How to compute Bootstrap and Jackknife Bias of estimates, like mean?

Have you had a look at packages boot and bootstrap? E.g. you can
compute the bias and s.e. of an estimate theta using bootstrap

library(boot)
a - boot( data, theta, R=1000 )

where boot is a function of the boot package, and theta is a function
that you can define yourself. In your case, it is not necessary and you
can use mean instead of theta.

 2. How to see each replicate estimate of the parameter?

In the example above, they can be found in the boot object a in:

a$t

-- 
Ramón Casero Cañas

http://www.robots.ox.ac.uk/~rcasero/wiki
http://www.robots.ox.ac.uk/~rcasero/blog

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] Bootstrap and Jackknife Bias using Survey Package

2006-04-11 Thread Thomas Lumley

On Tue, 11 Apr 2006, Carlos Creva Singano (M2004078) wrote:


Dear R users,

I´m student of Master in Statistic and Data analysis, in New University 
of Lisbon. And now i´m writting my dissertation in variance 
estimation.So i´m using Survey Package to compute the principal 
estimators and theirs variances.


My data is from Incoming and Expendire Survey. This is stratified 
Multi-stage Survey care out by National Statistic Institute of 
Mozambique. My domain of analysis is Maputo City, the Capital of 
Mozambique. I just compute the sampling errors using Survey Package, but 
i have some droubles:




1. How to compute Bootstrap and Jackknife Bias of estimates, like mean?


I don't know how to do this for survey estimates, but if you do, you can 
compute it from the replicates.



2. How to see each replicate estimate of the parameter?


All the survey functions for replicate designs will return the replicates 
with the return.replicates=TRUE option


R a - svymean(~api00,rclus1,return.replicates=TRUE)
R summary(a$replicates)
   Min. 1st Qu.  MedianMean 3rd Qu.Max.
  636.1   640.4   642.9   644.3   645.7   667.7
R str(a)
List of 2
 $ mean  : atomic [1:1] 644
  ..- attr(*, var)= num 693
  ..- attr(*, statistic)= chr mean
 $ replicates: num [1:15] 643 648 646 643 645 ...
 - attr(*, class)= chr svrepstat


3. Is it possible to use the Sitter algoritm in Bootstrap for stratified 
and multi-stage sampling in Survey Package? Or is possible to use the 
pseudo-population (obtained by replication the sample) in estimation 
using Bootstrap?




as.svrepdesign( ,type=bootstrap)
does create a pseudo-population in designs with a finite population 
correction. This is as described in the reference by Davison and Canty 
given on the help page.


I don't know what you mean by the Sitter algorithm.  Prof Sitter has 
written several papers on bootstrapping survey data -- can you give a more 
precise reference?


-thomas

Thomas Lumley   Assoc. Professor, Biostatistics
[EMAIL PROTECTED]   University of Washington, Seattle__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html