turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- how to estimate a regression model

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-15-2010 03:41 PM

I have one dependent variable, three independent variables, I am to estimate a regression model. Actually, I am not very sure about the procedure to do this.

Till so far, I ran GLM procedure for each independent variable, and found that two themselves are significant, one itself is not. So next, should I do interaction for all of them? No matter significant or not, or something else?

Set the dependent variable is A, the independent variables are B, C and D, I use the following model

"model A=B|C|D", then find there is no output, I guess it is because of the DF?

Who can help me with this?

...Thank you all.

Till so far, I ran GLM procedure for each independent variable, and found that two themselves are significant, one itself is not. So next, should I do interaction for all of them? No matter significant or not, or something else?

Set the dependent variable is A, the independent variables are B, C and D, I use the following model

"model A=B|C|D", then find there is no output, I guess it is because of the DF?

Who can help me with this?

...Thank you all.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to deleted_user

09-15-2010 03:50 PM

Generally, you decide on the appropriate model without looking at the data. You use your knowledge of the system that you are studying to say. For example: youd decide you want main effects for B, C and D, and the B*C interaction and the B*D interaction, but not the C*D interaction. This is not something I can help with, you or someone you work with should be able to specify this.

Once that is done, you fit the model, all desired terms. At this point, statisticians disagree; however my advice is to leave all terms in the model. Evaluate the model by examining the residuals. If there are problems in the residuals, you may need to modify the model.

As far as your problem where there is no output, you'd have to tell us more, or show us the listing and/or log file.

Once that is done, you fit the model, all desired terms. At this point, statisticians disagree; however my advice is to leave all terms in the model. Evaluate the model by examining the residuals. If there are problems in the residuals, you may need to modify the model.

As far as your problem where there is no output, you'd have to tell us more, or show us the listing and/or log file.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Paige

09-15-2010 04:02 PM

I will work on deciding the main effects, thank you so much!

The problem I said there is no output means, in the output window, there is "..." instead of numbers for the F-value and P-value. Is it about DF?

Thank you.

The problem I said there is no output means, in the output window, there is "..." instead of numbers for the F-value and P-value. Is it about DF?

Thank you.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to deleted_user

09-16-2010 09:46 AM

Can you show me an example of the output?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Paige

09-16-2010 12:07 PM

Source DF Squares Mean Square F Value Pr > F

Model 103 364649.9615 3540.2909 . .

Error 0 0.0000 .

Corrected Total 103 364649.9615

R-Square Coeff Var Root MSE score Mean

1.000000 . . 81.98077

Source DF Type I SS Mean Square F Value Pr > F

gdp 93 328054.4615 3527.4673 . .

pop 10 36595.5000 3659.5500 . .

gdp*pop 0 0.0000 . . .

Source DF Type III SS Mean Square F Value Pr > F

gdp 3 657.00000 219.00000 . .

pop 10 36595.50000 3659.55000 . .

gdp*pop 0 0.00000 . . .

See, the F value and P-value is ...

Thank you, Paige.

Model 103 364649.9615 3540.2909 . .

Error 0 0.0000 .

Corrected Total 103 364649.9615

R-Square Coeff Var Root MSE score Mean

1.000000 . . 81.98077

Source DF Type I SS Mean Square F Value Pr > F

gdp 93 328054.4615 3527.4673 . .

pop 10 36595.5000 3659.5500 . .

gdp*pop 0 0.0000 . . .

Source DF Type III SS Mean Square F Value Pr > F

gdp 3 657.00000 219.00000 . .

pop 10 36595.50000 3659.55000 . .

gdp*pop 0 0.00000 . . .

See, the F value and P-value is ...

Thank you, Paige.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to deleted_user

09-16-2010 12:17 PM

You have an overdetermined model. In other words, too many terms in the model for the number of data points available, which results in all of these issues, 0 degrees of freedom for error, no P-values, no F-values and 100% r-squared.

I don't know what GDP is to you, but are there really 93 discrete levels (and is it a categorical variable)? Same question applies to POP.

I don't know what GDP is to you, but are there really 93 discrete levels (and is it a categorical variable)? Same question applies to POP.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Paige

09-16-2010 12:44 PM

Hi, Paige

My GDP is not a categorical variable, it can be quantified.

My goal is to estimate a regression model, with four variables, A as the dependent variable, B, C and D as the three independent variables...

I feel like confused, do I need to do ANOVA for each independent variable? Or can I just do proc reg? I see the resulf from proc reg, I can directly get a model(equality) with 3 coefficients and an error...

As a professional SAS programmer, what will you do when you are asked to estimate a regression model?

Thank you.

My GDP is not a categorical variable, it can be quantified.

My goal is to estimate a regression model, with four variables, A as the dependent variable, B, C and D as the three independent variables...

I feel like confused, do I need to do ANOVA for each independent variable? Or can I just do proc reg? I see the resulf from proc reg, I can directly get a model(equality) with 3 coefficients and an error...

As a professional SAS programmer, what will you do when you are asked to estimate a regression model?

Thank you.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to deleted_user

09-16-2010 01:02 PM

Make sure that if a variable is not a categorical variable that it is not in the class statement in proc reg. That could be your problem.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to deleted_user

09-16-2010 01:36 PM

These variables should not be in the CLASS statement in PROC GLM. Then they will be treated as continuous and your degrees of freedom problem should go away.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Paige

09-20-2010 02:39 PM

I FIXED IT.

Thank you very much! Paige!

Thank you very much! Paige!