Error with Pairwise comparisons for a GLM

Hi,

I'm relatively new to R and the R community.

I succesfully ran a glm on my data and was even able to print out a graph.

I am trying now to run pairwise comparisons on the model using factorplot() but keep getting the same error message and can't seem to find a solution.

I'll post some of the code below and am happy to clarify any questions.

lmf1 <- glm(Weight ~ Day + Group, data = subset(neo_weights, Cage == "F1"))

summary(lmf1)

scatterplot(Weight ~  Day | Group, data = subset(neo_weights, Cage == "F1"),
            xlab="Weight (in grams)", ylab="Age (in dayS)",
            main="Litter F1 weight progression",
            )

pair_f1 <- factorplot(lmf1, factor.variable = "Weight", pval = .05)

The error when I run it is:

pair_f1 <- factorplot(lmf1, factor.variable = "Weight", pval = .05)

Error in .subset2(x, i, exact = exact) : 
  attempt to select less than one element in get1index

Thanks for any help

I think that the problem is in the subset(). Maybe!

Make subset() before the lmf1

And check this:

What library use for make factorplot() ?

Hey,

I tried that and it didn't help.

The library itself is called factorplot

It's installed and listed as a library

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.