[R] Variance of a complex estimator using survey package ...

Thomas Lumley tlumley at u.washington.edu
Tue Nov 14 16:25:57 CET 2006


On Tue, 14 Nov 2006, justin bem wrote:

> Hi,
>
> I want to compute the variance of two complex statistics. The first 
> statistic is the a ratio
>               R1=Q(a1)/Q(a2)
> where Q denote de quantile at a1 and a2. The second is also a ratio but 
> not a classic one this ratio is
>               R2=sum(x_{i}|x_{i}>Q(a1))/sum(x_{i} }|<Q(a2))
>
> Linearisation for those statistic is very complex. I want to use 
> bootstrap and JKn How can I procede since I dont have a function like 
> svrepanyfunction where you just specify the function to compute the 
> statistic.

You can specify any function of data and weights as an argument to 
withReplicates().

JKn weights will not work for the first statistic (they don't work for 
quantiles), but bootstrap weights should work.

 	-thomas



More information about the R-help mailing list