Displaying 6 results from an estimated 6 matches for "newfit".
Did you mean:
newfi
2013 Nov 14
1
issues with calling predict.coxph.penal (survival) inside a function
...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 predictions
will be correct. If not, then those that make use of the the baseline hazard (type=
expect) wi...
2008 Apr 14
2
Bug in ci.plot(HH Package) (PR#11163)
...t right?
--- ci.plot source code ---
"ci.plot" <-
function(lm.object, ...)
UseMethod("ci.plot")
"ci.plot.lm" <-
function(lm.object,
xlim=range(data[, x.name]),
newdata,
conf.level=.95,
data=model.frame(lm.object),
newfit,
ylim=range(newfit$pi.fit),
pch=16,
main.cex=1,
main=list(paste(100*conf.level,
"% confidence and prediction intervals for ",
substitute(lm.object), sep=""), cex=main.cex), ...
) {
formula.lm <- formula(lm.o...
2008 Nov 24
1
Discrepancy in the PBC data set
...#39;chol', 'albumin', 'copper',
'alk.phos', 'ast', 'trig', 'platelet',
'protime', 'stage'),
na.strings='.')
pbc$age <- pbc$age/365.25
newfit <- coxph(Surv(time, status==2) ~ age + edema + log(bili) +
log(protime) + log(albumin), data=pbc)
newfit
coef exp(coef) se(coef) z p
age 0.0396 1.0404 0.00767 5.16 2.4e-07
edema 0.8963 2.4505 0.27141 3.30 9.6e-04
log(bili) 0.8636 2.3...
2005 Jul 21
1
About object of class mle returned by user defined functions
...gest allowed values.
The "big" thing this short function does is writing on-fly the
corresponding log-likelihood function before calling "mle". The object
of class "mle" returned by the call to "mle" is itself returned by the
function.
Here is the code:
newFit <- function(isi, ## The data set
isi.density = "gamma", ## The name of the density
used as model
initial.para = list( shape = (mean(isi)/sd(isi))^2,
scale = sd(isi)^2 / mean(isi) ), ## Inital
parameters passed to optim...
2009 Dec 03
0
Problem with predict() and factors
...~ .,mcReg[[i]], main=paste("Model - MIPS vs",i))
}
#Build the list to store our results
linearModel <- list()
residuals <- list()
arima_Fit <- list()
arima_AO <- list()
arima_IO <- list()
newcReg <- list()
newfReg <- list()
newmcReg <- list()
newmfReg <- list()
newFit <- list()
newForecast <- list()
# Following won't work until mcReg contains full variety
linearModel[[1]]=lm(modelSource ~ + UNITBUILD + UNITDB + ITBUILD + ITDB +
UATBUILD + UATDB + HOGANCODE + RCF + ReleaseST1 + ReleaseST2 + ReleaseBLA +
Small.Bank.Acquisitions + HLY.NewYear + HLY.MLK +...
2011 Mar 20
3
manova question
Dear friends,
Sorry for this somewhat generically titled posting but I had a question
with using contrasts in a manova context. So here is my question:
Suppose I am interested in doing inference on \beta in the case of the
model given by:
Y = X %*% \beta + e
where Y is a n x p matrix of observations, X is a n x m design matrix,
\beta is m x p matrix of parameters, and e is a