multivator (version 1.1-11)

experiment: Multivatriate hyperparameter (mhp) objects

Description

Create and manipulate multivariate hyperparameter (mhp) objects

Usage

experiment(mm,obs)

Value

Returns an object of class experiment, which is used as input to many of the functions in the package.

Arguments

mm

Object of class mdm

obs

Vector of observations, with elements corresponding to the rows of mm

Author

Robin K. S. Hankin

Details

An “experiment” is an ordered pair of a multivariate design matrix and a vector of observations with entries corresponding to the rows of the design matrix.

It functions as a container for the design matrix and observations. It is intended to simplify the calls to many functions in the package which require a design matrix and vector of observations.

There are two get methods, get_mdm() and get_obs(), for the design matrix and observations respectively. Note the deliberate absence of set methods.

Examples

Run this code

data(mtoys)
jj_expt <- experiment(toy_mm,toy_d)


# accessor methods:
get_obs(jj_expt)
get_mdm(jj_expt)


# estimation of coefficients:
beta_hat(jj_expt, toy_mhp, toy_LoF)

# use multem():
multem(toy_mm3, jj_expt, toy_mhp, toy_LoF,give=TRUE)


Run the code above in your browser using DataLab