[R] Error in mkRespMod(fr, family = family) : response must be numeric
David L Carlson
dcarlson at tamu.edu
Mon Nov 16 18:53:20 CET 2015
The error message is straightforward. V12 is not a numeric variable and probably not a variable at all. Why would R assume that V12 is a column? A column in what? Read the manual page for glmer() and a basic tutorial on R. Don't assume that R can read your mind.
Without knowing something about your data, it is impossible to answer your question. How is your data stored? As a data frame? If so, you need to use the variable names in your formula and specify the data frame using the data= argument in glmer().
A good place to start would be to read one of these:
Using R by J H Maindonald - https://cran.r-project.org/doc/contrib/usingR.pdf
R for Beginners by E Paradis - https://cran.r-project.org/doc/contrib/Paradis-rdebuts_en.pdf
The R Guide by W J Owen - https://cran.r-project.org/doc/contrib/Owen-TheRGuide.pdf
-------------------------------------
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352
-----Original Message-----
From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Tania Pollak
Sent: Sunday, November 15, 2015 3:58 PM
To: r-help at r-project.org
Subject: [R] Error in mkRespMod(fr, family = family) : response must be numeric
Hi --
I am new to R, and not much more advanced in stats, but am trying to learn
my way through the program to finish my master's thesis. I am trying to
run tests using glmer, and am getting the above error message.
My code is:
> test1=glmer(V12~V10+(1|V4),family=poisson)
Error in mkRespMod(fr, family = family) : response must be numeric
(The V's are the column numbers for the variable names -- the program
doesn't seem to recognize the actual variable names, although they are in
the table, but does recognize the column numbers.)
Any help is much appreciated. I tried searching online for some guidance,
but came up empty.
Thank you --
Tania
[[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