Hi all, I am trying to get the lsmeans for one of the factors fitted in the following model Model1 = lm(Yld ~ A + B + C, data = dat2) M_lsm = as.data.frame(lsmeans(Model1, "C")), My problem is, I am getting this error message. "Error: The rows of your requested reference grid would be 81412, which exceeds the limit of 10000 (not including any multivariate responses)". How do I fix this? Thank you [[alternative HTML version deleted]]
What does str(dat2) give? Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Jan 26, 2022 at 7:37 AM Val <valkremk at gmail.com> wrote:> > Hi all, > > I am trying to get the lsmeans for one of the factors fitted in the > following model > > Model1 = lm(Yld ~ A + B + C, data = dat2) > M_lsm = as.data.frame(lsmeans(Model1, "C")), > > My problem is, I am getting this error message. > "Error: The rows of your requested reference grid would be 81412, which > exceeds the limit of 10000 (not including any multivariate responses)". > > How do I fix this? > > Thank you > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.
On Wed, 26 Jan 2022 10:36:31 -0500 Val <valkremk at gmail.com> wrote:> My problem is, I am getting this error message. > "Error: The rows of your requested reference grid would be 81412, > which exceeds the limit of 10000 (not including any multivariate > responses)".Is this the whole error message? According to [*] (and the rest of the error message), the emmeans package (which lsmeans uses under the hood) lets you adjust that limit:>> Your options are: >> 1. Specify some (or more) nuisance factors using the 'nuisance' >> argument (see ?ref_grid). These must be factors that do not >> interact with others. >> 2. Add the argument 'rg.limit = <new limit>' to the call. Be >> careful, because this could cause excessive memory use and >> performance issues. Or, change the default via >> 'emm_options(rg.limit = <new limit>)'.-- Best regards, Ivan [*] https://cran.r-project.org/web/packages/emmeans/vignettes/messy-data.html#rg.limit