BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
saza
Quartz | Level 8

I am unsure if I am allowed to ask this question on this forum but ever since I discovered the SAS community I have increased my grades in grad school through the feedback provided on this forum. I was wondering if the people on this forum know of a place (maybe within this site) where I can ask questions on how to interpret my results from SAS. My biostatistics professor does not respond to students questions and everything is very much up to the student. I am able to obtain results such as:

data poolsize;
set newprices;
poolsize = pool*(size-2200);
run;

proc reg data=poolsize;
model price = poolsize pool/CLB;
run;

saza_0-1648316760351.png

And although I was able to obtain this data through SAS I wanted to know if I am allowed to ask if my interpretation (below) is correct when analyzing my results. Maybe there is a different forum for this. Any direction would help. Mainly would like to talk about my results obtained through SAS.

  1. Consider the model below:

PRICE = β0 +β1 POOL +β2(SIZE −2200)+β3 POOL(SIZE −2200)+ε

saza_2-1648349517403.png

 

saza_1-1648316851181.png

UPDATED RESULTS AND TABLE:

 

saza_0-1648349429909.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
sbxkoenk
SAS Super FREQ

Hello,

 

( I think ) you can ask about interpretation of SAS output. Why not?

This forum is there to help (whatever SAS help).

 

It is also good you are mentioning that you are a student. Most members will provide students with "anchors", but not the ready-made solution (we don't do your homework). In the long run, this will help you best.

 

To start with ...

PRICE ββPOOL β2(SIZE −2200) + βPOOL(SIZE −2200)+ε

This is not the model you have fit.

You haven't calculated (SIZE −2200) and you have not asked for β2.

 

Also, we need some info about the inputs.
Is pool a binary indicator on pool presence (1 if YES, 0 if NO)?

 

Thanks,

Koen

View solution in original post

13 REPLIES 13
sbxkoenk
SAS Super FREQ

Hello,

 

( I think ) you can ask about interpretation of SAS output. Why not?

This forum is there to help (whatever SAS help).

 

It is also good you are mentioning that you are a student. Most members will provide students with "anchors", but not the ready-made solution (we don't do your homework). In the long run, this will help you best.

 

To start with ...

PRICE ββPOOL β2(SIZE −2200) + βPOOL(SIZE −2200)+ε

This is not the model you have fit.

You haven't calculated (SIZE −2200) and you have not asked for β2.

 

Also, we need some info about the inputs.
Is pool a binary indicator on pool presence (1 if YES, 0 if NO)?

 

Thanks,

Koen

saza
Quartz | Level 8
First of all thank you so much for responding. I was not expecting a response so quickly. Pool is a binary variable
saza
Quartz | Level 8
This was my code:
data poolsize;
set newprices;
poolsize = pool*(size-2200);
run;

proc reg data=poolsize;
model price = poolsize pool/CLB;
run;
sbxkoenk
SAS Super FREQ

Hello,

 

If you want to fit this model :

PRICE β+βPOOL +β2(SIZE −2200)+βPOOL(SIZE −2200)+ε

 

I think this code is closer to what you want :

data poolsize;
 set newprices;
 sizeMinus = size-2200;
 poolsize  = pool * sizeMinus;
run;

proc reg data=poolsize;
model price = pool sizeMinus poolsize / CLB;
run; 

Koen

saza
Quartz | Level 8
Hi Koen,
Thank you for your code! I was able to update my question with my current interpretation and the results from the code provided. Just was wondering if my interpretation is ok
sbxkoenk
SAS Super FREQ

Hello,

 

The interpretation was more or less OK, but why are you putting Model Parameter and Point Estimate on one line?

The Point Estimate is just ANOTHER Model Parameter. 

All three (model) parameters (beta 1|2|3) have a point estimate and an interval estimate.

 

If you doubt about interpretation, just set up a SCORE test as below, and play with the inputs:

data have;
 pool=1; size=2301; output;
 pool=0; size=2700; output;
 pool=0; size=1950; output;
run;

data want;
 set have;
beta0 = 165665;
beta1 = -6527.47441;
beta2 = 103.05342;
beta3 = -16.80690;
PRICE = beta0 + beta1*POOL + beta2*(SIZE −2200) + beta3*POOL*(SIZE −2200);
run;
/* end of program */

Koen

saza
Quartz | Level 8
I was given the tables by my porfessor which made us list everything on one line but the way you broke it down makes a lot of sense and I was able to edit some of the other model questions. I was wondering if I can tweak my proc reg code to add a regression line relating the price and size of houses that have pools and overlay it for houses that do not have pools?
sbxkoenk
SAS Super FREQ

Of course,

do something like :

 

proc sgplot data=MyLib.MyDataSet;
   reg y=price x=sizeMinus / degree=1 group=pool 
                             markerattrs=(size=3px) name='a';
   keylegend 'a' / location=inside position=topright across=1;
run;

Take care --> no interaction effect in above code !

 

See here for more info:

Multiple Fit Functions Using PROC SGPLOT
https://go.documentation.sas.com/doc/en/statug/15.2/statug_odsgraph_sect081.htm

You can get rid of the degree 1 spline and do a real linear regression as well.
Look at the REG statement in PROC SGPLOT documentation!

 

[EDIT] : you can also make a series plot with group=pool , using PROC SGPLOT.
Do this on the scored dataset (dataset with predictions).
That way, you do not make another model with PROC SGPLOT !

 

Koen

saza
Quartz | Level 8
Actually I believe this code I came up with from previous lectures works as well! Thanks Koen!
proc sgplot data=poolsize;
reg x = size2200 y=price/group=pool;
run;
I'm basically done with this assignment and was asked to determine the model parameter and interpretation for the following code:
proc glm data=example;
class eyecolor (ref=’1’)/param=ref;
model response = eyecolor; run;

When I run it on SAS nothing happens so i'm assuming its more of a rhetorical question?
saza
Quartz | Level 8
Thanks for all your help, I genuinely feel your breakdown has helped me understand regressions models.
sbxkoenk
SAS Super FREQ

You are welcome.

 

With regard to that other code :

proc glm data=example;
class eyecolor (ref='1') / param=ref;
model response = eyecolor; 
run;

You should at least see a message in the LOG as to why results are not produced!

GLM = General Linear Model.

Your input is categorical (with 2+ eye color values). You apply reference coding to your input (and '1' is the reference level).

This is an ANOVA analysis (one-way ANOVA) !

 

Koen

saza
Quartz | Level 8
The log says that the data example does not exist and there was no introduction to it earlier which is why I think its not supposed to work but rather I come up with my interpretation?
sbxkoenk
SAS Super FREQ

@saza wrote:
The log says that the data example does not exist and there was no introduction to it earlier which is why I think its not supposed to work but rather I come up with my interpretation?

Maybe the professor just wants you to explain what would be the outcome of such code indeed.

 

Here is an example of a working one-way ANOVA :

Example 52.10 Testing for Equal Group Variances

https://go.documentation.sas.com/doc/en/statug/15.2/statug_glm_examples10.htm

 

Good luck with your studies,

Koen

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 13 replies
  • 1121 views
  • 3 likes
  • 2 in conversation