Displaying 20 results from an estimated 2000 matches similar to: "Meaning of pterms in survreg object?"
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 =
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
2007 Apr 17
3
Extracting approximate Wald test (Chisq) from coxph(..frailty)
Dear List,
How do I extract the approximate Wald test for the
frailty (in the following example 17.89 value)?
What about the P-values, other Chisq, DF, se(coef) and
se2? How can they be extracted?
######################################################>
kfitm1
Call:
coxph(formula = Surv(time, status) ~ age + sex +
disease + frailty(id,
dist = "gauss"), data = kidney)
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
2006 Feb 28
1
ex-Gaussian survival distribution
Dear R-Helpers,
I am hoping to perform survival analyses using the "ex-Gaussian"
distribution.
I understand that the ex-Gaussian is a convolution of exponential and
Gaussian
distributions for survival data.
I checked the "survreg.distributions" help and saw that it is possible to
mix
pre-defined distributions. Am I correct to think that the following code
makes
the
2007 Oct 16
2
survreg's algorithm
Hi,
I'm using survreg() from the survival package for parametric survival
regression (modelling inter-arrival times of patients to a waiting list
as exponentially distributed, with various regressors such as queue size
and season).
Does anyone know which algorithm survreg() uses for this?
Thanks,
Gad
--
Gad Abraham
Department of Mathematics and Statistics
The University of Melbourne
2008 Jul 13
3
initialize a factor vector
What is the least surprising way of initializing a factor with
predefined levels and with length 0?
as.factor(c("eins", "zwei", "drei"))[FALSE]
does the job but looks a bit weird.
--
Johannes H?sing There is something fascinating about science.
One gets such wholesale returns of conjecture
mailto:johannes at
2008 Jul 02
1
Tobit Estimation with Panel Data
Hi all!
Do you know if there is any R function/package that can be used to
estimate "tobit" models with panel data (e.g. with random individual
effects)?
In economics, a "tobit" model is a model with a dependent variable that is
left-censored at zero. Hence, it is a special case of a survival model and
can be estimated using the "survival" package (see e.g.
2010 Sep 30
2
Sweave and LaTeX beamer class
I am failing to uncover Sweave chunks step by step using the LaTeX beamer
class.
The following minimal example:
\documentclass{beamer}
\usepackage{Sweave}
\begin{document}
\begin{frame}[fragile]
In the year \uncover<2->{25}\uncover<3->{\Sexpr{5*5}}
\uncover<4->{
<<echo=TRUE, print=TRUE>>=
5*5*101
@
}
\end{frame}
\end{document}
leads to an error message when
2010 Oct 25
2
Text wrapping in R
I am about to give an introduction to R to some clinical data managers
used to SAS. There is already a lot of material in printed form and
on the web that paves the way. What I haven't found so far are text
wrapping capabilities in setting tables in raw text as in SAS PROC
REPORT.
At the moment i would direct them at producing HTML output from R
and pipe the result through lynx. Coming from
2009 Mar 21
1
libRlapack.so not found
Whenever I try to load the Matrix package, I get the following error
message:
libRlapack.so: cannot open shared object file: No such file or directory
A file with that name is indeed not on the hard disk.
I am using the R version which comes with Ubuntu Hardy Heron LTS. Here
is the output of R.Version():
R.Version()
$platform
[1] "i486-pc-linux-gnu"
$arch
[1] "i486"
$os
[1]
2008 Jul 27
4
Object-oriented programming in R for Java programmers?
Hi,
I was wondering if anybody might have a reference for
me: My R code is growing and getting more and more
confusing. Thus, I figure it's time to switch to
object-oriented again. I have done oo programming in
C++ and Java before but the first few tutorial on R oo
were a bit confusing for me.
Is there any brief tutorial on oo programming in R
especially for people who have done oo in Java
2005 Oct 07
3
Converting PROC NLMIXED code to NLME
Hi,
I am trying to convert the following NLMIXED code to NLME, but am
running into problems concerning 'Singularity in backsolve'. As I am new
to R/S-Plus, I thought I may be missing something in the NLME code.
NLMIXED
***********
proc nlmixed data=kidney.kidney;
parms delta=0.03 gamma=1.1 b1=-0.003 b2=-1.2 b3=0.09 b4=0.35 b5=-1.43
varu=0.5;
eta=b1*age+b2*sex+b3*gn+b4*an+b5*pkn+u;
2010 Jun 28
6
Basic question - more efficient method than loop?
I'm guessing there's a more efficient way to do the following using the index
features of R. Appreciate any thoughts....
for (i in 1:nrow(dbs1)){
if(dbs1$Payor[i] %in% Payor.Group.Medicaid) dbs1$Payor.Group[i] =
"Medicaid"
if(dbs1$Payor[i] %in% Payor.Group.Medicare) dbs1$Payor.Group[i] =
"Medicare"
if(dbs1$Payor[i] %in% Payor.Group.Commercial)
2008 Dec 04
1
Formula parsing and updating
Hi all,
I can't come over a problem with formula. Suppose I have a coxmod model
with the following formula:
> somemod$formula
Surv(lebzeit, tot == 1) ~ sex + (alter >= 65) + diff3k + zelltyp_k_c +
q_nuc_3k + kar_k80_g80 + stadium
and I want to drop the stadium explanatory variable from the model with
> update(somemod, ". ~ . - stadium")
I get the following messages:
2007 Apr 23
3
fitting mixed models to censored data?
Hi,
I'm trying to figure out if there are any packages allowing
one to fit mixed models (or non-linear mixed models) to data
that includes censoring.
I've done some searching already on CRAN and through the mailing
list archives, but haven't discovered anything. Since I may well
have done a poor job searching I thought I'd ask here prior to
giving up.
I understand that
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,
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
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:
>
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