Displaying 20 results from an estimated 3000 matches similar to: "survreg.distributions() error"
2012 Apr 25
2
comparison of bivariate normal distributions
sorry for cross-posting
Dear all,
I have tow (several) bivariate distributions with a known mean and variance-covariance structure (hence a known density function) that I would like to compare in order to get an intersect that tells me something about "how different" these distributions are (as t-statistics for univariate distributions).
In order to visualize what I mean hear a little
2006 Jun 06
1
Problems using quadprog for solving quadratic programming problem
Hi,
I'm using the package quadprog to solve the following quadratic programming problem.
I want to minimize the function
(b_1-b_2)^2+(b_3-b_4)^2
by the following constraints b_i, i=1,...,4:
b_1+b_3=1
b_2+b_4=1
0.1<=b_1<=0.2
0.2<=b_2<=0.4
0.8<=b_3<=0.9
0.6<=b_4<=0.8
In my opinion the solution should be b_1=b_2=0.2 und b_3=b_4=0.8.
Unfortunately R doesn't find
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
2005 Apr 22
0
defining custom survreg distributions
Dear R Helpers,
I am trying to carry out survival analysis in the presence of long term
survivors (immunes/cureds). This involves using a split population model
(some call it a mixture model) where the assumption of eventual failure is
relaxed. I am following closely the formulation by Maller and Zhou (1996).
Parametric modelling in this situation involves the introduction of a new
2005 May 03
2
comparing lm(), survreg( ... , dist="gaussian") and survreg( ... , dist="lognormal")
Dear R-Helpers:
I have tried everything I can think of and hope not to appear too foolish
when my error is pointed out to me.
I have some real data (18 points) that look linear on a log-log plot so I
used them for a comparison of lm() and survreg. There are no suspensions.
survreg.df <- data.frame(Cycles=c(2009000, 577000, 145000, 376000, 37000,
979000, 17420000, 71065000, 46397000,
2006 Mar 24
0
Random covariate in survreg (Survival)
Dear R Listers-
I am attempting to analyse the survival of seeds in cages
(exclosures) that differ in their permeability to rainforest mammals.
Because I did not observe the moment of seed disappearance, my data
is interval censored. This limits my options for analysis (as I
understand it) to survreg, in the survival package. Because I
repeated the experiment in 8 sites, I have a random
2007 Nov 29
1
Survreg(), Surv() and interval-censored data
Can anybody give me a neat example of interval censored data analysis codes in R?
Given that suvreg(Surv(c(1,1,NA,3),c(2,NA,2,3),type="interval2")~1)
works why does
survreg(Surv(data[,1],data[,2],type="interval2")~1)
not work where
data is :
T.1 T.2 Status
1 0.0000000 0.62873036 1
2 0.0000000 2.07039068 1
3 0.0000000
2006 Apr 26
0
left-truncation in survreg
Dear R-users,
I know that a few people have asked whether survreg handles left-truncation
data and the reply that i have seen so far is that it does.
However, when I try to use survreg on left-truncated data, I got the
following error message.
> survcs3<-survreg(Surv(start,end,status)~AG, data=DPONEcs3,
dist="exponential")
Error in survreg(Surv(start, end, status) ~ AG, data =
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
2010 Mar 19
0
Different results from survreg with version 2.6.1 and 2.10.1
---------------------------- Original Message ----------------------------
Subject: Different results from survreg with version 2.6.1 and 2.10.1
From: nathalcs at ulrik.uio.no
Date: Fri, March 19, 2010 16:00
To: r-help at r-project.org
--------------------------------------------------------------------------
Dear all
I'm using survreg command in package survival.
2005 Oct 20
0
survreg anova: problem with indirect invocation
Dear R help,
I've encountered a problem with survreg's anova(). I am currently
writing general code to fit a variety of models using different fitting
functions. Here's a simple example of what I'm trying to do:
---begin code---
# general function to analyse data
analyse.data <- function(formula, FUN, data, ...)
{
fit <- FUN(formula, data=data, ...)
anova(fit)
2009 Jun 07
1
Survreg function for loglogistic hazard estimation
I am trying to use R to do loglogistic hazard estimation. My plan is to
generate a loglogistic hazard sample data and then use survreg to estimate
it. If everything is correct, survreg should return the parameters I have
used to generate the sample data.
I have written the following code to do a time invariant hazard estimation.
The output of summary(modloglog) shows the factor loading of
2005 Nov 18
1
Truncated observations in survreg
Dear R-list
I have been trying to make survreg fit a normal regression model with left
truncated data, but unfortunately I am not able to figure out how to do it.
The following survreg-call seems to work just fine when the observations are
right censored:
library(survival)
n<-100000
#censored observations
x<-rnorm(n)
y<-rnorm(n,mean=x)
d<-data.frame(x,y)
d$ym<-pmin(y,0.5)
2004 Apr 06
0
Extracting the survival function estimate from a survreg object.
Hello all,
I want to extract the survival function estimate from a model fitted by survreg().
Using predict.survreg(..., type="quantile", p=seq(0,1,0.001)), gives the quantiles, which
I managed to turn around into a survival function estimate (Prob{T > t} as function of t).
Is there a more straightforward way of doing this? I have had difficulties using pweibull() with
the
2009 Mar 08
2
survreg help in R
Hey all,
I am trying to use the survreg function in R to estimate the mean and
standard deviation to come up with the MLE of alpha and lambda for the
weibull distribution. I am doing the following:
times<-c(10,13,18,19,23,30,36,38,54,56,59,75,93,97,104,107,107,107)
censor<-c(1,0,0,1,0,1,1,0,0,0,1,1,1,1,0,1,0,0)
survreg(Surv(times,censor),dist='weibull')
and I get the following
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
2011 Dec 07
1
survreg() provides same results with different distirbutions for left censored data
Hello,
I'm working with some left censored survival data using accelerated failure
time models. I am interested in fitting different distributions to the data
but seem to be getting the same results from the model fit using survreg
regardless of the assumed distribution.
These two codes seem to provide the same results:
aft.gaussian <-
2002 Nov 14
0
survreg (survival) reports erroneous results for left-censored (PR#2291)
On Wed, 13 Nov 2002, Jan de Leeuw wrote:
>
> No problemo. And, in fact, I get the same results in
> the R-1.6.0 Carbon version.
I don't. Could there be a G3/G4 issue?
-thomas
> --- Jan
>
> On Wednesday, November 13, 2002, at 02:05 PM, tim@timcohn.com wrote:
>
> > Full_Name: Tim Cohn
> > Version: 1.6.1
> > OS: Macintosh OS X
> > Submission
2010 Nov 15
1
interpretation of coefficients in survreg AND obtaining the hazard function
1. The weibull is the only distribution that can be written in both a
proportional hazazrds for and an accelerated failure time form. Survreg
uses the latter.
In an ACF model, we model the time to failure. Positive coefficients
are good (longer time to death).
In a PH model, we model the death rate. Positive coefficients are
bad (higher death rate).
You are not the first to be confused
2009 May 27
1
Full likelihood from survreg
R users,
I am making model selection with an accelerated failure time model using the
command survreg within the library survival.
As I want to compare models with different probability distributions I need
to have the full likelihood.
How can I find out what survreg generates: the full likelihood or a
likelihood with "unnecessary" constants dropped?
Example I want to