The simplest way to call
loglikNorm is to provide an object of class "norm" as its
sole argument, where that object is the result of a call to
emNorm or mcmcNorm. The parameter values
stored in that object will then be passed to loglikNorm automatically.
Alternatively, one may call loglikNorm by providing as the first
argument y, a vector or matrix of data to be modeled as
normal, and an optional vector or matrix of predictors x.
Missing values NA
are allowed in y but not in x.
A third way to call loglikNorm is to provide
formula, a formula for a (typically
multivariate) linear regression model in the manner expected by
lm. A formula is given as y ~ model, where
y is either a single numeric variable or a matrix of numeric
variables bound together with the function cbind. The
right-hand side of the formula (everything to the right of ~) is a
linear predictor, a series of terms separated by operators +,
: or * to specify main effects and
interactions. Factors are allowed on the right-hand side and will
enter the model as contrasts among the levels. The
intercept term 1 is included by default; to remove the
intercept, use -1.
Calling loglikNorm is equivalent to calling
logpostNorm with prior="uniform".