[R] help with probabilites in cph

2011-05-13 Thread viostorm
I would like to get the probabilities from cph into a vector so I can put them programatically on a graph. Does anyone know how to get a list of the probabilities? All I can seem to do is $coef which only contains coefficients. cph(formula = srv.comb ~ collaterals +

Re: [R] Hosmer-Lemeshow 'goodness of fit'

2011-05-08 Thread viostorm
Again, thanks so much for your help. Is there a "for dummies" version for interpreting the le Cessie and Houwelingen test. I read the 1991 biometrics paper but honestly got lost in the math. Is it interpreted the same way the Hosmer-Lemeshow test is? ie, a non-significant result means model fit

[R] Hosmer-Lemeshow 'goodness of fit'

2011-05-08 Thread viostorm
I'm trying to do a Hosmer-Lemeshow 'goodness of fit' test on my logistic regression model. I found some code here: http://sas-and-r.blogspot.com/2010/09/example-87-hosmer-and-lemeshow-goodness.html The R code is above is a little complicated for me but I'm having trouble with my answer: Hosmer-

Re: [R] recommendation on B for validate.lrm () ?

2011-05-08 Thread viostorm
Thanks so much for the reply it was exceptionally helpful! A couple of questions: 1. I was under the impression that k-fold with B=10 would train on 9/10, validate on 1/10, and repeat 10 times for each different 1/10th. Is this how the procedure works in R? 2. Is the reason you recommend repea

[R] recommendation on B for validate.lrm () ?

2011-04-30 Thread viostorm
I have a logistic regression model I'm trying to do k-fold cross validation on. The number of observations is approximately 550 and an event rate of about 30% Does anyone have a recommendation for a B value to use for this data set? -- View this message in context: http://r.789695.n4.nabble.co

Re: [R] fisher exact for > 2x2 table

2011-04-29 Thread viostorm
or Fisher's exact test on unordered r x c contingency tables. ACM Transactions on Mathematical Software 1986;12:154-61. The only reason I ask again is he is exceptionally clear on this point. Thanks again, -Rob viostorm wrote: > > Thank you all

Re: [R] fisher exact for > 2x2 table

2011-04-28 Thread viostorm
Thank you all very kindly for your help. -Rob Robert Schutt III, MD, MCS Resident - Department of Internal Medicine University of Virginia, Charlottesville, Virginia -- View this message in context: http://r.789695.n4.nabble.com/fisher-exact-for-2x2-table-tp

Re: [R] fisher exact for > 2x2 table

2011-04-28 Thread viostorm
I have read the help page, or at least ?fisher.exact I looked a bit on the Internet I guess it is applicable to > 2x2. I had spoken to a biostatistician here who is quite excellent and was adamant with me I could not do > 2x2. I found this: http://mathworld.wolfram.com/FishersExactTest.html D

[R] fisher exact for > 2x2 table

2011-04-28 Thread viostorm
I'm using fisher.exact on a 4x2 table and it seems to work. Does anyone know exactly what is going on? I thought fisher.exact is only for 2x2 tables. Note: I can't use chi-squared because I have a couple of cells with 0 and < 5 observations. -- View this message in context: http://r.789695

Re: [R] help with "\" in strings

2011-04-24 Thread viostorm
Josh, Thank you so much!!! Works perfectly! -Rob Robert Schutt III, MD, MCS Resident - Department of Internal Medicine University of Virginia, Charlottesville, Virginia -- View this message in context: http://r.789695.n4.nabble.com/help-with-in-strings-tp3470

[R] help with "\" in strings

2011-04-23 Thread viostorm
I would like to create a "\%" that can be written to a file as I am writing a procedure to output to latex. I can't create a "\%" and it is driving me crazy. -- x = "This is a test % string" gsub ("%", "\\%", x) fileConn<-file("c:/biostats/test.txt") writeLi