Learn R Programming

spsurvey (version 4.0.0)

dcdf.size.prop: Deconvoluted Size-Weighted Cumulative Distribution Function for Proportion

Description

This function calculates an estimate of the size-weighted, deconvoluted cumulative distribution function (CDF) for the proportion of a discrete resource. The simulation extrapolation deconvolution method (Stefanski and Bay, 1996) is use to deconvolute measurement error variance from the response. The Horvitz-Thompson ratio estimator, i.e., the ratio of two Horvitz-Thompson estimators, is used to calculate the estimate. The numerator of the ratio estimates the size-weighted total of the resource equal to or less than a specified value. The denominator of the ratio estimates the sum of the size-weights for the resource. The function can accomodate single-stage and two-stage samples.

Usage

dcdf.size.prop(g, wgt, cluster.ind, cluster, wgt1, swgt, swgt1)

Arguments

g

Vector of the values of the deconvolution function g(.) evaluated at a specified value for the response value for each site.

wgt

Vector of the final adjusted weight (inverse of the sample inclusion probability) for each site, which is either the weight for a single- stage sample or the stage two weight for a two-stage sample.

cluster.ind

Logical value that indicates whether the sample is a two- stage sample, where TRUE = a two-stage sample and FALSE = not a two-stage sample.

cluster

Vector of the stage one sampling unit (primary sampling unit or cluster) code for each site.

wgt1

Vector of the final adjusted stage one weight for each site.

swgt

Vector of the size-weight for each site, which is the stage two size-weight for a two-stage sample.

swgt1

Vector of the stage one size-weight for each site.

Value

The deconvoluted CDF estimate.