muSigma: Function to estimate mean and covariance for unknown...

Description Usage Arguments Value Examples

View source: R/fitting_functions.R

Description

Function to estimate mean and covariance for unknown parameters β.

Usage

1
muSigma(Z, X = NULL, fit.method = "KL", wls.method = "default")

Arguments

Z

list of design points and link function that is an output of function designLink

X

model matrix for model formula and design points. The covariates must correspond to the description of design points in Z, but can be transformed etc. If NULL then X will be coerced by applying as.matrix() to Z$design. The matrix X should be full rank when subsetted to the elicited design points. If a column of X has the name offset then this column is treated as an offset during estimation

fit.method

character, moment, KL. See mV. Default is KL.

wls.method

character giving the numerical solution method: QR, using the QR decomposition, SVD, using the singular value decomposition, or option default that uses solve()

Value

list of mu, numeric vector of location parameters for the normal prior; Sigma, the covariance matrix; and log.like, a scalar

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
X <- matrix(c(1, 1, 0, 1), nrow = 2) # design
Z <- designLink(design = X)
Z <- elicitPt(Z, design.pt = 1,
  lower.CI.bound = -1,
  median = 0,
  upper.CI.bound = 1,
  comment = "The first completed elicitation scenario.")
Z <- elicitPt(Z, design.pt = 2,
  lower.CI.bound = -2,
  median = 1,
  upper.CI.bound = 2,
  comment = "The second completed elicitation scenario.")
prior <- muSigma(Z, X, fit.method = "KL")
prior$mu
prior$Sigma   

indirect documentation built on May 1, 2019, 6:35 p.m.