saemodel | R Documentation |
Function saemodel()
is used to specify a model. Once a model
has been specified, it can be fitted using
fitsaemodel()
by different estimation methods.
saemodel(formula, area, data, type = "b", na.omit = FALSE) ## S3 method for class 'saemodel' print(x, ...) ## S3 method for class 'saemodel' summary(object, ...) ## S3 method for class 'saemodel' as.matrix(x, ...)
formula |
a |
area |
a one-sided |
data |
data.frame. |
type |
|
na.omit |
|
x |
an object of class |
object |
an object of the class |
... |
additional arguments (not used). |
Function saemodel()
is used to specify a model.
model
is a symbolic description (formula
of the
fixed-effects model to be fitted.
A typical model has the form response ~ terms
where
response
is the (numeric) response vector and
terms
is a series of terms which specifies a linear
predictor for response (explanatory variables); see
formula
.
A formula
has an implied intercept term. To remove
this use either y ~ x - 1
or y ~ 0 + x
;
see formula
for more details of allowed formulae.
area
is a symbolic description (formula
) of
the random effects (nested error structure). It must be
right-hand side only formula consisting of one term,
e.g., ~ areaDefinition
.
The data must no contain missing values.
The design matrix (i.e., matrix of the explanatory variables
defined the right-hand side of model
) must have full column
rank; otherwise execution is terminated by an error.
Once a model has been specified, it can be fitted by
fitsaemodel()
.
An instance of the S3 class "saemodel"
Rao, J.N.K. (2003). Small Area Estimation, New York: John Wiley and Sons.
makedata()
,
fitsaemodel()
data("landsat") model <- saemodel(formula = HACorn ~ PixelsCorn + PixelsSoybeans, area = ~CountyName, data = subset(landsat, subset = (outlier == FALSE)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.