Continuous Data Analysis for Probability Survey Data
Continuous Data Analysis for Probability Survey Data
DESCRIPTION:
This function organizes input and output for analysis of continuous data
generated by a probability survey. Input can be either an object belonging to
class "psurvey.analysis" (see the documentation for function psurvey.analysis.fcn)
or through use of the other arguments to this function.
a data frame consisting of two variables: the first variable is
site IDs, and the second variable is a logical vector indicating which
sites to use in the analysis. If psurvey.obj is not provided, then
this argument is required. The default is NULL.
subpop
a data frame describing sets of populations and subpopulations
for which estimates will be calculated. The first variable is site
IDs. Each subsequent variable identifies a Type of population, where
the variable name is used to identify Type. A Type variable
identifies each site with one of the subpopulations of that Type. If
psurvey.obj is not provided, then this argument is required. The
default is NULL.
design
a data frame consisting of design variables. If psurvey.obj is
not provided, then this argument is required. The default is NULL.
Variables should be named as follows:
siteID = site IDs
wgt = final adjusted weights, which are either the weights for a single-stage sample or the stage two weights for a two-stage sample
xcoord = x-coordinates for location, which are either the x-coordinates for a single-stage sample or the stage two x-coordinates for a two-stage sample
ycoord = y-coordinates for location, which are either the y-coordinates for a single-stage sample or the stage two y-coordinates for a two-stage sample
stratum = the stratum codes
cluster = the stage one sampling unit (primary sampling unit or cluster) codes
wgt1 = final adjusted stage one weights
xcoord1 = the stage one x-coordinates for location
ycoord1 = the stage one y-coordinates for location
data.cont
a data frame of continuous response variables. The first
variable is site IDs. Subsequent variables are response variables.
Missing data (NA) is allowed. If psurvey.obj is not provided, then
this argument is required. The default is NULL.
sigma
measurement error variance. This variable must be a vector
containing a value for each response variable and must have the names
attribute set to identify the response variable names. Missing data (NA)
is allowed. The default is NULL.
var.sigma
variance of the measurement error variance. This variable
must be a vector containing a value for each response variable and must have
the names attribute set to identify the response variable names. Missing
data (NA) is allowed. The default is NULL.
N.cluster
the number of stage one sampling units in the resource, which
is required for calculation of finite and continuous population
correction factors for a two-stage sample. For a stratified sample
this variable must be a vector containing a value for each stratum and
must have the names attribute set to identify the stratum codes. The
default is NULL.
popsize
the known size of the resource - the total number of sampling
units of a discrete resource or the measure of a continuous resource,
which is required for calculation of finite and continuous population
correction factors for a single-stage sample. This variable is also
used to adjust estimators for the known size of a resource. For a
stratified sample this variable must be a vector containing a value
for each stratum and must have the names attribute set to identify the
stratum codes. The default is NULL.
stage1size
the known size of the stage one sampling units of a two-
stage sample, which is required for calculation of finite and
continuous population correction factors for a two-stage sample and
must have the names attribute set to identify the stage one sampling
unit codes. For a stratified sample, the names attribute must be set
to identify both stratum codes and stage one sampling unit codes using
a convention where the two codes are separated by the # symbol, e.g.,
"Stratum 1#Cluster 1". The default is NULL.
support
the support value for each site - the value one (1) for a
site from a discrete resource or the measure of the sampling unit
associated with a site from a continuous resource, which is required
for calculation of finite and continuous population correction
factors. The default is NULL.
swgt
the size-weight for each site, which is the stage two size-weight
for a two-stage sample. The default is NULL.
swgt1
the stage one size-weight for each site. The default is NULL.
unitsize
the known sum of the size-weights of the resource, which for a
stratified sample must be a vector containing a value for each stratum
and must have the names attribute set to identify the stratum codes.
The default is NULL.
vartype
the choice of variance estimator, where "Local" = local mean
estimator and "SRS" = SRS estimator. The default is "Local".
conf
the confidence level. The default is 95%.
psurvey.obj
a list of class psurvey.analysis that was produced by the
function psurvey.analysis.fcn. Depending on input to that function,
some elements of the list may be NULL. The default is NULL.
VALUE:
A list containing three data frames of population estimates for all
combinations of subpopulation Types, subpopulations within Types, and response
variables. CDF and percentile estimates are calculated for both proportion
and size of the population. Standard error estimates and confidence interval
estimates also are calculated.
The three data frames are:
CDF
a data frame containing the CDF estimates
Pct
a data frame containing the percentile estimates
Pct
a data frame containing the total, mean, standard deviation, and variance estimates
SIDE EFFECTS:
None
DETAILS:
CDF estimates are calculated for all unique values of a response variable.
Diaz-Ramos, S., D.L. Stevens, Jr., and A.R. Olsen. (1996). EMAP
Statistical Methods Manual. EPA/620/R-96/XXX. Corvallis, OR: U.S.
Environmental Protection Agency, Office of Research and Development, National
Health Effects and Environmental Research Laboratory, Western Ecology
Division.