cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Steven_Moore
Level VI

Chi-Square Analysis: WHERE is it in JMP?

Chi-Square Analysis:  WHERE is it in JMP?  Pretty simple in other software, but I would like to do it in JMP.  I have data to determine if certain departments have disproportionately high injury rates compared to the overall rate.  A goodness-of-fit exercise.

Steve
15 REPLIES 15

Re: Chi-Square Analysis: WHERE is it in JMP?

This is an interesting point. The key piece of information that is missing in Steven's data is the number of non-injured. So, if one were to add that column (a simple formula) and then stack the # injured column with the # of non-injured and you have the table ready for the analysis.

Dan Obermiller
louv
Staff (Retired)

Re: Chi-Square Analysis: WHERE is it in JMP?

Exactly why I chose to enter the data in the raw table format that I did include since from there it was easy to convert to Dan's table summary format using the Tabulate and Stack.

Steven_Moore
Level VI

Re: Chi-Square Analysis: WHERE is it in JMP?

Dave@Pega_Analytics, thanks for your observation.  You are right on, and that is why I was having a problem finding the Chi-Square Analysis I was looking for.  In other software packages, {I dare not blashpheme here with the name of that software!!! ;-) } this analysis is easier/quicker than in JMP.

Using what I call the "classical Chi-Square Analysis" that we learned in college stats class, there should be no need to include a column of non-injured.  Each department (or classification) is assumed in the null hypothesis to produce a number of injuries at the same proportion as all the others.  That's why I included the staffing levels for each department.  Then the Chi-Square apporach calculates the statistic based on the expected and observed injuries only and a p-value is determined from the degrees of freedom and the alpha level.

Thanks for everyone's help.

Steve
BL
BL
Level II

Re: Chi-Square Analysis: WHERE is it in JMP?

I get a network error when I try to download this and I am trying to do the chi square from summarized data.
txnelson
Super User

Re: Chi-Square Analysis: WHERE is it in JMP?

When you say "I get a network error when I try to download this", what is "this". One of the data tables attached to the discussions?
Jim

Re: Chi-Square Analysis: WHERE is it in JMP?

Not completely sure this is appropriate for the problem, but given that you are looking at a proportion and count data, using Fit Model>Generalized Linear Model might help. Set the Observed Injures and the Staff Level in the Y (as Continuous) then Dept as a Model effect. Choose Binomial Distribution and leave the Link Function as Logit.

The result is a series of ChiSquare tests, but not necessarily the same as the Contingency Analysis in Fit Y by X.  Here we are testing if there a difference in the proportion of injuries to staff level per department. Whole model fit ChiSquare, Effect ChiSquare and Parameter Estimates (levels) ChiSquare's are calculated.

Goodness of Fit is not calculated. The Whole Model ChiSquared is the same as the Likelihood Ratio results in Fit Y by X. No Mosaic Plot either for communicating results graphically either.

Something to think about given the structure of your data.

Chris Kirchberg, M.S.2
Data Scientist, Life Sciences - Global Technical Enablement
JMP Statistical Discovery, LLC. - Denver, CO
Tel: +1-919-531-9927 ▪ Mobile: +1-303-378-7419 ▪ E-mail: chris.kirchberg@jmp.com
www.jmp.com