# Testing a linear hypothesis after maximum likelihood

4 messages
Open this post in threaded view
|

## Testing a linear hypothesis after maximum likelihood

 I'd like to be able to test linear hypotheses after setting up and running a model using optim or perhaps nlm.  One hypothesis I need to test are that the average of several coefficients is less than zero, so I don't believe I can use the likelihood ratio test. I can't seem to find a provision anywhere for testing linear combinations of coefficients after max. likelihood. Cheers & happy holidays, Peter ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Open this post in threaded view
|

## Re: Testing a linear hypothesis after maximum likelihood

 Why can't you use a likelihood ratio?  I would write two slightly different functions, the second of which would use the linear constraint to eliminate one of the coefficients.  Then I'd refer 2*log(likelihood ratio) to chi-square(1).  If I had some question about the chi-square approximation to the distribution of that 2*log(likelihood ratio) statistic, I'm use some kind of Monte Carlo, e.g., MCMC.           If you'd like more help from this listserve, PLEASE do read the posting guide! "www.R-project.org/posting-guide.html".  Anecdotal evidence suggests that posts that follow more closely the suggestions in that guide tend to get more useful replies quicker.           hope this helps.           spencer graves Peter Muhlberger wrote: > I'd like to be able to test linear hypotheses after setting up and running a > model using optim or perhaps nlm.  One hypothesis I need to test are that > the average of several coefficients is less than zero, so I don't believe I > can use the likelihood ratio test. > > I can't seem to find a provision anywhere for testing linear combinations of > coefficients after max. likelihood. > > Cheers & happy holidays, > > Peter > > ______________________________________________ > [hidden email] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html-- Spencer Graves, PhD Senior Development Engineer PDF Solutions, Inc. 333 West San Carlos Street Suite 700 San Jose, CA 95110, USA [hidden email] www.pdf.com Tel:  408-938-4420 Fax: 408-280-7915 ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide! http://www.R-project.org/posting-guide.html