TABLE OF CONTENTS


CcurveUpdate/PopulateLocalRegression [ Functions ]

NAME

    PopulateLocalRegression --- populate a local RRegression structure

FUNCTION

SYNOPSIS

871  *    void PopulateLocalRegression( regressionP theReg, SEXP Rregression){

INPUTS

OUTPUTS

SOURCE

877 void PopulateLocalRegression( regressionP theReg, SEXP Rregression){
878     theReg->m = asInteger(getListElement(Rregression, "m"));
879     theReg->Ji = INTEGER(getListElement(Rregression, "Ji"));
880     theReg->Jicum = (int *) malloc( (theReg->m + 1) * sizeof(int));
881     theReg->Jicum[0] = 0;
882     for(int i=0; i < theReg->m; i++) theReg->Jicum[i+1] = theReg->Jicum[i] + theReg->Ji[i];
883     theReg->n = (int) (length(getListElement(Rregression,"cluster")));
884     theReg->p = (int) (length(getListElement(Rregression,"coefficients")));
885     theReg->cluster = INTEGER(getListElement(Rregression, "cluster"));
886 
887     theReg->coefficients = REAL(getListElement(Rregression,"coefficients"));
888     theReg->covariates = REAL(getListElement(Rregression,"covariates"));
889     theReg->lp = REAL(getListElement(Rregression,"lp"));
890     theReg->status = REAL(getListElement(Rregression,"status"));
891     theReg->time = REAL(getListElement(Rregression,"time"));
892     theReg->frailrep = (double *) malloc( theReg->n * sizeof(double));    
893     theReg->frailelp = (double *) malloc( theReg->n * sizeof(double));    
894     theReg->CandCov = REAL(getListElement(Rregression,"candcov"));
895     theReg->CholCov = REAL(getListElement(Rregression,"cholcandcov"));
896     theReg->priorvar = REAL(getListElement(Rregression,"priorvar"));
897     theReg->hyper = REAL(getListElement(Rregression,"hyper"));
898     theReg->Accept = REAL(getListElement(Rregression,"accept"));
899     theReg->tun = REAL(getListElement(Rregression,"tun"));
900     theReg->elp = (double *) malloc( theReg->n * sizeof(double));
901     for(int i=0; i<theReg->n; i++) theReg->elp[i]=exp(theReg->lp[i]);
902 }