Infinite loop running Mod_R/Rapache

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Infinite loop running Mod_R/Rapache

BJ-5
I installed mod_r according to the specifications, and have been trying
to get the demo script to work correctly. I am running debian, the
latest build of R, apache 2 with prefork mpm, and the latest mod_r. Is
anyone else using this module successfully? I added:

LoadModule R_module mod_R.so
<Location /test/hello>
    SetHandler r-handler
    Rsource /var/www/html/test.R
    RreqHandler handler
</Location>

to my http.conf and

test.R in /var/www/html is:

handler<-function(r){
    apache.write(r,"<h1>Hello World!</h1>")
OK
}

When I start apache2, my /tmp directory fills with rtmp directories
until memory is exausted. The first time it created 32,000 before I
noticed. Does anyone have any idea as to what I could be doing wrong, or
have a software configuration that works? Thank you for all of your
help. ~BJ

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

statistical modelling SAS vs R

Bill Szkotnicki
Hello,

Recently I have been reading a lot of material about statistical modeling
using R. There seems to be conflicting opinions about what the best approach
is between the SAS community and the R community.
1) In R one might start with a model that has all possible effects of
interest in it and then simplify by eliminating/adding insignificant effects
using a stepwise procedure.
2) In SAS one may starts with a "reasonable" model and look at type 3 SS's
to test hypotheses and report LSMEANS. This can be done in R too I think.

Does anyone have current opinions about this? I know it's been discussed
before but I would be very interested in hearing about the advantages and
pitfalls of both approaches.

Bill

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: statistical modelling SAS vs R

Frank Harrell
Bill Szkotnicki wrote:

> Hello,
>
> Recently I have been reading a lot of material about statistical modeling
> using R. There seems to be conflicting opinions about what the best approach
> is between the SAS community and the R community.
> 1) In R one might start with a model that has all possible effects of
> interest in it and then simplify by eliminating/adding insignificant effects
> using a stepwise procedure.
> 2) In SAS one may starts with a "reasonable" model and look at type 3 SS's
> to test hypotheses and report LSMEANS. This can be done in R too I think.
>
> Does anyone have current opinions about this? I know it's been discussed
> before but I would be very interested in hearing about the advantages and
> pitfalls of both approaches.
>
> Bill

You'll get lots of opinions about this.  Both R and SAS can be abused
terribly, and both approaches you mentioned have major problems if you
use P-values to specify models.  Better and more replicable results can
be obtained using modern shrinkage methods and being more liberal with
inclusion of variables, or by using Bayesian model averaging.

Note that LSMEANS and Type III tests are SAS concoctions and that if you
have interactions in the model, type III tests have been criticized.  If
there are no interactions, type Type III = Type II.

Frank Harrell

--
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Frank Harrell
Department of Biostatistics, Vanderbilt University
Reply | Threaded
Open this post in threaded view
|

Re: Infinite loop running Mod_R/Rapache

Jeffrey Horner
In reply to this post by BJ-5
BJ wrote:

> I installed mod_r according to the specifications, and have been trying
> to get the demo script to work correctly. I am running debian, the
> latest build of R, apache 2 with prefork mpm, and the latest mod_r. Is
> anyone else using this module successfully? I added:
>
> LoadModule R_module mod_R.so
> <Location /test/hello>
>     SetHandler r-handler
>     Rsource /var/www/html/test.R
>     RreqHandler handler
> </Location>
>
> to my http.conf and
>
> test.R in /var/www/html is:
>
> handler<-function(r){
>     apache.write(r,"<h1>Hello World!</h1>")
> OK
> }
>
> When I start apache2, my /tmp directory fills with rtmp directories
> until memory is exausted. The first time it created 32,000 before I
> noticed. Does anyone have any idea as to what I could be doing wrong, or
> have a software configuration that works? Thank you for all of your
> help. ~BJ

This is definitely an apache configuration problem. After responding to
you privately about this issue, I got paranoid and checked the latest
R/Apache code release (rapache-0.1.1) with the following debian packages:

apache2-common/unstable uptodate 2.0.55-4
apache2-utils/unstable uptodate 2.0.55-4
apache2-mpm-prefork/unstable uptodate 2.0.55-4
apache2-prefork-dev/unstable uptodate 2.0.55-4

I could not reproduce the behavior you are witnessing. Maybe you can
send me (off-list) your /etc/apache2/apache2.conf,
/etc/apache2/sites-enabled/* and  see if I can't help you troubleshoot.

But this bit of R creating a temp dir (for transient files?) needs to be
handled more delicately in a server environment. I'm going to do some
more digging in the R source... I hope I haven't made some glaringly
wrong assumptions.

--
Jeffrey Horner       Computer Systems Analyst         School of Medicine
615-322-8606         Department of Biostatistics   Vanderbilt University

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: statistical modelling SAS vs R

Wensui Liu
In reply to this post by Bill Szkotnicki
bill,

what kind of modeling are you talking about? based on your desc on SAS, you
are doing general linear model, aren't you?

Frank gave you a great suggestion of using shrinkage methods, such as lasso,
instead of stepwise/backforward/forward methods. But no matter shrinkage or
stepwise, both can be implemented in R and SAS. At this point, there is no
difference at all.

On 2/3/06, Bill Szkotnicki <[hidden email]> wrote:

>
> Hello,
>
> Recently I have been reading a lot of material about statistical modeling
> using R. There seems to be conflicting opinions about what the best
> approach
> is between the SAS community and the R community.
> 1) In R one might start with a model that has all possible effects of
> interest in it and then simplify by eliminating/adding insignificant
> effects
> using a stepwise procedure.
> 2) In SAS one may starts with a "reasonable" model and look at type 3 SS's
> to test hypotheses and report LSMEANS. This can be done in R too I think.
>
> Does anyone have current opinions about this? I know it's been discussed
> before but I would be very interested in hearing about the advantages and
> pitfalls of both approaches.
>
> Bill
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>



--
WenSui Liu
(http://statcompute.blogspot.com)
Senior Decision Support Analyst
Health Policy and Clinical Effectiveness
Cincinnati Children Hospital Medical Center

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html