similar to: need help with avg.surv (Direct Adjusted Survival Curve), Message-ID:

Displaying 20 results from an estimated 500 matches similar to: "need help with avg.surv (Direct Adjusted Survival Curve), Message-ID:"

2012 Apr 29
0
need help with avg.surv (Direct Adjusted Survival Curve)
Hello R users,  I am trying to obtain a direct adjusted survival curve. I am sending my whole code (see below). It's basically the larynx cancer data with Stage 1-4. I am using the cox model using coxph option, see the fit3 coxph. When I use the avg.surv option on fit3, I get the following error: "fits<-avg.surv(fit3, var.name="stage.fac", var.values=c(1,2,3,4), data=larynx)
2010 Jun 18
1
ow to apply a panel function to each of several data series plotted on the same graph in lattice
Hi is it possible to fit a trend line (or some other panel function) through each of multiple data series plotted on the same graph? Specifically, while one can do something like xyplot(a+b+c~x) which plots three series, a,b & c, but can one automatically fit lines through each of them? I suppose one could generate three more variables afit, bfit, and cfit with a model & predict and
2009 Apr 24
2
prediction intervals (alpha and beta) for model average estimates from binomial glm and model.avg (library=dRedging)
Hi all, I was wondering if there is a function out there, or someone has written code for making confidence intervals around model averaged predictions (y~á+âx). The model average estimates are from the dRedging library? It seems a common thing but I can't seem to find one via the search engines Examples of the models are: fit1 <- glm(y~ dbh, family = binomial, data = data) fit2 <-
2001 May 23
1
Passing a string variable to Surv
Hi, I am trying to write a function to automate multiple graph generation. My data looks like: Table of numeric values with the following headers: timeM1 statusM1 xM1 timeM2 statusM2 xM2 timeM3 statusM3 xM3 1 2 3 4 5 6 Where M1,M2, M3 hve no similarity except they have a max string length of 7. Examples are mcw0045, adl0003, lei0101. Now, what I want to do is Function(M1, M2,
2013 Sep 26
0
ConstrOptim Function (Related to Constraint Matrix/ui/ci error)
Hello All, I am stuck in the following problem. Cexpt=c(0,25,50,100,150,300,250,125,40) t=c(0,0.2,0.4,0.6,1,4,8,12,24) theta0= vector of 6 parms (My initial parameter) A=Constraint matrix (hopefully 6*6) B= Constraint vector of length 6) Cfit=function(t,theta){ J(t)=function(theta,t) Cfit=function(J(t),constant) return(Cfit) } loss=function(theta,t,Cexpt) {
2006 Jul 22
2
(no subject)
hi i created two files in excel with a dbf format in a similar way. the first is opened in R, however, when i try to open the second. i received the following message: sites.can <- read.csv("SITES.csv") Error in read.table(file = file, header = header, sep = sep, quote = quote, : more columns than column names > The second file works with the same command
2007 Sep 14
1
Calculate the angles for a point dataset?
Dear Rusers, I'd like to take the cases of cancer of the larynx in chorley(spatstat) to explain my question. I want to join the points of cancer of the larynx with the disused industrial incinerator to generate lines, and then calculate the angles of these line comparing the horizontal line? How can i get it? It seems to be difficult to get the angles Thanks a lot. -- With Kind
2009 Mar 26
0
(Interpretation) VGAM - FRECHET 3 parameters by maximum likelihood estimation for
Dear R Helpers This is the R code (which I have slightly changed) I got in VGAM package for estimating the parameters of FRECHET. _________________________________________________________________ y = rfrechet(n <- 100, shape=exp(exp(0))) # (A) fit3 = vglm(y ~ 1, frechet3(ilocation=0), trace=TRUE, maxit=155) # (B) coef(fit3, matrix=TRUE) # (C)
2012 Feb 07
2
Actual vs. predicted survival times
Dear R-help, I am using R 2.14.1 on Windows 7. I would like to produce a plot like the attached - although simplified to actual vs. Predicted survival time with distinguishing marks for censored and observed points. I have a dataset and have fitted a Cox model to it. In an attempt to visualise how accurate the model is it would be ideal if I could plot the actual survival times against the
2006 Sep 25
2
rpart
Dear r-help-list: If I use the rpart method like cfit<-rpart(y~.,data=data,...), what kind of tree is stored in cfit? Is it right that this tree is not pruned at all, that it is the full tree? If so, it's up to me to choose a subtree by using the printcp method. In the technical report from Atkinson and Therneau "An Introduction to recursive partitioning using the rpart
2012 Jun 05
1
model.frame and predvars
I was looking at how the model.frame method for lm works and comparing it to my own for coxph. The big difference is that I try to retain xlevels and predvars information for a new model frame, and lm does not. I use a call to model.frame in predict.coxph, which is why I went that route, but never noted the difference till now (preparing for my course in Nashville). Could someone shed light
2013 Apr 09
2
R crash
I have a generalized linear model to solve. I used package "geepack". When I use the correlation structure "unstructured", I get a messeage that- R GUI front-end has stopped working. Why this happens? What is the solution? The r codes are as follows: a<-read.table("d:/bmt.txt",header=T")
2009 May 12
1
questions on rpart (tree changes when rearrange the order of covariates?!)
Greetings, I am using rpart for classification with "class" method. The test data is the Indian diabetes data from package mlbench. I fitted a classification tree firstly using the original data, and then exchanged the order of Body mass and Plasma glucose which are the strongest/important variables in the growing phase. The second tree is a little different from the first one. The
2007 May 01
1
Levels attribute in integer columns created by model.frame()
The following is evidence of what is surely an undesirable feature. The issue is the handling, in calls to model.frame(), of an explanatory variable that has been derived as an unclassed factor. (Ross Darnell drew this to my attention.) ## Data are slightly modified from p.191 of MASS > worms <- data.frame(sex=gl(2,6), Dose=factor(rep(2^(0:5),2)), +
2005 Apr 23
1
question about about the drop1
the data is : >table.8.3<-data.frame(expand.grid( marijuana=factor(c("Yes","No"),levels=c("No","Yes")), cigarette=factor(c("Yes","No"),levels=c("No","Yes")), alcohol=factor(c("Yes","No"),levels=c("No","Yes"))), count=c(911,538,44,456,3,43,2,279))
2009 Jul 28
2
A hiccup when using anova on gam() fits.
I stumbled across a mild glitch when trying to compare the result of gam() fitting with the result of lm() fitting. The following code demonstrates the problem: library(gam) x <- rep(1:10,10) set.seed(42) y <- rnorm(100) fit1 <- lm(y~x) fit2 <- gam(y~lo(x)) fit3 <- lm(y~factor(x)) print(anova(fit1,fit2)) # No worries. print(anova(fit1,fit3)) # Likewise. print(anova(fit2,fit3)) #
2009 May 22
1
bug in rpart?
Greetings, I checked the Indian diabetes data again and get one tree for the data with reordered columns and another tree for the original data. I compared these two trees, the split points for these two trees are exactly the same but the fitted classes are not the same for some cases. And the misclassification errors are different too. I know how CART deal with ties --- even we are using the
2018 Jan 17
1
Assessing calibration of Cox model with time-dependent coefficients
I am trying to find methods for testing and visualizing calibration to Cox models with time-depended coefficients. I have read this nice article <http://journals.sagepub.com/doi/10.1177/0962280213497434>. In this paper, we can fit three models: fit0 <- coxph(Surv(futime, status) ~ x1 + x2 + x3, data = data0) p <- log(predict(fit0, newdata = data1, type = "expected")) lp
2005 Jun 15
1
anova.lme error
Hi, I am working with R version 2.1.0, and I seem to have run into what looks like a bug. I get the same error message when I run R on Windows as well as when I run it on Linux. When I call anova to do a LR test from inside a function, I get an error. The same call works outside of a function. It appears to not find the right environment when called from inside a function. I have provided
2010 Jul 31
2
Is profile.mle flexible enough?
Hi the list, I am experiencing several issues with profile.mle (and consequently with confint.mle) (stat4 version 2.9.2), and I have to spend a lot of time to find workarounds to what looks like interface bugs. I would be glad to get feedback from experienced users to know if I am really asking too much or if there is room for improvement. * Problem #1 with fixed parameters. I can't