nwos_weights: NWOS Weights

View source: R/nwos_weights.R

nwos_weightsR Documentation

NWOS Weights

Description

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

Usage

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

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

familyforestresearchcenter/nwos documentation built on April 12, 2025, 11:54 a.m.