Displaying 20 results from an estimated 3000 matches similar to: "frailty models in survreg() -- survival package (PR#2933)"
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
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 Feb 27
2
interval-censored data in survreg()
I am trying to fit a lognormal distribution on interval-censored
data. Some of my intervals have a lower bound of zero.
Unfortunately, it seems like survreg() cannot deal with lower
bounds of zero, despite the fact that plnorm(0)==0 and
pnorm(-Inf)==0 are well defined. Below is a short example to
reproduce the problem.
Does anyone know why survreg() must behave that way?
Is there an alternate
2003 Aug 07
2
segmentation fault: formula() with long variable names (PR#3680)
R version: 1.7.1
OS: Red Hat Linux 7.2
In this example, I would expect an error for the overly long variable
name. This is always reproducable for me.
> formula(paste("y~",paste(rep("x",50000),collapse="")))
Segmentation fault
Sincerely,
Jerome Asselin
--
Jerome Asselin (Jérôme), Statistical Analyst
British Columbia Centre for Excellence in HIV/AIDS
St.
2003 Aug 08
1
covmat argument in princomp() (PR#3682)
R version: 1.7.1
OS: Red Hat Linux 7.2
When "covmat" is supplied in princomp(), the output value "center" is all
NA's, even though the input matrix was indeed centered. I haven't read
anything about this in the help file for princomp(). See code below for an
example: pc2$center is all NA's.
Jerome Asselin
x <- rnorm(6)
y <- rnorm(6)
X <- cbind(x,y)
2003 Jul 04
0
degrees of freedom in nlme() (PR#2384)
I would like to document my findings (with a potential FIX) regarding the
issue of calculation of the degrees of freedom with nlme().
The program given at the bottom of this email generates and fit 20 data
sets with a mixed-effects LINEAR model, but using the function nlme()
instead of lme(). In each case, the correct number of degrees of freedom
for the intercept parameter is 12. However, in
2003 May 21
1
axis() default values for "lty", "lwd", and "col"
Hi,
I would like to recommend a minor modification in axis() which I believe
can simplify the making of plots for publications. I am trying to define
default values for par() in order to make labels bigger and lines thicker,
so that the resulting plots look good when resized for publication
purposes. I ran into the following problem...
axis() does not use par() values as default for
2003 May 20
1
legend() with option adj=1
Hi there,
I want to justify to right the text of my legend. Consider this short
reproducable example.
x <- 1:5
y1 <- 1/x
y2 <- 2/x
plot(rep(x,2),c(y1,y2),type="n",xlab="x",ylab="y")
lines(x,y1)
lines(x,y2,lty=2)
legend(5,2,c("1,000","1,000,000"),lty=1:2,xjust=1,yjust=1)
2003 Aug 30
3
fisher.test() gives wrong confidence interval (PR#4019)
The problem occurs when the sample odds ratio is Inf, such as in the
following example. Given the fact that both upper bounds of the two 95%
confidence intervals are Inf, I would have expected that the two lower
bounds be equal, but they aren't.
x <- matrix(c(9,4,0,2),2,2)
x
# [,1] [,2]
#[1,] 9 0
#[2,] 4 2
rbind("two.sided.95CI"=fisher.test(x)$conf.int,
2003 Aug 07
2
model.frame() call from inside a function (PR#3671)
R version: 1.7.1
OS: Red Hat Linux 7.2
Hi all,
The formula object in model.frame() is not retrieved properly when
model.frame() is called from within a function and the "subset" argument
is supplied.
foo <- function(formula,data,subset=NULL)
{
cat("\n*****Does formula[-3] == ~y ?**** TRUE *****\n")
print(formula[-3] == ~y)
cat("\n*****Result of model.frame()
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
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
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,
2005 Jan 06
0
Parametric Survival Models with Left Truncation, survreg
Hi,
I would like to fit parametric survival models to time-to-event data
that are left truncated. I have checked the help page for survreg and
looked in the R-help archive, and it appears that the R function survreg
from the survival library (version 2.16) should allow me to take account
of left truncation. However, when I try the command
2003 Aug 04
1
coxph and frailty
Hi:
I have a few clarification questions about the elements returned by
the coxph function used in conjuction with a frailty term.
I create the following group variable:
group <- NULL
group[id<50] <- 1
group[id>=50 & id<100] <- 2
group[id>=100 & id<150] <- 3
group[id>=150 & id<200] <- 4
group[id>=200 & id<250] <- 5
group[id>=250
2011 Sep 20
0
Using method = "aic" with pspline & survreg (survival library)
Hi everybody. I'm trying to fit a weibull survival model with a spline
basis for the predictor, using the survival library. I've noticed that it
doesn't seem to be possible to use the aic method to choose the degrees of
freedom for the spline basis in a parametric regression (although it's
fine with the cox model, or if the degrees of freedom are specified directly
by the user),
2005 May 31
1
Shared Frailty in survival package (left truncation, time-dep. covariates)
Dear list,
I want o fit a shared gamma frailty model with the frailty specification in the survival package.
I have partly left-truncated data and time-dependent covariates. Is it possible to
combine these two things in the frailty function. Or are the results wrong if I use data in the start-stop-formulation which account for delayed entry?
Is the frailty distribution updated in the
2007 Jan 22
0
predict.survreg() with frailty term and newdata
It can't be done with the current code.
In a nutshell, you are trying to use a feature that I never got around to
coding. It's been on my "to do" list, but may never make it to the top.
Terry
2011 Apr 08
1
Variance of random effects: survreg()
I have the following questions about the variance of the random effects in the survreg() function in the survival package:
1) How can I extract the variance of the random effects after fitting a model?
For example:
set.seed(1007)
x <- runif(100)
m <- rnorm(10, mean = 1, sd =2)
mu <- rep(m, rep(10,10))
test1 <- data.frame(Time = qsurvreg(x, mean = mu, scale= 0.5, distribution =
2006 Aug 02
0
expected survival from a frailty cox model using survfit
Hello R users
Would somebody know how to estimate survival from a frailty cox model,
using the function survfit
and the argument newdata ? (or from any other way that could provide
individual expected survival
with standard error); Is the problem related to how the random term is
included in newdata ?
kfitm1 <- coxph(Surv(time,status) ~ age + sex + disease + frailty(id,