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
tang1111
Level I

help:multiple regression

hi, does anyone know how to compare two multiple regression?

i have two years data, so each year I will make a multiple regression using the same independent and dependent variable just different 2 years. how I can compare these two 

3 REPLIES 3
SDF1
Super User

Re: help:multiple regression

Hi @tang1111 ,

 

  It kind of depends on what/how you want to compare the two. In the simplest case, let's consider that you have three columns: date, X, and Y. Apparently, Date spans two years, say 2019 and 2020. If you do a fit Y by X casting the corresponding columns into their roles, and then put the date (as a year only value) in the By role, then you'll get two regression fits for 2019 and 2020, respectively.

 

  After that, it's really how you are comparing the two fits that counts for the next questions. You might need to make a new column formula for the date (right click the date column > new column formula > date and time > year). This would be needed if you have your date column in a YYYY/MM/DD format, or something similar. If you try to use a date column with that kind of format in the By role, then you'll get a regression for each individual day, which wouldn't make much sense.

 

  Without specifying any more details of your current issues at hand, it's hard to provide further suggestions. If you can provide a data table (e.g. anonymized and/or standardized), it might be easier to go into more detail as to what you're looking for.

 

Hope this helps!,

DS

statman
Super User

Re: help:multiple regression

@tang1111 , First, welcome to the community. Just adding, what comparisons do you want to make?  RSquare, RSquare adjusted, RMSE, p-values, residuals, CV, etc. There are many statistics used to compare or build models.

"All models are wrong, some are useful" G.E.P. Box
Georg
Level VII

Re: help:multiple regression

As others already stated there are many ways and questions.

It also depends on what version you use (Pro or not).

But maybe here is a starting point:

I opened Big Class sample table,

made age to continuous,

and used Fit y by x to build a regression model,

age and height to x, 

weight to y,

and used sex (instead of year) for the by rule.

This gave me a report with two regression models, one for male and one for female.

Here already you can compare the numbers like Rsquare etc.

Additionally you can save the model as formula for each by group,

and finally you can plot predicted over actual by age (in your case year then).

And you can review the formula for both groups.

The Script will start the Big Class example.

In Jmp Pro there is a model compairing function.

Is this what you want?

Georg_0-1618609450316.png

Georg_1-1618609858847.png

Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
column(dt, "Age") << set modeling type( "Continuous" );

model = dt << Fit Model(
Y( :weight ),
By( :sex ),
Effects( :age, :height ),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Run(
:weight << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Scaled Estimates( 0 ),
Plot Actual by Predicted( 0 ), Plot Regression( 0 ),
Plot Residual by Predicted( 0 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 0 ), Plot Residual by Normal Quantiles( 0 ),
Box Cox Y Transformation( 0 )}
)
);

 

Georg