nwos_weights_trimmed: NWOS Trim Weights

View source: R/nwos_weights_trimmed.R

nwos_weights_trimmedR Documentation

NWOS Trim Weights

Description

This function calculates trimmed weights for the NWOS.

Usage

nwos_weights_trimmed(weights, method = "iqr_1.5")

Arguments

method

method to be used for trimming. The only method currently implemented is "iqr_1.5".

weight

vector of weights per ownership.

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_TRIMMED <- nwos_weights_trimmed(weights = wi$WEIGHT)
summary(wi$WEIGHT[wi$WEIGHT > 0])
summary(wi$WEIGHT_TRIMMED[wi$WEIGHT_TRIMMED > 0])

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