You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is closely related to #70 and also probably has minimal impact.
In predict.coxph.penal, when there is only a sparse /penalty term in the model, the newdata argument (if supplied) gets ignored in calculating the predictions (except for the assignment line 45, which gets overwritten).
pred <- object$y[,ncol(object$y)] -object$residuals
se.fit=FALSE
}
}
Currently, if newdata has been supplied, an error stops execution at line 47 unless "indx" has been defined outside the function (issue #70), but when that is fixed, the resulting predictions ignore newdata.
The text was updated successfully, but these errors were encountered:
camdenlo
changed the title
predict.coxph.penal ignores newdata when the model has only a penalty term
predict.coxph.penal ignores newdata when the model has only a sparse term
May 17, 2019
What do you want the prediction to be from a frailty model with new data?
I'm not trying to be difficult -- I have struggled with this question myself. Say the model has frailty(inst) to have a random effect per institution. If the new data contains a new institution -- give NA or the mean of the random effects distribution? Can I count on random effects having a consistent label?
I was thinking that the behavior would be the same as when there are fixed covariates in addition to the frailty term — that the predictions would be for a random effect of zero. In the case of a model with only a frailty term, the only part of newdata that would matter for predictions (and only if type="expected") would be the follow-up time. Rows of newdata that differed only in the value of the frailty term would get the same prediction.
This is closely related to #70 and also probably has minimal impact.
In predict.coxph.penal, when there is only a sparse
/penaltyterm in the model, the newdata argument (if supplied) gets ignored in calculating the predictions (except for the assignment line 45, which gets overwritten).survival/R/predict.coxph.penal.S
Lines 41 to 54 in a676f5e
Currently, if newdata has been supplied, an error stops execution at line 47 unless "indx" has been defined outside the function (issue #70), but when that is fixed, the resulting predictions ignore newdata.
The text was updated successfully, but these errors were encountered: