Hi Everyone,

I'm trying to perform the following task more efficiently in Rcpp, and am 
running into some trouble...

Here's a simplified example of the sort of R code I'm trying to optimize, for Y 
a binary random variable, X a categorical variable with 3 classes:

For(I in 1:100000)
{
  glm(X~Y, family="binomial");
}

This seems like an excellent candidate for Rcpp--I simply wish to evaluate the 
'for' loop in c++ to reduce the computational overhead.

What I would like to avoid is having to re-write code for explicitly evaluating 
a generalized linear model in c++. Any quick-and-dirty solution is acceptable. 
Two approaches that I have tried and been unsuccessful with are:

-Attempting to expose the C glm methods from the R stats package
-Working with the RcppModels package [having trouble with this due to my 
inability to find documentation, not that there isn't some out there]

Any thoughts, references, or corrections to my above approaches would be 
appreciated.

Thanks,

Jason


_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to