Learn R Programming

maSAE (version 0.1-5)

saObj: An ui-constructor for classes 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)

Arguments

data

See "'>saeObj".

f

a linear mixed effects formula, but see Value.

smallAreaMeans

See "'>saeObj".

s1

See "'>saeObj".

s2

See "'>saeObj".

cluster

See "'>saeObj".

include

See "'>saeObj".

Value

an object of class sadObj if f is of structure `x ~ NULL | g', an object of class saeObj otherwise.

See Also

"'>saeObj", "'>sadObj".

Examples

Run this code
# NOT RUN {
library('maSAE')
## load data
data('s2')
## create sadObj object
saeO  <- saObj(data = s2, f = y ~ NULL | g)
## create saeObj object
s2$s2 <- TRUE
saeO <- saObj(data = s2, f = y ~x1 + x2 + x3 | g, s2 = 's2')

# }

Run the code above in your browser using DataLab