search for: survival_data_variables

Displaying 3 results from an estimated 3 matches for "survival_data_variables".

2012 Oct 17
2
loop of quartile groups
...1=factor(brks, labels=1:4) However, I cannot get a loop to work nor can I get a loop to add the columns with an appropriate name (ex. quartile_variable). I have tried multiple different ways but can't seem to get it to work. I think it would begin something like this: for(i in 11:ncol(survival_data_variables)){ brks=as.data.frame(with(survival_data_variables, cut2(survival_data_variables[,i], g=4))) Any assistance would be sincerely appreciated. I would like the final data set to have the following layout: ID var1 var2 var3 var4 quartile var1 quart...
2012 Oct 18
1
looping survdiff?
Hello, I am trying to set up a loop that can run the survdiff function with the ultimate goal to generate a csv file with the p-values reported. However, whenever I try a loop I get an error such as "invalid type (list) for variable 'survival_data_variables[i]". This is a subset of my data: structure(list(time = c(1.51666666666667, 72, 72, 25.7833333333333, 72, 72, 72, 72, 72, 72, 1.18333333333333, 0.883333333333333, 1.15, 0.866666666666667, 72, 1.03333333333333, 72, 1.05, 72, 22.7666666666667), group = c(2L, 1L, 3L, 3L, 3L, 4L, 4L, 1L, 3L, 3L,...
2012 Oct 19
1
Looping survdiff
...t at r-project.org wrote: > Hello, > > I am trying to set up a loop that can run the survdiff function with the > ultimate goal to generate a csv file with the p-values reported. However, > whenever I try a loop I get an error such as "invalid type (list) for > variable 'survival_data_variables[i]". > > This is a subset of my data: > > structure(list(time = c(1.51666666666667, 72, 72, 25.7833333333333, > 72, 72, 72, 72, 72, 72, 1.18333333333333, 0.883333333333333, > 1.15, 0.866666666666667, 72, 1.03333333333333, 72, 1.05, 72, > 22.7666666666667), group = c(2L, 1L...