cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
yousefhan
Level II

Multi variable linear regression

Hello everyone,

 

I am working on a multivariable linear regression model for Outcome A using data from 50 countries worldwide.

I have Data on outcome A in all the 50 countries and through 20 years in each country.

So total, I have about 1000 different values of A. For the suggested predictors, I have the same as well.

But given that each country has its characteristics, I do not feel comfortable treating each value separatly.

Is there a way to adjust the model to consider that each country has 20 values and adjust for that?

 

5 REPLIES 5
Thierry_S
Super User

Re: Multi variable linear regression

Hi,

At the risk of being too simplistic, have you considered building your model as follows (in the Fit Model platform):

 

Y: A

Effects:

     Country (Nominal)

     Year (Continuous)

     Country x Year (i.e., Interaction)

 

Let us know if you are looking for something more sophisticated.

Best,

TS 

 

Thierry R. Sornasse
yousefhan
Level II

Re: Multi variable linear regression

Thank you so much for your explanation.

I want to explain the situation more to avoid any confusion.

Country Variable I have 50 entries

Outcome (A) Continuous Variable I have ( 20 columns for each country) 

Predictor (B) Continuous Variable I have ( 20 columns for each country) 

Predictor (C) Continuous Variable I have ( 20 columns for each country) 

Predictor (D) Continuous Variable I have ( 20 columns for each country) 

So in total, I have 1000 entries for the outcome/predictors

 

The photo below explains how my data is collected. I did not include the 20 years for each.

 

Can you please explain how I should adjust, given that each country has 20 values that follow particular growth? And to account for that, we have 1000 different values for each variable.

 

How do we describe the adjusted model then?

 

 

 

Capture.PNG

Thierry_S
Super User

Re: Multi variable linear regression

Hi,

First, I recommend exploring the Fit Model platform by running the examples included in the JMP documentation and Example Data.

Second, if I understand your question correctly, you will need to stack your columns into groups with one column for Outcome and one column for each Predictor, assuming that predictors B, C, and D are independent (Table > Stack > Multiple Series Stack).

Your model would then be at a minimum:

Y: Outcome A

Effects:

  • Country
  • Predictor B
  • Predictor C
  • Predictor D

Depending on the question you are asking from your model, you may also need to consider interactions between Predictors and Country.

Best,

TS

 

Thierry R. Sornasse
yousefhan
Level II

Re: Multi variable linear regression

Thanks a lot for this informative explanation.

Just last question? do I have to do any adjustments to the fit model to show that the 20 outcomes or predictors for the 20 years within each country are correlated? when analysing all countries together

in other words... If I am doing one country only then one column for each will be so simple model,

but as I am putting all countries together through years, I feel more sophisticated measures are needed, can you advise, please?

yousefhan
Level II

Re: Multi variable linear regression

Found a similar exact case somewhere else.....

Please advise

 

I'm measuring the garbage output of various cities in my country. I have 5 independent variables as predictors measured at 4 time points.

I'm not interested in the effects of time. I just want to know the regression coefficients for each of my variables. To find that out, I could do 4 separate multiple regressions, one for each time point. But that wouldn't summarize the data well, since I would have 4 sets of results. So my question is, is there a way to enter the data for all four time points and get one set of regression coefficients?