Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
dk
dk
Level II

Singularity problems with crossed categorical factors

I have 2 categorical factors. The first is type of covering material, with 2 types available. Since it is also possible to use no covering material, this factor has 3 levels. The second factor is the method to apply these materials and has 2 levels (without overlap or with overlap). I am interested in fitting a model with the main effects and the interaction. When I try it to run this way (Table script "Test 1") the report indicates a singularity. So far no surprise, the model would require 6 parameters but the X matrix only allows 5. The problem is that the reports such as effect summary or interaction profiler don't work.

I tried several approaches to deal with the situation:

  • removing the entries in method where type == "None" ("Test 2"). This way these rows are ignored when the model is fitted.
  • crossing type and method manually ("Test 3")
  • nesting method into type ("Test 4")
  • manually encoding the levels into numeric columns ("Test 5")
  • manually encoding the levels into categorical columns ("Test 6"). This does not do anything.

Tests 1, 3, 4, 5 are basically different ways to formulate the same model and yield the same R², F-ratio or prediction intervals. However they are all not really satisfying concerning visualizing and testing the main effects and interactions.

What is the correct way or at least a reasonable way of dealing with this situation?

 

PS searching with google I only found this which is not really helpful:

https://stats.stackexchange.com/questions/388206/constructing-3-way-anova-when-design-is-not-fully-f...

 

Thank you

dk

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
MathStatChem
Level VI

Re: Singularity problems with crossed categorical factors

You can cross X1*X2 (nested under Z)

 

Y = intercept + a*Z + b*Z*X1 + c*Z*X2 + d*Z*X1*X2

View solution in original post

9 REPLIES 9
Highlighted

Re: Singularity problems with crossed categorical factors

The singularity in this case indicates that you do not have all the right observations to estimate all the effects. You might try to design an experiment for these factors and desired model to see which runs are necessary. The minimum number of runs are sufficient for this purpose. Your data lacks some combinations of levels. You only observed Type = None with Method = Method A, so you cannot estimate the interaction effect.

Learn it once, use it forever!
Highlighted
dk
dk
Level II

Re: Singularity problems with crossed categorical factors

Thank you so far. Since with Type = None I cannot distinguish between the methods I cannot estimate the interaction effect. Ie from the 6 parameters in the model only 5 are independent so that 5 are biased and one is zeroed. In my understanding it would make sense to have this Type[None] x Method interaction term zeroed.

dk_0-1597669359466.png

 

Unfortunately by default the other one gets zeroed. Do you know how to tell the software which term to set to 0?

Highlighted
statman
Level VII

Re: Singularity problems with crossed categorical factors

I am confused by "The problem is that the reports such as effect summary or interaction profiler don't work.".  What do you mean by don't work?

The issue with your data is that it is not balanced.  The instance where Type=None has no Method associated with it.

If you simply want to graph the data, Graph Builder is quite useful.

Graph Builder.png

 

 

Highlighted
dk
dk
Level II

Re: Singularity problems with crossed categorical factors

Thank you so far. This is an extraction from a larger DOE. To set up the DOE I used the approach from test 3 (manually crossing type and method). This way in the full table I have all possible factor combinations realized. I would like significance tests for the main effects and the 1st order interactions. However with the approaches I tried this is not possible. Eg in test 3 (manually crossing type and method) I cannot separate out the contribution of method alone.

Highlighted
MathStatChem
Level VI

Re: Singularity problems with crossed categorical factors

One issue is that you have nested factors (I think), so you shouldn't be looking at all the two-way interactions.

Factor 1:  Do you use a material or not?  (Z)

      Nested Factor 2:  If you used a material, what type of material (X1)

      Nested Factor 3:  If you used a material, what method did you use to apply the material? (X2)

 

Code Z as a continuous variable, Z=0 if no material is used, Z=1 if a material is used

then an appropriate model to fit would be

 

Y = intercept + a*Z + b*Z*X1 + c*Z*X2

 

so you are only look at the affect of "use a material" and the interaction of "use a material" with the material type and the method used.

A recent good reference that describes this model and how to generate experimental designs for this situation can be found here  https://doi.org/10.1080/00401706.2018.1562986 

 

 

 

Highlighted
dk
dk
Level II

Re: Singularity problems with crossed categorical factors

Thank you so far. This sounds very reasonable. Is it possible (and if it is, how) to additionally cross the nested effects X1 and X2?

It will take some time for me to look at your link in more detail.

Highlighted
MathStatChem
Level VI

Re: Singularity problems with crossed categorical factors

You can cross X1*X2 (nested under Z)

 

Y = intercept + a*Z + b*Z*X1 + c*Z*X2 + d*Z*X1*X2

View solution in original post

Highlighted
MathStatChem
Level VI

Re: Singularity problems with crossed categorical factors

Also, when you fit the model with JMP, make sure to turn off the "Center Polynomials" option in the Fit Model dialog, otherwise you won't get the correct model fit.  

Highlighted
dk
dk
Level II

Re: Singularity problems with crossed categorical factors

Thank you, that is exactly what I need. You can close this thread if you like.

I have just one small remark: I did not see a difference with center polynomials turned on or off.

Article Labels