Re: [R] linearHypothesis

2020-09-17 Thread John Fox
Dear Johan, It's generally a good idea to keep the conversation on r-help to allow list members to follow it, and so I'm cc'ing this response to the list. I hope that it's clear that car::linearHypothesis() computes the test as a Wald test of a linear hypothesis and not as a likelihood-ratio

Re: [R] linearHypothesis

2020-09-17 Thread John Fox
Dear Johan, On 2020-09-17 9:07 a.m., Johan Lassen wrote: Dear R-users, I am using the R-function "linearHypothesis" to test if the sum of all parameters, but the intercept, in a multiple linear regression is different from zero. I wonder if it is statistically valid to use the

[R] linearHypothesis

2020-09-17 Thread Johan Lassen
Dear R-users, I am using the R-function "linearHypothesis" to test if the sum of all parameters, but the intercept, in a multiple linear regression is different from zero. I wonder if it is statistically valid to use the linearHypothesis-function for this? Below is a reproducible example in R. A

[R] linearHypothesis() ERROR-Message

2014-07-10 Thread Katharina Mersmann
Dear Community, unfortunately I canĀ“t give you an reproducable example, because I really do not understand why this messages pops up. I estimate an Fixed Effects Modell, controlling for HAC, because F-statistic changes, I want to compute it, for the other model-specifications it works, But for

Re: [R] linearHypothesis() ERROR-Message

2014-07-10 Thread John Fox
Dear Katharina, There's no specific method for linearHypothesis() for objects produced by plm(), but as you say, the default method seems to work. For example, following example(plm): -- snip --- linearHypothesis(zz, names(coef(zz)), test=F) Linear hypothesis test

[R] linearHypothesis and factors

2012-07-09 Thread Waikato_alex
Hi everyone, I'm sure this is pretty basic but I couldn't find a clear example of how to do this. I'm running a regression, say: reg - lm(Y ~ x1 + year) where x1 is a continuous variable and year is a factor with various year levels. Individually, each year factor variable is not significant,

Re: [R] linearHypothesis and factors

2012-07-09 Thread John Fox
Dear Alex, As explained in ?linearHypothesis, you can use matchCoefs() in the second argument: linearHypothesis(reg, matchCoefs(reg, year) , vcov=vcovHC(reg, HC1)) In addition, you can set the argument white.adjust=hc1 as an alternative to using the vcov argument. Finally, in this case it

Re: [R] linearHypothesis and factors

2012-07-09 Thread Waikato_alex
Dear John, Thank you very much for your help - I really appreciate it. Sorry the questions was obviously rather basic, I did consult the ?linearHypothesis file but haven't worked with matchCoefs() before so didn't quite see how I could use it. Anyway, many thanks and much appreciated, Alex --