[R] interactions and stall or memory shortage

Ben Bolker bolker at ufl.edu
Tue Sep 1 15:31:56 CEST 2009



  The short answer is that you're trying to make a categorical interaction
out of
continuous variables, so that the resulting factors i2 and i3 have 1050 and
7200
levels respectively.  (Note to people trying to reproduce this example:
you'll
need library(emdbook); library(bbmle); data(Lily_sum) ...)  It'll take me a
little
longer to come up with a more satisfactory answer, but the bottom line is
that interactions in a continuous context are generally *products* rather
than
all combinations of levels ...


alexander russell-2 wrote:
> 
> Hello,
> 
> After putting together interaction code that worked for a single pair of
> interactions, when I try to evaluate two pairs of interactions(
> flowers*gopher, flowers*rockiness) my computer runs out of memory, and the
> larger desktop I use just doesn't go anywhere after about 20 minutes.
> 
> Is it really that big a calculation?
> 
> to start:
> 
> mle2(minuslogl = Lily_sum$seedlings ~ dnbinom(mu = a, size = k),
> 
> start = list(a = 10, k = 1))
> then:
> i2<-interaction(Lily_sum$flowers, Lily_sum$gopher)
> 
> i3<-interaction(Lily_sum$flowers, Lily_sum$rockiness)
> 
> mle2(Lily_sum$seedlings ~ dnbinom(mu = a, size = k), start=list(a=10,k=1)
> ,parameters=list(a~i3+i2+Lily_sum$flowers))
> 
> (the last run leads to a stalled calculation)
> 
> regards,
> 
> R
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: http://www.nabble.com/interactions-and-stall-or-memory-shortage-tp25221662p25240372.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list