wtd_stats: Weighted stats

Description Usage Arguments Value Author(s) References

Description

Wrapper for Hmisc::wtd.stats

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
wtd_var(
  x,
  weights = NULL,
  normwt = FALSE,
  na.rm = TRUE,
  method = c("unbiased", "ML")
)

wtd_mean(x, weights = NULL, normwt = "ignored", na.rm = TRUE)

gm_mean(x, na.rm = TRUE)

Arguments

x

numeric vector possibly with missing values

weights

numeric vector pof weights possibly with missing values

normwt

normalise weights?

na.rm

na.rm?

method

one of c("unbiased", "ML")

Value

a numeric scalar

Author(s)

Frank Harrell , Benjamin Tyner

References

https://github.com/harrelfe/Hmisc/blob/master/man/wtd.stats.Rd


aljabadi/Altools documentation built on Jan. 17, 2022, 8:55 a.m.