Last chance! 50% off unlimited learning
Sale ends in
powered by
Predefined functions for weighted point estimates in package surveysd.
surveysd
weightedRatio(x, w)weightedSum(x, w)
weightedSum(x, w)
numeric vector
weight vector
Each of the functions return a single numeric value
Predefined functions are weighted ratio and weighted sum.
# NOT RUN { x <- 1:10 w <- 10:1 weightedRatio(x,w) x <- 1:10 w <- 10:1 weightedSum(x,w) # }
Run the code above in your browser using DataLab