weighted.std {Rrepest}R Documentation

Weighted standard deviation

Description

Computes the weighted standard deviation of a numeric vector.

Usage

weighted.std(x, w, na.rm = TRUE)

Arguments

x

(numeric vector) Variable of interest for which to compute the standard deviation.

w

(numeric vector) Vector with the weights.

na.rm

(bool) if TRUE: Excludes missing values before computing the standard deviation

Value

Scalar containing the standard deviation

Examples

data(df_talis18)

weighted.std(df_talis18$TT3G02, df_talis18$TRWGT1)

[Package Rrepest version 1.5.4 Index]