Displaying 20 results from an estimated 30000 matches similar to: "predict.survreg() with frailty term and newdata"
2007 Jan 22
0
[UNCLASSIFIED] predict.survreg() with frailty term and newdata
Dear All,
I am attempting to make predictions based on a survreg() model with some censoring and a frailty term, as below: predict works fine on the original data, but not if I specify newdata.
# a model with groups as fixed effect
model1 <- survreg(Surv(y,cens)~ x1 + x2 + groups,
dist = "gaussian")
# and with groups as a random effect
fr <- frailty(groups,
2003 May 07
0
Re: frailty models in survreg() -- survival package (PR#2934)
SEE ALSO ORIGINAL POSTING IN PR#2933
On May 6, 2003 03:58 pm, Thomas Lumley wrote:
>
> Looking at a wider context in the code
>
> pfun <- function(coef, theta, ndeath) {
> if (theta == 0)
> list(recenter = 0, penalty = 0, flag = TRUE)
> else {
> recenter <- log(mean(exp(coef)))
> coef <- coef - recenter
2003 May 07
0
Re: frailty models in survreg() -- survival package (PR#2934)
On Tue, 6 May 2003, Jerome Asselin wrote:
>
> I am confused on how the log-likelihood is calculated in a parametric
> survival problem with frailty. I see a contradiction in the frailty() help
> file vs. the source code of frailty.gamma(), frailty.gaussian() and
> frailty.t().
>
> The function frailty.gaussian() appears to calculate the penalty as the
> negative
2008 Apr 18
0
survreg with frailty
The combination of survreg + gamma frailty = invalid model, i.e., the example
that you quote.
I did not realize that this had been added to the survreg help file until very
recently. I will try to fix the oversight. Other, more detailed documentation
states that Gaussian frailty + AIC is the only valid random effects choice for
survreg.
Details: frailty(x) with no optional
2010 Nov 11
2
predict.coxph and predict.survreg
Dear all,
I'm struggling with predicting "expected time until death" for a coxph and
survreg model.
I have two datasets. Dataset 1 includes a certain number of people for which
I know a vector of covariates (age, gender, etc.) and their event times
(i.e., I know whether they have died and when if death occurred prior to the
end of the observation period). Dataset 2 includes another
2013 Nov 04
0
Fwd: Re: How to obtain nonparametric baseline hazard estimates in the gamma frailty model?
-------- Original Message --------
Subject: Re: How to obtain nonparametric baseline hazard estimates in the gamma frailty model?
Date: Mon, 04 Nov 2013 17:27:04 -0600
From: Terry Therneau <therneau.terry at mayo.edu>
To: Y <yuhanusa at gmail.com>
The cumulative hazard is just -log(sfit$surv).
The hazard is essentially a density estimate, and that is much harder. You'll notice
2011 Jan 28
1
survreg 3-way interaction
> I was wondering why survreg (in survival package) can not handle
> three-way interactions. I have an AFT .....
You have given us no data to diagnose your problem. What do you mean
by "cannot handle" -- does the package print a message "no 3 way
interactions", gives wrong answers, your laptop catches on fire when you
run it, ....?
Also, make sure you read
2010 Nov 12
3
predict.coxph
Since I read the list in digest form (and was out ill yesterday) I'm
late to the discussion.
There are 3 steps for predicting survival, using a Cox model:
1. Fit the data
fit <- coxph(Surv(time, status) ~ age + ph.ecog, data=lung)
The biggest question to answer here is what covariates you wish to base
the prediction on. There is the usual tradeoff between too few (leave
out something
2003 May 07
0
frailty models in survreg() -- survival package (PR#2933)
I am confused on how the log-likelihood is calculated in a parametric
survival problem with frailty. I see a contradiction in the frailty() help
file vs. the source code of frailty.gamma(), frailty.gaussian() and
frailty.t().
The function frailty.gaussian() appears to calculate the penalty as the
negative log-density of independent Gaussian variables, as one would
expect:
>
2011 Jan 10
4
Meaning of pterms in survreg object?
I am trying to model survival data with a Weibull distribution
using survreg. Units are clustered two apiece, sometimes receiving
the same treatment and sometimes opposing treatment.
2013 Feb 12
0
error message from predict.coxph
In one particular situation predict.coxph gives an error message. Namely: stratified data, predict='expected', new data, se=TRUE. I think I found the error but I'll leave that to you to decide.
Thanks,
Chris
######## CODE
library(survival)
set.seed(20121221)
nn <- 10 # sample size in each group
lambda0 <- 0.1 # event rate in group 0
lambda1 <- 0.2 # event rate in group 1
2008 Mar 03
1
Problem plotting curve on survival curve
Calum had a long question about drawing survival curves after fitting a Weibull
model, using pweibull, which I have not reproduced.
It is easier to get survival curves using the predict function. Here is a
simple example:
> library(survival)
> tfit <- survreg(Surv(time, status) ~ factor(ph.ecog), data=lung)
> table(lung$ph.ecog)
0 1 2 3 <NA>
63 113 50 1
2013 Nov 14
1
issues with calling predict.coxph.penal (survival) inside a function
Thanks for the reproducable example. I can confirm that it fails on my machine using
survival 2-37.5, the next soon-to-be-released version,
The issue is with NextMethod, and my assumption that the called routine inherited
everything from the parent, including the environment chain. A simple test this AM showed
me that the assumption is false. It might have been true for Splus. Working this
2007 Jul 12
1
p-value from survreg
The question was how to get the p-value from the fit below, as an S object
sr<-survreg(s~groups, dist="gaussian")
Coefficients:
(Intercept) groups
-0.02138485 0.03868351
Scale= 0.01789372
Loglik(model)= 31.1 Loglik(intercept only)= 25.4
Chisq= 11.39 on 1 degrees of freedom, p= 0.00074
n= 16
----
In general, good places to start are
> names(sr)
>
2008 Apr 17
1
survreg() with frailty
Dear R-users,
I have noticed small discrepencies in the reported estimate of the
variance of the frailty by the print method for survreg() and the
'theta' component included in the object fit:
# Examples in R-2.6.2 for Windows
library(survival) # version 2.34-1 (2008-03-31)
# discrepancy
fit1 <- survreg(Surv(time, status) ~ rx + frailty(litter), rats)
fit1
fit1$history[[1]]$theta
2009 Jan 02
0
[Fwd: Re: Interval censored Data in survreg() with zero values!]
-------------- next part --------------
An embedded message was scrubbed...
From: Terry Therneau <therneau at mayo.edu>
Subject: Re: Interval censored Data in survreg() with zero values!
Date: Tue, 30 Dec 2008 16:46:37 -0600 (CST)
Size: 4268
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090102/abe75d02/attachment-0002.eml>
2008 Apr 25
3
Use of survreg.distributions
Dear R-user:
I am using survreg(Surv()) for fitting a Tobit model of left-censored longitudinal data. For logarithmic transformation of y data, I am trying use survreg.distributions in the following way:
tfit=survreg(Surv(y, y>=-5, type="left")~x + cluster(id), dist="gaussian", data=y.data, scale=0, weights=w)
my.gaussian<-survreg.distributions$gaussian
2009 Feb 23
1
predicting cumulative hazard for coxph using predict
Hi
I am estimating the following coxph function with stratification and frailty?where each person had multiple events.
m<-coxph(Surv(dtime1,status1)~gender+cage+uplf+strata(enum)+frailty(id),xmodel)
?
> head(xmodel)
id enum dtime status gender cage uplf
1 1008666 1 2259.1412037 1 MA 0.000 0
2 1008666 2 36.7495023 1 MA 2259.141 0
3 1008666
2018 Jan 18
1
Time-dependent coefficients in a Cox model with categorical variants
First, as others have said please obey the mailing list rules and turn of
First, as others have said please obey the mailing list rules and turn off html, not everyone uses an html email client.
Here is your code, formatted and with line numbers added. I also fixed one error: "y" should be "status".
1. fit0 <- coxph(Surv(futime, status) ~ x1 + x2 + x3, data = data0)
2. p
2012 Nov 15
2
survreg & gompertz
Hi all,
Sorry if this has been answered already, but I couldn't find it in the
archives or general internet.
Is it possible to implement the gompertz distribution as
survreg.distribution to use with survreg of the survival library?
I haven't found anything and recent attempts from my side weren't
succefull so far.
I know that other packages like 'eha' and