Re: [R] extracting from data.frames for survival analysis

2012-01-27 Thread Terry Therneau
--- begin included message --- ... I am trying to perform survival analysis but continually get errors when extracting from this data.frame: attempt 1: > X <- Surv(B27.vec$AgeOn,B27.vec$UV) > survdiff(X,rho=0,data=uvf) Error in x$terms : $ operator is invalid for atomic vectors ... - end

Re: [R] extracting from data.frames for survival analysis

2012-01-26 Thread Gerrit Eichner
Hi, Philip, counter-questions: 1. Which/where is the grouping variable for the test of differences in survival? 2. Assume the grouping variable is Gend in B27.vec. Then, why aren't you using survdiff( Surv( AgeOn, UV) ~ Gend, rho = 0, data = B27.vec) ? Hth -- Gerrit On Thu, 26 Jan 2012

[R] extracting from data.frames for survival analysis

2012-01-26 Thread Philip Robinson
Hi, I have a data frame: > class(B27.vec) [1] "data.frame" > head(B27.vec) AGE Gend B27 AgeOn DD uveitis psoriasis IBD CD UC InI BASDAI BASFI Smok UV 1 571 119 38 2 1 1 1 1 1 5.40 8.08 NA 1 2 351 133 2 2 1 1 1 1 1 1.69 2.