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
VarunK
Level III

Query on recoded factor variables

Hello:

I am running an experiment with three factors, all are continuous. Two of the factors have three levels and one factor has 2 levels.

I was trying with the analysis outcome with recoded factor levels.

The one of the factor has levels 2, 4.5 and 7 and so I recoded them as -1, 0 and 1 as 4.5 is the exact center between 2 and 7.

The other three level factor has levels 2, 4.5 and 6.5. Now 4.5 is not the exact center between the 2 and 6.5, so should I recode them as -1, 0.11 and 1 or should I still code them as -1, 0 and 1?

How it would affect my analysis if I coded them the wrong way?

 

Any help is highly appreciated.

 

Best Regards,

Varun Katiyar

1 ACCEPTED SOLUTION

Accepted Solutions
VarunK
Level III

Re: Query on recoded factor variables

Here are the results based on the quick study that I did.

 

VarunK_0-1692982377893.png

VarunK_2-1692982425195.png

For the coded experiment:

wing_length will be -0.6 and 0.6 for 3 and 6 respectively for both Case-1 and Case-2

For Case-1, base_length will be 0.25 and -0.4 for 5 and 3.5 respectively.

For Case-2, base_length will be 0.33 and -0.33 for 5 and 3.5 respectively

 

We can see that Case-2 has results very close to Case-3 which are based on the actual factor values. It should also be noted that the base_length has a very small effect on the prediction and hence the effect on the results is not that significant. If the same case would have been for Wing_length than the results would have differed a lot between Case-1 and Case-2

 

Conclusion:

We should try to choose the factor level such that the middle factor level is at exact center if it can not be done than put the middle factor level as the ratio based on the extreme values.

e.g. in my case of base_length, since the middle factor level cannot be put in exact center if I use the coded units then I should put the 4.5 as 0.11 and not 0.

View solution in original post

2 REPLIES 2
statman
Super User

Re: Query on recoded factor variables

See explanation of coding here:

https://www.jmp.com/support/help/en/17.2/?os=mac&source=application#page/jmp/coding.shtml

 

Can you not set the levels equidistant for the one factor?  Setting them equidistant simplifies the analysis.

"All models are wrong, some are useful" G.E.P. Box
VarunK
Level III

Re: Query on recoded factor variables

Here are the results based on the quick study that I did.

 

VarunK_0-1692982377893.png

VarunK_2-1692982425195.png

For the coded experiment:

wing_length will be -0.6 and 0.6 for 3 and 6 respectively for both Case-1 and Case-2

For Case-1, base_length will be 0.25 and -0.4 for 5 and 3.5 respectively.

For Case-2, base_length will be 0.33 and -0.33 for 5 and 3.5 respectively

 

We can see that Case-2 has results very close to Case-3 which are based on the actual factor values. It should also be noted that the base_length has a very small effect on the prediction and hence the effect on the results is not that significant. If the same case would have been for Wing_length than the results would have differed a lot between Case-1 and Case-2

 

Conclusion:

We should try to choose the factor level such that the middle factor level is at exact center if it can not be done than put the middle factor level as the ratio based on the extreme values.

e.g. in my case of base_length, since the middle factor level cannot be put in exact center if I use the coded units then I should put the 4.5 as 0.11 and not 0.