betahat: Various intermediate expressions needed by the multivariate...

Description Usage Arguments Details Author(s) See Also Examples

Description

Various intermediate expressions needed by the multivariate emulator

Usage

1
2
3
4
5
6
7
8
regressor(x,LoF)
beta_hat(expt,hp,LoF, ...)
betahat_mult(H, Sigmainv, d)
betahat_mult_Sigma(H, Sigma, d)
cstar(x1, x2=x1 , expt, hp,  LoF = NULL, Sigmainv=NULL, ...)
eq2.36(H, Sigmainv, d, log=TRUE)
eq2.36_Sigma(H, Sigma, d)
var.matrix(x1,x2=x1,hp, ...)

Arguments

x,x1,x2

Objects of class mdm: multivariate design matrix

H

Matrix of regressors (create this with regressor())

d

Vector of observations, possibly not all of the same dimensions (eg some elements might be Kelvin, others millimeters of rain per year)

expt

Object of class experiment

Sigma

The variance matrix of d

log

Boolean, with TRUE meaning to return the logarithm of the answer

Sigmainv

The inverse of the variance matrix of d, with default NULL meaning to calculate it directly using var.matrix()

LoF

A list of functions with default NULL meaning to use default_LoF()

hp

Object of class mhp: multivariate hyperparameters

...

Extra arguments which are passed (via var.matrix()) to corr.matrix() of the emulator package

Details

Function regressor() creates a (sort of) direct sum of regressor matrices for an overall regressor matrix. It returns a matrix whose rows are the regressor functions for each row in the df argument. Each type of observation has its own ‘slot’ of columns, the others being filled with zeros.

The emulator package should have used this method (rather than messing about with regressor.basis() and regressor.multi()).

To get the regression coefficients, the user should use function beta_hat(), which is the user-friendly version. It is a wrapper for function betahat_mult_Sigma().

The equation for var.matrix() is

ommitted--see a LaTeXed file

Author(s)

Robin K. S. Hankin

See Also

multem

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
data(mtoys)

H <- regressor(toy_mm, toy_LoF)
Sigma <- var.matrix(toy_mm, hp=toy_mhp)
Sigmainv <- solve(Sigma)


jj <- toy_mm_maker(34,35,36)
expt  <- experiment(jj,obs_maker(jj,toy_mhp,toy_LoF,toy_beta))

x1 <- jj[c(20,40,100),]
xold(x1) <- 0.2

x2 <- jj[c(11,21:24,40:42),]
xold(x2) <- xold(x2)+0.1

#primary function of package:
multem(x=x1, expt, hp=toy_mhp, LoF=toy_LoF)

# conditional covariance matrix:
cstar(x1,x2, expt, hp=toy_mhp, LoF=toy_LoF)
 


Search within the multivator package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.