[R] Hypothesis "RayosRayos.2 = (Intercept)" is not well formed: contains bad coefficient/variable names.

John Fox jfox at mcmaster.ca
Mon Nov 5 14:20:27 CET 2012


Dear Jean,

This is, I suppose, linearHypothesis() in the car package.

It's impossible to know from the information that you've given what the source of the problem is, since you don't show the formula for model.rayos. If it's correct, which apparently isn't the case, the hypothesis that you specified tests that a coefficient in the model named "RayosRayos.2" is equal to the regression intercept, which is standardly named "(Intercept)." Is that what you intended?

Best,
 John

------------------------------------------------
John Fox
Sen. William McMaster Prof. of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/

On Sun, 4 Nov 2012 21:51:50 -1000
 Jean Jang <jeanwaijang at gmail.com> wrote:
> Hi R-listers,
> 
> I am trying to do this function amongst others for a Chi-sq test in
> 
>  > require(multcomp)
> 
> for some reason it is not working but all of the other functions have  work. What does this error mean and how do I fix it?
> 
> Jean
> 
> 
> 
>  > linearHypothesis(model.rayos.C, "RayosRayos.2 = (Intercept)")
> Error in constants(lhs, cnames_symb) :
>    The hypothesis "RayosRayos.2 = (Intercept)" is not well formed:  
> contains bad coefficient/variable names.
> In addition: Warning message:
> In constants(lhs, cnames_symb) : NAs introduced by coercion
> 
> ______________________________________________
> 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.

------------------------------------------------
John Fox
Sen. William McMaster Prof. of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/




More information about the R-help mailing list