search for: kalpan

Displaying 1 result from an estimated 1 matches for "kalpan".

Did you mean: kalman
2009 Apr 24
3
Help with for/if loop
I have a set of data that includes various data columns. One if the survival time and another if a continuous variable of ages. I want to put the ages into intervals so that I can then perform the Kalpan Meier test. I am trying to use the following code to build a column with the age group numbers in agecatagory<-c( ) for (i in 1:137) { { if(age[i]<=46) {agecat[i]<-1} if(age[i]>46 & age[i]<= 58) {agecat[i]<-2} if(age[i]>58) {agecat[i]<-3} } agecatagory<-c(agecatago...