*.svystat | R Documentation |
svystat
Multiply the values of survey statistics by a specified vector elementwise, adjusting the variance.
## S3 method for class 'svystat'
x * y
x |
an object of class |
y |
a numeric vector equal in length to |
a [svystat][survey::svymean]
object with the updated statistics and variance-covariance matrix.
library(survey)
data(api)
# From example(svymean):
dclus1<-svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc)
(m1 <- svymean(~api99, dclus1))
(v1 <- vcov(m1))
# Scale the suvery stat object by a factor of two:
(m2 <- m1 * 2)
(v2 <- vcov(m2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.