times-.svystat: A scalar multiplication method for 'svystat'

Description Usage Arguments Value Examples

Description

Multiply the values of survey statistics by the specified number, adjusting the variance.

Usage

1
2
## S3 method for class 'svystat'
x * y

Arguments

x

an object of class [svystat][survey::svymean].

y

a scalar (numeric vector of length 1).

Value

a [svystat][survey::svymean] object with the updated statistics and variance-covariance matrix.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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))

statnet/ergm.ego documentation built on April 26, 2021, 4:46 a.m.