Learn R Programming

spsurvey (version 4.1.4)

dsgnsum: Summary of a Survey Design

Description

This function summarizes the sites selected for a survey design by producing contingency tables containing the cross-tabluation of number of sites for survey design variables and, optionally, for auxiliary variables.

Usage

dsgnsum(spsample, auxvar = NULL)

Arguments

spsample

An object of class SpatialDesign produced by either the grts or irs functions that contains survey design information and additional attribute (auxiliary) variables.

auxvar

Vector containing the names of columns in the data slot of the

Value

A list containing two components named DesignSum and AuxVarSum. DesignSum is a list of contingency tables containing the cross-tabulation of number of sites for the following combinations of survey design variables:

  • multidensity category (mdcaty) and stratum

  • stratum and panel

  • mdcaty, panel, and stratum

AuxVarSum is a list of contingency tables containing the cross-tabulation of number of sites for each auxiliary variable and the design variables mdcaty, panel, and stratum.

In addition the output list plus labeling information is printed to the console.

Other Functions Required

vecprint

takes an input vector and outputs a character string with line breaks inserted

Examples

Run this code
# NOT RUN {
design <- list(
  Stratum1=list(panel=c(PanelOne=50), seltype="Equal", over=10),
  Stratum2=list(panel=c(PanelOne=50, PanelTwo=50), seltype="Unequal",
    caty.n=c(CatyOne=25, CatyTwo=25, CatyThree=25, CatyFour=25), over=75))
samp <- grts(design=design, DesignID="Test.Site", type.frame="area",
  src.frame="shapefile", in.shape="shapefile", stratum="stratum",
  mdcaty="mdcaty", shapefile=TRUE, out.shape="sample.shp")
dsgnsum(samp, auxvar=c("ecoregion", "state"))
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab