Displaying 4 results from an estimated 4 matches for "r_tingley".
2008 Jun 07
1
expected risk from coxph (survival)
Hello,
When I try to to obtain the expected risk for a new dataset using coxph in the survival package I get an error. Using the example from ?coxph:
> test1 <- list(time= c(4, 3,1,1,2,2,3),+ status=c(1,NA,1,0,1,1,0),+ x= c(0, 2,1,1,1,0,0),+ sex= c(0, 0,0,0,1,1,1))> cox<-coxph( Surv(time, status) ~ x + strata(sex), test1)
2010 Nov 19
4
calculating martingale residual on new data using "predict.coxph"
Hi list,
I was trying to use "predict.coxph" to calculate martingale residuals on a test
data, however, as pointed out before
http://tolstoy.newcastle.edu.au/R/e4/help/08/06/13508.html
predict(mycox1, newdata, type="expected") is not implemented yet. Dieter
suggested to use 'cph' and 'predict.Design', but from my reading so far, I'm not
sure they can
2010 Nov 24
0
4. Rexcel (Luis Felipe Parra)-how to run a code from excel
...org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
------------------------------
Message: 21
Date: Mon, 22 Nov 2010 08:11:15 -0600
From: Terry Therneau <therneau at mayo.edu>
Cc: r-help at r-project.org, dieter.menne at menne-biomed.de,
r_tingley at hotmail.com
Subject: Re: [R] calculating martingale residual on new data using
"predict.coxph"
Message-ID: <1290435075.7350.3.camel at punchbuggy>
Content-Type: text/plain
This feature has been added in survival 2.36-1, which is now on CRAN.
(2.36-2 should appear in another da...
2008 Jun 06
6
Subsetting to unique values
I want to take the first row of each unique ID value from a data frame.
For instance
> ddTable <-
data.frame(Id=c(1,1,2,2),name=c("Paul","Joe","Bob","Larry"))
I want a dataset that is
Id Name
1 Paul
2 Bob
> unique(ddTable)
Will give me all 4 rows, and
> unique(ddTable$Id)
Will give me c(1,2), but not accompanied by the name column.