nwos_weights: NWOS Weights

Description Usage Arguments Value References Examples

View source: R/_ARCHIVE/CopyOfnwos_weights.R View source: R/nwos_weights.R

Description

This function returns the calculated weights based on the NWOS sample design.

Usage

1
nwos_weights(stratum, point.count, response, area, stratum.area, stratum.area.correction = stratum.area, response.rate)

Arguments

stratum

vector indicating inclusion (1) and exclusion (0) in the stratum of interest.

point.count

vector of the number of sample points associated with each observation. Default point.count = 1.

response

vector indicating response (1) and non-response (0).

area

vector of the area (of forestland) owned by each ownership.

nonresponse.adj

vector of unit nonresponse adjustment factors. Default nonresponse.adj = 1.

stratum.area

area (of forestland) in the stratum of interest.

stratum.area.correction

area (of forestland) in the stratum of interest to which the total stratum.area will be forced. The default value is stratum.area (i.e., no correction).

response.rate

response rate for the stratum of interest. Value should range from 0 ot 1.

Value

vector of weights

References

Butler, B.J. In review. Weighting for the US Forest Service, National Woodland Owner Survey. U.S. Department of Agriculture, Forest Service, Northern Research Station. Newotwn Square, PA.

Examples

1
2
3
4
5
wi <- tbl_df(read.csv("data/wi.csv")) %>% mutate(ROW_NAME = row.names(wi), AC_WOOD = ACRES_FOREST, FFO = if_else(LAND_USE == 1 & OWN_CD == 45 & AC_WOOD >= 1, 1, 0), RESPONSE = if_else(RESPONSE_PROPENSITY >= 0.5, 1, 0), RESPONSE = if_else(is.na(RESPONSE_PROPENSITY), 0, RESPONSE))
WI_FFO_AREA <- nwos_stratum_area(stratum = wi$FFO, point.count = wi$POINT_COUNT, state.area = 33898733)
WI_FFO_RR <- nwos_response_rate(stratum = wi$FFO, point.count = wi$POINT_COUNT, response = wi$RESPONSE)
wi$WEIGHT <- nwos_weights(stratum = wi$FFO, point.count = wi$POINT_COUNT, response = wi$RESPONSE, area = wi$AC_WOOD, stratum.area = WI_FFO_AREA, response.rate = WI_FFO_RR)
wi$WEIGHT

bbutler01/nwos documentation built on Aug. 30, 2019, 12:57 p.m.