Displaying 2 results from an estimated 2 matches for "oldfit".
Did you mean:
oldbit
2013 Nov 14
1
issues with calling predict.coxph.penal (survival) inside a function
...is a reasonable chance that it won't make this already overdue release.
In the meantime, here is a workaround that I have sometimes used in other situations.
Inside your function do the following: fit a new coxph model with fixed coefficients, and
do prediction on that.
myfun <- function(oldfit, subset) {
newX <- model.matrix(oldfit)[subset,]
newY <- oldfit$y[subset]
newfit <- coxph(newY ~ newX, iter=0, init=coef(oldfit))
newfit$var <- oldfit$var
predict(newfit)
}
If the subset is all of a particular strata, as you indicated, then all of the prediction...
2012 Sep 16
1
trying to obtain same nls parameters as in example
Dear R-users;
I'm working with a a dataset that was previously used to fit a
nonlinear model of the form:
Y ~ a * (1 + b * log(1 - c * X^d))
The parameters published elsewhere are:
a = 1.758863, b = .217217, c = .99031, and d = .054589
However, there is no way I can replicate this result. I've tried
several options (including SAS) w/o success.
The data is:
X <-