[R] Problem with effects package
Lars Bishop
lars52r at gmail.com
Sat Jul 30 22:30:10 CEST 2011
ok. Here's an example:
R version 2.11.1
effects_2.0-10
var1 <- c(25631.9392, 2521.2590, 6656.6516, 1362.5997, 6369.9818,
27253.4223, 2073.1909, 9959.3792,
3318.2500, 15323.8103, 11583.8717, 3054.5558, 625.6597,
2500.0000, 11996.2271)
var2 <- as.factor(c("B:=500", "B:=500", "B:=500", "B:=500", "B:=500",
"B:=500", "B:=500", "B:=500",
"B:=500", "C:750-1000", "C:750-1000", "B:=500",
"B:=500", "B:=500", "B:=500"))
glm1 <- glm(var1 ~ var2, family = Gamma(link = "log"))
summary(glm1)
library(effects)
plot(effect("var2", glm1))
Error in apply(mod.matrix[, components], 1, prod) :
subscript out of bounds
Error in plot(effect("var2", glm1)) :
error in evaluating the argument 'x' in selecting a method for function 'plot'
>
On Sat, Jul 30, 2011 at 3:10 PM, jim holtman <jholtman at gmail.com> wrote:
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
> We can not help unless we at least have the data that you are using.
>
> On Sat, Jul 30, 2011 at 3:01 PM, Lars Bishop <lars52r at gmail.com> wrote:
>> Dear List,
>>
>> Several times I use this package I get the error message shown below.
>> When I work out simple examples, it turns out to be fine, but when
>> working with real and moderate size data sets I always get the same
>> error.
>>
>> Do you know what could be the cause of the problem?
>>
>>
>> Error in apply(mod.matrix[, components], 1, prod) :
>> subscript out of bounds
>> Error in plot(effect("myvariable", glm.sev1)) :
>> error in evaluating the argument 'x' in selecting a method for
>> function 'plot'
>>
>> Thanks,
>> Lars/
>>
>> ______________________________________________
>> 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.
>>
>
>
>
> --
> Jim Holtman
> Data Munger Guru
>
> What is the problem that you are trying to solve?
>
More information about the R-help
mailing list