ComputePred: 'ComputePred' computes the predicted values and the...

Description Usage Arguments Value Examples

Description

ComputePred computes the predicted values and the prediction error std for each statistical unit

Usage

1
2
3
4
ComputePred(object, Param)

## S4 method for signature 'contObsPredModelParam,PredValueTSParam'
ComputePred(object, Param)

Arguments

object

Object of class contObsPredModelParam containing the statistical units whose predicted values and prediction error std is to be computed.

Param

Object of virtual class PredParam with the parameters determining the variables and the method of computation of the predicted values and prediction error std.

Value

Object of class contObsPredModelParam with the predicted values and prediction error std computed for each variable specified in the parameters and each statistical unit.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
## Not run: 
library(xlsx)
library(StQ)
library(RepoReadWrite)
library(StQImputation)
library(StQPrediction)
DD <- RepoXLSToDD('S:/E30183/E30183.NombresVariables_V1.xlsx')
FD <- ReadRepoFile('S:/E30183/E30183.FD_V1.MM032016.P_1', DD, perl = TRUE)
ObsPredPar <- new(Class = 'contObsPredModelParam',
                  Data = FD,
                  VarRoles = list(Units = 'NOrden', Domains = c('Tame_05._4.', 'ActivEcono_35._4._2.1.4._0')))
                  
TS.list <- list(Reg = list('RegDiffTSPred', forward = 2L),
                Stat = list('StatDiffTSPred', forward = 2L),
                StatReg = list('StatRegDiffTSPred', forward = 2L))
VarNames <- c('CifraNeg_13.___', 'Personal_07.__2.__')

BestTSPredParam <- new(Class='BestTSPredParam', TSPred.list = TS.list, VarNames = VarNames)
                
PredTSParam <- new(Class = 'PredTSParam',
                   TS = FF.StQList,
                   Param = BestTSPredParam)

ImpParam <- new(Class = 'MeanImputationParam',
                VarNames = c('PredCifraNeg_13.___', 'PredErrorSTDCifraNeg_13.___',
                             'PredPersonal_07.__2.__', 'PredErrorSTDPersonal_07.__2.__'),
                DomainNames =  c('Tame_05._2.'))
                                   
PredValueTSParam <- new(Class = 'PredValueTSParam',
                        PredictionParam = PredTSParam,
                        ImputationParam = ImpParam)
                        
ObsPredPar <- ComputePred(ObsPredPar, PredValueTSParam)


## End(Not run)

david-salgado/contObsPredModelParam documentation built on Nov. 7, 2019, 5:45 p.m.