cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
RVhydrA
Level III

ANCOVA with 1 continuous X and 2 categorical X variables

I am trying to run an ANCOVA on a dataset with a continuous Y variable (streamflow) and a continuous X variable (Precipitation), additionally I have two categorical variables "Period" (A and B) and "Station" (1, 2, 3, 4, and 5). My goal is to explore the relation between streamflow and precipitation within each period - comparing the slopes of those relations across stations, and then compare the slopes of those relations within each station across the periods. The kicker is that I already successfully did this over a year ago, I have the results, but now I need to rerun it and I have no idea how I did it. I assume its in fit model but I've got a brain block at the moment. 

3 REPLIES 3

Re: ANCOVA with 1 continuous X and 2 categorical X variables

Just guessing here as I do not have your results to go on, but I think it would be Fit Model. Specify Streamflow as the Y. Highlight the Precipitation, Period, and Station columns and click the Macros button. Choose Full Factorial and click Run (Note: from your description I believe you do want the three-way interaction in the model).

 

The interaction terms in the output will indicate if the Precipitation slope is changing for the various periods or stations. Let us know if this matches your previous analysis. If not, could you provide some of the results from that previous analysis?

Dan Obermiller
P_Bartell
Level VIII

Re: ANCOVA with 1 continuous X and 2 categorical X variables

I agree with everything @Dan_Obermiller suggests. In addition, you might want to start your analysis with some time spent in Graph Builder exploring the response as a function of the x's. Including a local data filter, and maybe some animations could really jazz up your visual exploration of the data.

RVhydrA
Level III

Re: ANCOVA with 1 continuous X and 2 categorical X variables

Thanks to both of you. Dan, I tried your method but found it hard to interpret the results or replicate my previous results. Though I agree, that is how I also thought to conduct this analysis. Ultimately, I went about it the slow stupid way and was able to repeat my result. I ran a fit model with Y: Streamflow, By: Period, and Effects with Full Factorial: Precipitation, Station, Precip X Station. Then on the results for each period I ran Estimates - Multiple Comparisons - All Pairwise. This gave me the analysis of slopes between stations for each period. Then I went back and reran the fit model switching the By variable with Station and the effect variable Period. Ran that test and performed one-way ANCOVAs on each station. I was able to repeat my original results. I know the way I originally did it was much smoother than that, If only I wrote these things down! Thanks again.