getMPs: get modelPar-lists

Description Usage Arguments Value See Also Examples

Description

Get ModelPar-lists by the given params. Usually used for mdoel testing with different parameters.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
getMPs_FactorLists(FactorLists, modelPar, nm = plyr::laply(FactorLists,
  function(x) x$factorName))

getMPs_time.intervals(intervals, modelPar, nm = paste(intervals[, 1],
  intervals[, 2], sep = "~"))

getMPs_time.rebFreqs(rebFreqs, modelPar, nm = rebFreqs)

getMPs_time.shiftbys(shiftbys, modelPar, nm = as.character(shiftbys))

getMPs_univs(univs, modelPar, nm = univs)

Arguments

FactorLists

a list of FactorList. See more details in buildFactorLists.

modelPar

a modelPar object

nm

a character string, specificating the names of the returned list

intervals

a dataframe with cols 'begT' and 'endT'. Note that 'begT' must be the 1st col and 'endT' must be the 2nd col.

rebFreqs

a charactor vector of rebFreq. See setmodelPar.time

shiftbys

a integer vector of shiftby.

univs

a charactor vector of univ. See setmodelPar.univ.

Value

a MPs object, which is a list of modelPar

See Also

Model.TSFs, Model.TSFRs

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
mp = modelPar.default()

# -- getMPs_FactorLists
factorIDs <- c("F000001","F000002","F000005")
FactorLists <- buildFactorLists_lcfs(factorIDs)
re1 <- getMPs_FactorLists(FactorLists,modelPar=mp)
# -- getMPs_time.intervals
begTs <- seq(as.Date("2010-01-01"),as.Date("2015-01-01"),"year")
endTs <- begTs + months(1)
intervals <- data.frame(begTs,endTs)
re2 <- getMPs_time.intervals(intervals,mp)
# -- getMPs_time.rebFreqs
rebFreqs <- c("day","month","2 month")
re3 <- getMPs_time.rebFreqs(rebFreqs,mp)
# -- getMPs_time.shiftbys
shiftbys <- c(1,3,5,10)
re4 <- getMPs_time.shiftbys(shiftbys,mp)
# -- getMPs_univs
univs <- c("EI000300","EI000905","EI000904")
re5 <- getMPs_univs(shiftbys,mp)

raphael210/RFactorModel documentation built on May 26, 2019, 11:06 p.m.