modelPar.factor: modelPar.factor

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

set the factor related parametres of the model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
modelPar.factor(modelPar = modelPar.default(), factorFun = "gf_demo",
  factorPar = list(), factorDir = 1,
  factorRefine = refinePar_default("none"),
  factorName = default.factorName(factorFun, factorPar, factorDir),
  factorID = "", factorType = "", factorDesc = "", FactorList)

setmodelPar.factor(modelPar, factorFun, factorPar, factorDir, factorRefine,
  factorName, factorID, factorType, factorDesc, FactorList)

setmodelPar.factor_combi(modelPar, factorLists, wgts, factorDir, factorRefine,
  factorName = "combi_factor", factorID, factorType, factorDesc)

Arguments

modelPar

a modelPar object

factorFun

a non-empty character string naming the function to get the factor scores.(See getTSF)

factorPar

a list, or a character string, containing the parameters of the factorFun.(See getTSF)

factorDir

a integer,should be 1 or -1 (1 for the positive factor,-1 for the negative one).(See getTSF)

factorRefine

a list. See detail in refinePar_default

factorName

a character string. IF missing, then take a default name by function default.factorName.

FactorList

a list containing all the factor related parametres in it. See more detail in buildFactorList.

factorLists

See buildFactorLists.

Details

The different between modelPar.factor and setmodelPar.factor is that the all pars of the former have default values, and the latter have not. The former is ussually used to to build the modelPar integrally, and the latter is ussually used to set the parametre individually.

if FactorList is missing, then the factor related parametres is set by the auguments separately, else, all the parametres is set by the FactorList once and for all.

Value

a modelPar object.

Note

if the parammeter factorFun is "gf_lcfs", then the factorDir, factorName, factorID, factorType and factorDesc will be mapped automatically by CT_FactorLists.

setmodelPar.factor_combi set modelPar by factorFun="getMultiFactor" and factorPar=list(factorLists,wgts). It is used usually in testing the multi-factor-model. See getMultiFactor.

Author(s)

Ruifei.Yin

See Also

getTSF

Other modelPar setting functions: modelPar.default, modelPar.time, modelPar.title, modelPar.univ

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
modelPar <- modelPar.default()
modelPar <- modelPar.factor(modelPar,
                           factorFun="gf.pct_chg_per",
                           factorPar=list(N=25),
                           factorDir=-1,
                           factorRefine= setrefinePar(refinePar_default("scale"))
# -- setmodelPar.factor_combi
mp <- modelPar.default()
factorIDs <- c("F000008","F000001","F000006")
factorLists <- buildFactorLists_lcfs(factorIDs)
wgts <- c(0.5, 0.3, 0.2)
mp_m <- setmodelPar.factor_combi(mp, factorLists, wgts)
# -- setmodelPar.factor_combi by \code{buildFactorlist_combi}
factorlist_combi <- buildFactorList_combi(factorLists,wgts)
mp_m2 <- setmodelPar.factor(mp,FactorList = factorlist_combi)

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