Choose Language Hide Translation Bar
Highlighted

## Linear regression with categorical X axis and ANOVA analyses

Hola everyone, I am pretty new to JMP Pro and I have a couple of questions:

1. I am having problems finding how to do a linear regression when the X axis is categorical. I have a dataset of leaves of 9 different age classes (15 to 30 sampled leaves for each leaf age class arranged from youngest to oldest age class as follows: Y1, Y2, Y3, Y/M, M, O, S, O/S1, O/S2), 3 different light conditions (SU, SH Mid, SH Low) and 12 different trees. These leaves have 12 different physical & chemical traits such as leaf thickness, leaf area, leaf water content, leaf carbon content, etc. and I want to find the trend for each leaf trait (Y axis) arranged by tree and light condition as the leaves age (X axis). I have tried going into the "Analyze" menu and doing a "Fit Y by X" regression arranged by tree and light condition but what I get is a Oneway Analysis for the leaf trait and I don't know what to do with this.

2. I need to perform 1 & 2-way ANOVAS and Tukey HSD tests but I can't find the platforms for these and HELP has so far not been very helpful.

I have previously used SPSS to do stats so I am a bit lost as to how to get the above mentioned analyses done in JMP Pro.

Many thanks in advance for the help,

Cecilia

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

## Re: Linear regression with categorical X axis and ANOVA analyses

Linear regression in the context of estimating the relationship between a dependent stochastic variable and one or more independent variables is not limited to continuous variables. In regression analysis, categorical variables are often called dummy variables that take the value 0 or 1. True that the the statistical test procedure is equivalent to ANOVA but the parameterized model and the estimated prediction formula can also be viewed from a regression perspective. Actually, in JMP the Analysis of Variance report in Fit Model is categorized as one of several "Regression Reports", regardless of independent variables being categorical or not.

Fit Model can be used for both oneway and two-way analyses. Fit Model also allows you to view and save the prediction formula (i.e. the regression function with estimated parameters) and there are different options for parameterization (found under the red triangle -> Estimates...). Tukey HSD is invoked from the red triangle above each independent variable (called "Effects" in JMP).

6 REPLIES 6
Highlighted

## Re: Linear regression with categorical X axis and ANOVA analyses

There is no such thing as linear regression with categorical X's, except in the sense that it actually is ANOVA.

Oneway ANOVA in JMP is Fit Y by X

Two-Way ANOVA in JMP is Fit Model

Highlighted

## Re: Linear regression with categorical X axis and ANOVA analyses

Try using the Fit Model Platform (its under the Analyze menu, below the Fit Y by X platform you've already found)

This platform will perform a multiple linear regression

It looks like you have multiple X's , these go into the Construct Model Effects box, and your Y's go into the Y box (multiple Y's are OK)

This is a short description of how to set it up

There are a lot of other quick guides here

JMP | Learning Library

JMP Systems Engineer, Pharm and BioPharm Sciences
Highlighted

## Re: Linear regression with categorical X axis and ANOVA analyses

`Byron wrote:Try using the Fit Model Platform (its under the Analyze menu, below the Fit Y by X platform you've already found)This platform will perform a multiple linear regression`

I wouldn't call it "multiple linear regression" in the case where the original poster said she has categorical X. So I'm not sure the example you give fits.

Highlighted

## Re: Linear regression with categorical X axis and ANOVA analyses

Linear regression in the context of estimating the relationship between a dependent stochastic variable and one or more independent variables is not limited to continuous variables. In regression analysis, categorical variables are often called dummy variables that take the value 0 or 1. True that the the statistical test procedure is equivalent to ANOVA but the parameterized model and the estimated prediction formula can also be viewed from a regression perspective. Actually, in JMP the Analysis of Variance report in Fit Model is categorized as one of several "Regression Reports", regardless of independent variables being categorical or not.

Fit Model can be used for both oneway and two-way analyses. Fit Model also allows you to view and save the prediction formula (i.e. the regression function with estimated parameters) and there are different options for parameterization (found under the red triangle -> Estimates...). Tukey HSD is invoked from the red triangle above each independent variable (called "Effects" in JMP).

Highlighted

## Re: Linear regression with categorical X axis and ANOVA analyses

Apologies for not replying to answers earlier, I am in the process of writing my PhD thesis and am working on different analyses at the same time and had to concentrate on a different set for a while. Many thanks for everyone's helpful comments, in the next couple of weeks I will be getting back to these regression and ANOVA analyses and will try the different options mentioned.

Thanks again, Cecilia

Highlighted

## Re: Linear regression with categorical X axis and ANOVA analyses

Further to my original post, I am currently trying to use the Fit model platform to determine how each of my sampled leaf traits (e.g. leaf thickness, leaf area, leaf water content, leaf carbon content, etc.), vary with 3 model effects:

1. tree species (12 different trees)

2. leaf age (9 leaf ages from youngest to oldest: Y1, Y2, Y3, Y/M, M, O, S, O/S1, O/S2)