Skip to content

glmutli package assistance please - error Solved

1 message · Bill Poling

#
Hello Michael and all.

1. I replaced INT with Numeric that did not solve the error  problem.
2. However I discovered that my matrix was the problem, I had it set to 2,5 and when I set it to 6,6 I no longer get the error, which was due to not having the correct or more than necessary fields in the matrix.
Clues came from: https://stackoverflow.com/questions/15031338/subscript-out-of-bounds-general-definition-and-solution

Following the author's pattern they described their data as needing matrix = 6,6 due to 6 factors and 6 covariates .

I set my matrix to the number of Factors and Covariates, 2-5 and that caused the error.
[,1]  [,2]
[1,] 497664 10368
[2,]     NA    NA
[3,]     NA    NA
[4,]     NA    NA
[5,]     NA    NA

dd <- matrix(nc = 6, nr = 6) View(dd)
for(i in 1:2) for(j in 1:5) dd[i, j] <- glmulti(names(r1a)[1], names(r1a)[c(2:(1 + i), 8:(3 + j))], data = r1a, method = "d")

[,1]   [,2] [,3] [,4] [,5] [,6]
[1,]   497664  10368  432   36    6   NA
[2,] 16000000 200000 5000  250   25   NA
[3,]       NA     NA   NA   NA   NA   NA
[4,]       NA     NA   NA   NA   NA   NA
[5,]       NA     NA   NA   NA   NA   NA
[6,]       NA     NA   NA   NA   NA   NA

Thank you for your support!

WHP

From: Michael Dewey <lists at dewey.myzen.co.uk>
Sent: Thursday, November 15, 2018 7:24 AM
To: Bill Poling <Bill.Poling at zelis.com>; r-sig-mixed-models at r-project.org; r-help (r-help at r-project.org) <r-help at r-project.org>
Subject: Re: [R] glmutli package assistance please

Dear Bill

I am not sure what is going on here but I notice that 2 of your
covariates are numeric and 3 integer. What happens if you make them all
numeric?

Michael
On 15/11/2018 11:46, Bill Poling wrote:
--
Michael
http://www.dewey.myzen.co.uk/home.html

Confidentiality Notice This message is sent from Zelis. This transmission may contain information which is privileged and confidential and is intended for the personal and confidential use of the named recipient only. Such information may be protected by applicable State and Federal laws from this disclosure or unauthorized use. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any disclosure, review, discussion, copying, or taking any action in reliance on the contents of this transmission is strictly prohibited. If you have received this transmission in error, please contact the sender immediately. Zelis, 2018.