covMatrix: Covariance matrix for aggregated model

Description Usage Arguments Details Value Examples

View source: R/covarianceFunctions.R

Description

Covariance matrix for aggregated model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
covMatrix(
  market,
  group.name,
  type.name,
  mkt.name,
  timeVec,
  sigPar,
  tauPar,
  corPar,
  funcMtx = NULL,
  covType,
  corType = "exponential",
  nKnots = NULL,
  truncateDec = NULL
)

Arguments

market

Market information (improve)

group.name

empty

type.name

empty

mkt.name

empty

timeVec

empty

sigPar

improve

tauPar

empty

corPar

empty

funcMtx

empty

covType

Any of 'Homog_uniform', 'Homog' or 'Heterog'.

corType

Any of 'periodic' (default) or 'exponential'.

nKnots

empty

truncateDec

empty

Details

building...

Value

A list of C covariance matrices of size ncol(funcMtx)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
set.seed(2019)

## Create market
mkt = data.frame(group = rep(1:3, each=2),
                 type = rep(1:2, times = 3),
                 value = sample(1:20, 6))

myTimevec = seq(0,1, length.out = 12)
mySigPar = matrix(c(2,3), ncol=2)
myTauPar = matrix(c(.2, .2), ncol=2)
myCorPar = matrix(c(1/8, 12), ncol=2)
myFuncMtx = matrix(runif(8), nrow = 4, ncol=2)

## Homogeneous example
homogMtx = covMatrix(market = mkt, group.name = 'group', type.name = 'type', mkt.name = 'value', timeVec = myTimevec, sigPar = mySigPar, tauPar = myTauPar, corPar = myCorPar, covType = 'Homog', corType = 'exponential')

gabrielfranco89/aggrmodel documentation built on June 1, 2020, 8:57 a.m.