[Rcpp-devel] Generalized Linear Model funcitonality inside Inline
Jason LaCombe
jlacombe at naturesourcegenetics.com
Fri Jan 13 15:53:57 CET 2012
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20120113/bdb2387d/attachment.htm>
More information about the Rcpp-devel
mailing list