cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar

How can I calculate the VIF for the nth nominal factor?

When JMP reports on nominal factors in the Expanded Estimates table, all coefficients are visible.  However, the Expanded Estimates table does not contain VIFs as an output option.  The Parameter Estimates table does, however, it only reports VIFs for n-1 nominal factors.  One can find the remaining estimate by simply assuring that the nominal coefficients sum to zero in accordance with JMPs convention.  How does one calculate the VIF for the nth factor?

1 ACCEPTED SOLUTION

Accepted Solutions
marie_gaudard
Level III

Re: How can I calculate the VIF for the nth nominal factor?

Thanks for your question, Joe.  The VIF calculation uses JMP's coding for levels of nominal variables.  As you know, VIF for a predictor is defined as 1/(1 - RSq), where RSq is the RSquare value for a regression of that predictor on all other predictors. Now another useful fact is that it is easy to obtain JMP's coding for nominal variables. You can do this in Fit Model.

Let's take Hollywood Movies,jmp, found in the Sample Data folder, as an example. Go to Analyze > Fit Model and enter World Gross as Y and Genre as the single nominal model effect. Change the Emphasis to Minimal Report and click Run. Open the Parameter Estimates report. There are eight levels of Genre and you will see seven model terms of the form Genre[].  There are the seven (continuous) indicator variables that represent the nominal variable Genre.

From the red triangle menu, select Save Columns > Save Coding Table. The seven columns for Genre[] show their effect coding. (This coding is described in the documentation. Go to Help > Books > Fitting Linear Models and search for the section "Coding for Nominal Effects".)

Now, back to the Parameter Estimates table. Right-click in the table and select Columns > VIF. Let's obtain the VIF for Genre[Action], which is 1.608246.

Make the coding table active. Go to Analyze > Fit Model.  Enter Genre[Action] as Y and the six remaining Genre[] variables as the effects.  Click Run. Your RSquare value is 0.378205.  Calculate 1/(1 - 0.378205) and you obtain the VIF for Genre[Action], 1.608246.

View solution in original post

5 REPLIES 5

Re: How can I calculate the VIF for the nth nominal factor?

By the way, coding with dummy factors (in any combination) does not yield the same VIFs as JMP derives for nominal factors.  I have consulted the JMP manuals, but I could find no clear documentation of how JMP calculates VIFs for nominal factors.  My presumption is that one can use n-1 independent dummy variables, regress each against all other model factors and derive VIFs in the usual way from the r^2s generated.  This does not however, generate the same VIFs JMP reports and I can find no combination of dummy factors that will do so.

marie_gaudard
Level III

Re: How can I calculate the VIF for the nth nominal factor?

Thanks for your question, Joe.  The VIF calculation uses JMP's coding for levels of nominal variables.  As you know, VIF for a predictor is defined as 1/(1 - RSq), where RSq is the RSquare value for a regression of that predictor on all other predictors. Now another useful fact is that it is easy to obtain JMP's coding for nominal variables. You can do this in Fit Model.

Let's take Hollywood Movies,jmp, found in the Sample Data folder, as an example. Go to Analyze > Fit Model and enter World Gross as Y and Genre as the single nominal model effect. Change the Emphasis to Minimal Report and click Run. Open the Parameter Estimates report. There are eight levels of Genre and you will see seven model terms of the form Genre[].  There are the seven (continuous) indicator variables that represent the nominal variable Genre.

From the red triangle menu, select Save Columns > Save Coding Table. The seven columns for Genre[] show their effect coding. (This coding is described in the documentation. Go to Help > Books > Fitting Linear Models and search for the section "Coding for Nominal Effects".)

Now, back to the Parameter Estimates table. Right-click in the table and select Columns > VIF. Let's obtain the VIF for Genre[Action], which is 1.608246.

Make the coding table active. Go to Analyze > Fit Model.  Enter Genre[Action] as Y and the six remaining Genre[] variables as the effects.  Click Run. Your RSquare value is 0.378205.  Calculate 1/(1 - 0.378205) and you obtain the VIF for Genre[Action], 1.608246.

Re: How can I calculate the VIF for the nth nominal factor?

Merci beaucoup, Marie!  That does the trick.

marie_gaudard
Level III

Re: How can I calculate the VIF for the nth nominal factor?

Bienvenue, Joe! I'm glad it helped. The ability to save the coding table is wonderful.

marie_gaudard
Level III

Re: How can I calculate the VIF for the nth nominal factor?

Your interest suggests that you are going to use some of the indicator variables that JMP uses for nominal variable coding as terms in a regression model. I'm not sure how you are planning to determine which terms are used.  If you use Stepwise, then Make Model and Run Model will construct useful terms and include those terms in the model so that you can obtain VIFs in the usual way.

Take Hollywood Movies.jmp, found in the Sample Data folder, as an example. Go to Analyze > Fit Model and enter World Gross as Y and add Genre and Production Budget as effects. Change the Personality to Stepwise and click Run. In the Stepwise Regression Control outline, click Go.  Two effects constructed from levels of Genre are entered. Click Run Model. Columns that show the coding for those effects are added to the data table and you can obtain their VIFs in the Parameter Estimates report.

If you are simply interested in seeing how to obtain the VIF for the nth level of an n-level nominal factor, you can do that by using Value Ordering.  But keep in mind that one of the other levels has to be left out of the analysis.  This is because the coded term for the nth level is a linear combination of the terms for the other n - 1 levels.

Let's look at the Hollywood Movies example again with Genre as the single effect. Go to Analyze > Fit Model and enter World Gross as Y and Genre as the single nominal model effect. Change the Emphasis to Minimal Report and click Run. Open the Parameter Estimates report. You see the seven (continuous) indicator variables that represent the nominal variable Genre. (Note that one level of Genre, Adventure, has World Gross missing, so is not used in the analysis.) The missing level is Thriller. 

To include Genre[Thriller], apply the Value Ordering column property to Genre.  In the dialog for Value Ordering, select Thriller and move it up one line in the list. Now rerun Fit Model. Genre[Thriller] appears in the Parameter Estimates list and you can obtain its VIF.