[R] StepAIC with coxph

2004-11-02 Thread Neil Leonard
Hi, I'm having a bit of trouble with using StepAIC with a coxph model. Can anybody tell me if there is anything wrong with what I am doing here (I've removed a few of the variables for the purpose of this email, I had about 20 before): start-

[R] Survival Analysis Table

2004-11-01 Thread Neil Leonard
Hi, I am trying to compute a table of a Kaplan Meier survival function. I have created the Kaplan Meier using: field.KM - survfit(Surv(project_no_1983$entryage3,project_no_1983$age_at_death,proj ect_no_1983$death)~1) and I want to find the survival rate and confidence intervals at different

[R] Recode variable as NA

2004-10-30 Thread Neil Leonard
Hi, I was wondering how I would recode a variable as being NA (or missing). Thanks Neil __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] History command

2004-10-26 Thread Neil Leonard
I was wondering whether there is a command in R similar to the '!' command in unix. Thanks Neil __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] Replacing data from one data frame to another

2004-10-19 Thread Neil Leonard
Hi, I have a data frame which contains two fields, 'prev' and 'mchnum'. I have another data frame which also contains 'mchnum' and 'prev' and some other fields. The 'prev' data in this field is corrupted and I want to replace it with the data from the other data frame for matching values of

[R] Recoding factors

2004-10-18 Thread Neil Leonard
I'm having a bit of trouble recoding factors in a fields. I have a field which has the factors Singleton, Twin and Triplet. I want to recode the field to have only the factors Singleton and Multiple. Any advice? Cheers, Neil __ [EMAIL PROTECTED]

Re: [R] Recoding factors

2004-10-18 Thread Neil Leonard
I want Twin and Triplet to both be recoded as Multiple Neil On 18/10/2004, at 7:43 PM, Uwe Ligges wrote: Neil Leonard wrote: I'm having a bit of trouble recoding factors in a fields. I have a field which has the factors Singleton, Twin and Triplet. I want to recode the field to have only

Re: [R] Recoding factors

2004-10-18 Thread Neil Leonard
Yes that's it. Thanks Neil On 18/10/2004, at 7:57 PM, Prof Brian Ripley wrote: On Mon, 18 Oct 2004, Uwe Ligges wrote: Neil Leonard wrote: I'm having a bit of trouble recoding factors in a fields. I have a field which has the factors Singleton, Twin and Triplet. I want to recode the field to have

[R] Cox PH Warning Message

2004-10-16 Thread Neil Leonard
Hi, Can anybody tell me what the message below means and how to overcome it. Thanks, Neil Warning message: X matrix deemed to be singular; variable 2 in: coxph(Surv(age_at_death, death) ~ project$pluralgp + project$yrborn + . __ [EMAIL

Re: [R] Cox PH Warning Message

2004-10-16 Thread Neil Leonard
This is the output. I think it means that there is a problem with project$pluralgpTriplet??? Neil fm.CPH Call: coxph(formula = Surv(age_at_death, death) ~ project$pluralgp + project$yrborn + project$private + project$pcdead + project$mheight + project$ga2 + project$apgcode +

[R] Adding factor variable to a CoxPH

2004-10-08 Thread Neil Leonard
I think this is a pretty basic statistic question: If I have a variable which has 4 factors how can I add it to a coxph model? I have other variables added which have digits 1-4 instead of four factors. If I recode the variable will that work? Thanks Neil

[R] Remove Indeterminate Level

2004-10-07 Thread Neil Leonard
Hi, I have imported some data to R from stata and my factor variables have an Indeterminate level which I don't really want. For example the variable sex has the levels Male, Female and Indeterminate. There are no 'Indeterminate' values in the data. Can somebody tell me how to get rid of this

[R] Printing output on Plot

2004-09-02 Thread Neil Leonard
Hi, I'm trying to print the p-values from the output of a CPH test onto a Kaplan Meier plot. Can this be done? I only really want the p-values from the CPH test to appear but if this can't be done I am willing to have the entire CPH output. This is what I am currently trying: (it doesn't

[R] Keyboard input into functions

2004-08-26 Thread Neil Leonard
Hi, Does anybody know if it is possible to have keyboard input into functions? Kind of like 'scanf()' in C. I want to write a function that asks me what to put in certain variables. Thanks, Neil __ [EMAIL PROTECTED] mailing list

[R] Adding labels to variables

2004-08-24 Thread Neil Leonard
Hi, Is it possible to add labels to variables in R (so as to have a better description of what the variables represent)? Thanks, Neil __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!