On Fri, Jan 13, 2012 at 8:53 AM, Jason LaCombe
wrote:
> 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 categori
One way of speeding that up would be to use `glm.fit` instead of `glm`. It
just means you'll have to calculate a few extra variables outside the loop
(which `glm` will be calculating every time you call it).
On Fri, Jan 13, 2012 at 2:53 PM, Jason LaCombe <
[email protected]> wrote:
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:10)
{
glm(X~Y,