BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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.
9 REPLIES 9
Paige
Quartz | Level 8
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.
deleted_user
Not applicable
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.
Paige
Quartz | Level 8
Can you show me an example of the output?
deleted_user
Not applicable
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.
Paige
Quartz | Level 8
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.
deleted_user
Not applicable
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.
RickM
Fluorite | Level 6
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.
Paige
Quartz | Level 8
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.
deleted_user
Not applicable
I FIXED IT.
Thank you very much! Paige!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 9 replies
  • 864 views
  • 0 likes
  • 3 in conversation