Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 791
Default How to use Excel to do likelihood ratio chi-squared test?

How to use Excel to do likelihood ratio chi-squared test?
I know I can use the "Chitest" function to do chi-squared test, but I have
no idea how to do likelihood ratio test using Exel functions.
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: How to use Excel to do likelihood ratio chi-squared test?

  1. First, calculate the log-likelihood of the null model and the alternative model. The null model is the model with fewer parameters, while the alternative model is the model with more parameters. You can use Excel's built-in functions to calculate the log-likelihoods.
  2. Next, calculate the test statistic, which is twice the difference between the log-likelihoods of the two models. You can do this by subtracting the log-likelihood of the null model from the log-likelihood of the alternative model, multiplying the result by -2, and storing it in a cell.
  3. Determine the degrees of freedom for the test. This is equal to the difference in the number of parameters between the null and alternative models.
  4. Finally, use Excel's built-in CHISQ.DIST.RT function to calculate the p-value for the test. This function takes the test statistic and degrees of freedom as inputs and returns the probability of obtaining a value as extreme or more extreme than the observed test statistic under the null hypothesis.

    Here's an example of how to perform a likelihood ratio chi-squared test in Excel:

    Suppose you have two models for predicting the probability of a customer buying a product: Model 1 includes only the customer's age as a predictor, while Model 2 includes both age and income. You want to test whether the addition of income to the model significantly improves its fit.

    1. Calculate the log-likelihoods of the two models. Let's say the log-likelihood of Model 1 is -100 and the log-likelihood of Model 2 is -90.

    2. Calculate the test statistic. The difference between the log-likelihoods is -10, so twice this value is 20. Multiply by -2 to get the test statistic, which is 40.

    3. Determine the degrees of freedom. Model 2 has one more parameter than Model 1 (income), so the degrees of freedom for the test are 1.

    4. Use the CHISQ.DIST.RT function to calculate the p-value. In a cell, enter "=CHISQ.DIST.RT(40,1)" (without the quotes). This will return the p-value for the test, which is approximately 2.2e-10 (very small).

    Based on this result, you can reject the null hypothesis that Model 1 is a better fit for the data than Model 2, and conclude that the addition of income to the model significantly improves its fit.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 837
Default How to use Excel to do likelihood ratio chi-squared test?

In general, Chi-square for the LRT is an asymptotic approximation
http://en.wikipedia.org/wiki/Likelihood_ratio_test

Using the information at that link, you can calculate the LRT and then use
CHIDIST to evaluate its significance.

Jerry

"Michael" wrote:

How to use Excel to do likelihood ratio chi-squared test?
I know I can use the "Chitest" function to do chi-squared test, but I have
no idea how to do likelihood ratio test using Exel functions.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
unhide menu bar in excel - just disappeared Sean Setting up and Configuration of Excel 12 April 4th 23 10:19 AM
A new Excel add-ins web-site Mike Links and Linking in Excel 0 February 5th 07 01:32 PM
Chi squared test rakbhat Excel Discussion (Misc queries) 1 September 27th 06 04:59 PM
Test skill of a job applicant in Excel Barbara in VA Excel Worksheet Functions 3 March 14th 06 01:27 PM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM


All times are GMT +1. The time now is 06:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"