| ParamPWR-class {samurais} | R Documentation |
A Reference Class which contains the parameters of a PWR model.
Description
ParamPWR contains all the parameters of a PWR model. The parameters are calculated by the initialization Method and then updated by the Method dynamic programming (here dynamic programming)
Fields
XNumeric vector of length m representing the covariates/inputs
x_{1},\dots,x_{m}.YNumeric vector of length m representing the observed response/output
y_{1},\dots,y_{m}.mNumeric. Length of the response/output vector
Y.KThe number of regimes (PWR components).
pThe order of the polynomial regression.
pis fixed to 3 by default.gammaSet of transition points.
gammais a column matrix of size(K + 1, 1).betaParameters of the polynomial regressions.
betais a matrix of dimension(p + 1, K), withpthe order of the polynomial regression.pis fixed to 3 by default.sigma2The variances for the
Kregimes.sigma2is a matrix of size(K, 1).phiA list giving the regression design matrices for the polynomial and the logistic regressions.
Methods
computeDynamicProgram(C1, K)Method which implements the dynamic programming based on the cost matrix
C1and the number of regimes/segmentsK.computeParam()Method which estimates the parameters
betaandsigma2knowing the transition pointsgamma.