saObj {maSAE} | R Documentation |
A Constructor for Objects of Class sadObj
and saeObj
Description
Simple wrapper to new("sa[de]Obj")
.
If missing, it adds an inclusion variable to data
;
it checks for missing in the clustering variable.
Adds comments documenting changes made to the returned object.
Usage
saObj(
data,
f,
smallAreaMeans = NULL,
s1 = NULL,
s2 = NULL,
cluster = NULL,
include = NULL,
auxiliaryWeights = NULL
)
Arguments
data |
See |
f |
a linear mixed effects formula, but see Value. |
smallAreaMeans |
See |
s1 |
See |
s2 |
See |
cluster |
See |
include |
See |
auxiliaryWeights |
See |
Value
An object of class sadObj
if f
is of structure ‘x ~ NULL | g’,
an object of class saeObj
otherwise.
See Also
Examples
## load data
data("s2", package = "maSAE")
## create sadObj object
sad <- maSAE::saObj(data = s2, f = y ~ NULL | g)
class(sad)
## create saeObj object
s2$s2 <- TRUE
sae <- maSAE::saObj(data = s2, f = y ~ x1 + x2 + x3 | g, s2 = "s2")
class(sae)
[Package maSAE version 2.0.3 Index]