[R] R script in batch mode — Echoing messages to windows shell

2014-08-05 Thread Dominic Comtois
I have an R script which is to be run in batch mode from a Windows shell and I need to "echo" messages to this shell (reporting that this step has succeeded and that other failed, and so on). A combination of R CMD BATCH myscript.R con and options(echo=FALSE) is not really an option since I also n

[R] Forcing a reference category in logistic model

2012-09-14 Thread Dominic Comtois
Hello all, I am running a logistic model with a continuous variable as first predictor and factor variable as the second. I would like to include an interaction term in the following fashion: outcome ~ continous + factor + normalized(continuous):factor My problem is that when I do so, the re

[R] Regions of significance plots with ggplot2

2012-06-03 Thread Dominic Comtois
I'd like to create a plot similar to this one from Kochanska et al. (Development and Psychopathology, 2011): http://pages.videotron.com/do999/r-help/Kochanska_graph_ros.jpg I am new to ggplot2 and can't see any obvious way t

Re: [R] SAS Import with sas.get {Hmisc} - status 127 error

2012-03-28 Thread Dominic Comtois
igine- De : Phil Spector [mailto:spec...@stat.berkeley.edu] Envoyé : 28 mars 2012 21:15 À : Dominic Comtois Cc : r-help@r-project.org Objet : Re: [R] SAS Import with sas.get {Hmisc} - status 127 error I've found the keep,log=TRUE option of sas.get to be useful in cases like this. Ther

[R] SAS Import with sas.get {Hmisc} - status 127 error

2012-03-28 Thread Dominic Comtois
I'm trying to import a .sas7bdat dataset into R with sas.get. I'm using Win-7 and SAS 9.2. I have read the following post and did tweak the line (127, incidentally) of code. http://r.789695.n4.nabble.com/R

Re: [R] glm: getting the confidence interval for an Odds Ratio, when using predict()

2012-03-21 Thread Dominic Comtois
risks <- inv.logit(predict(model,newd)) risk.diff <- risks[2] - risks[1] Many thanks, Dominic C. 2012/3/20 Dominic Comtois > Case solved. Thanks a lot Peter! > > Dominic C. > > > -Message d'origine- > De : peter dalgaard [mailto:pda...@gmail.com] > Envo

Re: [R] glm: getting the confidence interval for an Odds Ratio, when using predict()

2012-03-20 Thread Dominic Comtois
Case solved. Thanks a lot Peter! Dominic C. -Message d'origine- De : peter dalgaard [mailto:pda...@gmail.com] Envoyé : 20 mars 2012 07:57 À : Dominic Comtois Cc : r-help@r-project.org help Objet : Re: [R] glm: getting the confidence interval for an Odds Ratio, when using pr

Re: [R] glm: getting the confidence interval for an Odds Ratio, when using predict()

2012-03-19 Thread Dominic Comtois
I apologize for the errors in the previous code. Here is a reworked example. It works, but I suspect problems in the se calculation. I changed, from the 1st prediction to the 2nd only one covariate, so that the OR's CI should be equal to the exponentiated variable's coefficient and ci. And we get s

Re: [R] glm: getting the confidence interval for an Odds Ratio, when using predict()

2012-03-19 Thread Dominic Comtois
Thanks for your answer, much appreciated. This ain't trivial indeed. I worked my way through it, until I got a "non conformable arguments" error when trying to calculate the new standard error. Since I'm not following 100% what's happening, it's hard for me to figure out what I should do next. He

[R] glm: getting the confidence interval for an Odds Ratio, when using predict()

2012-03-18 Thread Dominic Comtois
Say I fit a logistic model and want to calculate an odds ratio between 2 sets of predictors. It is easy to obtain the difference in the predicted logodds using the predict() function, and thus get a point-estimate OR. But I can't see how to obtain the confidence interval for such an OR. For exa

Re: [R] Sensitivity analysis - looking a tool for epidemiologic research

2012-01-31 Thread Dominic Comtois
: MacQueen, Don [mailto:macque...@llnl.gov] Envoyé : 30 janvier 2012 18:19 À : Dominic Comtois; r-help@r-project.org Objet : Re: [R] Sensitivity analysis - looking a tool for epidemiologic research R has several packages for epidemiology. Maybe one of them has it. Take a look. To name just two: "Epi&q

[R] Sensitivity analysis - looking a tool for epidemiologic research

2012-01-27 Thread Dominic Comtois
Stata users can rely on the very neat Episens package for sensitivity analysis. Briefly, it allows one to specify a diagnostic tool's sensitivity and specificity and take those into account when estimating a risk ratio, for instance. A full description of the package is available at

Re: [R] fUtilities removed --> use fBasics

2012-01-14 Thread Dominic Comtois
Thank you for your prompt and useful replies. I will be using fBasics from now on. Regards, Dominic Comtois, Montréal -Message d'origine- De : Martin Maechler [mailto:maech...@stat.math.ethz.ch] Envoyé : 14 janvier 2012 06:39 À : David Winsemius Cc : Dominic Comtois; r-h

[R] fUtilities removed

2012-01-13 Thread Dominic Comtois
When setting up my new machine, I had the surprise to see that "Package 'fUtilities' was removed from the CRAN repository." This is problematic for my work. I use many of its functions, and it will complicate things a lot if other programmers want to use my previous code in the future. Plus, no