[R] plots: layout + subtitles
Hello, I want to create a figure that consists of a collection of 16 graphs on 4 rows. I am using nf - layout(matrix(seq(1,16), 4,4, byrow=TRUE), respect=TRUE) boxplot(... to create the layout of my 16 graphs. It works really well. However, I'd like to add sub-titles that would apply to each row of 4 graphs. More specifically, I'd like to have something like: subtitle 1 (centered) graph 1 graph 2 graph 3 graph 4 subtitle 2 (centered) graph 5 graph 6 graph 7 graph 8 subtitle 3 (centered) graph 9 graph 10 graph 11 graph 12 subtitle 4 (centered) graph 13 graph 14 graph 15 graph 16 in the same figure, to be saved as a ps file. Can somebody help? I hope this question is not redundant, but I have not found information on this on the R mailing lists. I use R 2.3.1 on Linux FC5. Thank you in advance. Marie-Pierre Sylvestre PhD student, McGill University __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Changing axis labels in plots of zph objects (survival analysis)
Hi, I am using the Survival package, more precisely the cox.zph function, to plot log(Hazard rate) over time. if I type plot(temp.zph[2]) then I get the plot I want. However, I want to change the label of the y axis that cox.zph prints. plot(temp.zph[2],xlab='Days', ylab='log hazard for Fast recovery cluster') then I get Error in plot.default(range(xx), yr, type = n, xlab = Time, ylab = ylab[i],: formal argument xlab matched by multiple actual arguments I don't understand because these ylab and xlab commands usually do the job! thanks in advance, M-P Sylvestre [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch 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] function ms
Dear R users, I am using the MICE package. Specifically, at some point in my code I have imp2=mice(PoptotalMICE,imputationMethod=logreg2) And R returns... iter imp variable 1 1 MICEYError in logitreg(xobs, yobs, intercept=F) : couldn't find function ms I have been looking for this ms function on the web, hoping it was just a matter of downloading a package. I didn't find anything. I have tried getAnywhere without success. What can it be? Where is the function ms? Thanks [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Error: subscript out of bounds
Hi I am running a simulation that involves a loop calling three 2 functions that I have written. Everything works fine when the inside of the loop is performed up to 1000 times (for (i in 1:750)). However, I sometimes get : ''Error: subscript out of bounds'' if I try to increase the loop 'size' to 1000. I am thinking it has to to with memory but I am not sure. I have increased my memory size to 512M but it does not solve my problem. It would take to much place to copy and paste my code here. It would be helpful if you could tell me whether my problem may or may not be related to memory size. Beside, what's the difference between Error: subscript out of bounds Error: subscript out of range ? Regards M-P Sylvestre [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] GLM for logistic regression and WEIGHTS
Hi all, I want to use weights for a logistic regression. In SAS, all I have to do is to specify my weight vector (they are fractions) and use proc logistic on my binary output. When I tried to do the same in R, I got an error message because my weights were not integer. I understand that the weight option in R is to be used when the dependent variable is a proportion so that the weight is the total from which this proportion is derived. So what should I do if I want to use logistic regression but want to use weight to give more importance to certain observations (e.g. weight=0.87) and less to others (e.g. weight=.45) ? Should I reparametrize everything in terms of counts or is there an easier way out? Thanks in advance M-P [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html