[R] Error in mcp2matrix(model, linfct = linfct)

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Wed Feb 1 08:58:29 CET 2017


Looks like your data are not numeric. Examine your data with the str function and troubleshoot your process for reading in data. Step through the code one line at a time and see how the data looks at each step. 

Also, you really need to read the Posting Guide and follow the advice there. If you had done so, we could be more specific about how to fix your problem. 
-- 
Sent from my phone. Please excuse my brevity.

On January 31, 2017 6:29:39 PM PST, Karen Castillioni <karen.castillioni at gmail.com> wrote:
>Problem: Error in mcp2matrix(model, linfct = linfct)
>
>Post hoc test is not working. Does anyone know what I did wrong?
>
>modmisto<-lme(Cobertura~Tratamento, random=~1|Parcela,
>data=Cover_BraquiT3) summary(modmisto)
>
>tukey<-glht(modmisto, mcp(Tratamento="Tukey")) Error in
>mcp2matrix(model, linfct = linfct) : Variable(s) ‘Tratamento’ of class
>‘character’ is/are not contained as a factor in ‘model’.
>Some translations if necessary: cobertura=cover, tratamento=treatment,
>parcela=plot
>
>I have 4 treatments being tested.
>
>Any help with this will be very appreciated!
>
>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.



More information about the R-help mailing list