[R] effect() error: non-conformable arguments
Elisha Sigmon
elisha.sigmon at gmail.com
Mon Feb 11 16:22:12 CET 2013
Sorry about that. Attached is the relevant data and the following is the
code and error.
>Help<-read.csv("R-help-effect.csv", sep=",", header=T)
>Help$WeeksOut<-as.factor(Help$WeeksOut)
>Help$Run<-as.factor(Help$Run)
>GLM<-glm(NumberSpecies~Treatment*WeeksOut+Run+Tree., family=poisson
(link=log), data=Help)
>summary(effect("Treatment", GLM))
Error in mod.matrix %*% V : non-conformable arguments
Thanks!
On Fri, Feb 8, 2013 at 8:57 AM, John Fox <jfox at mcmaster.ca> wrote:
> Dear Elisha,
>
> It's impossible to tell from the information that you provide what the
> source of the problem is. The gold standard for a problem report is
> "commented, minimal, self-contained, reproducible code" (quoting from the
> text at the bottom of all r-help postings) that would allow me to track
> down
> the error, but you don't even show the model that you've fit. I suspect
> that
> there's something about the model that's incompatible with the effect()
> function but what that might be is impossible to know from your message.
>
> Please provide some more details and ideally a reproducible example.
>
> Best,
> John
>
> -----------------------------------------------
> John Fox
> Senator McMaster Professor of Social Statistics
> Department of Sociology
> McMaster University
> Hamilton, Ontario, Canada
>
>
>
> > -----Original Message-----
> > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
> > On Behalf Of Elisha Sigmon
> > Sent: Thursday, February 07, 2013 2:57 PM
> > To: r-help at r-project.org
> > Subject: [R] effect() error: non-conformable arguments
> >
> > I am trying to calculate adjusted means according to a glm model with a
> > Poisson distribution using effect() in the 'effects' package. I've done
> > this many times before with great success, but this time I'm getting an
> > error. My model contains two factors and two covariates/blocks and I
> > would
> > like the adjusted mean and confidence intervals for each factor
> > separately.
> > The model runs without errors as does Anova() and HSD.test() on the
> > model,
> > but when I try to run effect("factor", model) I get the following error:
> > Error in mod.matrix %*% V : non-conformable arguments
> >
> > I understand that this error indicates that matrices are being created
> > with
> > dimensions that can't be used in the calculations, or something to that
> > effect. But I don't understand enough about how the effect() function is
> > calculated to figure out where the problem is in my data. I checked my
> > data
> > file for any NAs, missing values, etc. and can't find any problems. If
> > anyone has any suggestions for diagnostics or how to find the source of
> > this error I would greatly appreciate the help.
> >
> > Thanks!
> >
> > --
> > Elisha Sigmon
> > Ph.D. Candidate
> > The George Washington University
> > Department Of Biological Sciences
> > 2023 G St. NW Suite 340
> > Washington, DC, USA 20052
> >
> > [[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.
>
>
--
Elisha Sigmon
Ph.D. Candidate
The George Washington University
Department Of Biological Sciences
2023 G St. NW Suite 340
Washington, DC, USA 20052
More information about the R-help
mailing list