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

Hi! I'm running a multiple regression procedure, and we were asked to "obtain a 95% interval estimate of the mean rental rate for the following specifications of the explanatory variables: age_of_prop=5, operate_exp=8.5, vacancy_rate=0.15, total_sqft=250000. My issue is that when I create a new data set to obtain this specific information, the dataset returns 0 values, so nothing prints.

 

Is my "AND" boolean logic correct in the IF statement, or should I be using something different to say "this and that and that"?

 

Here I've just set up the regression procedure - it outputs to the set "results"

proc reg data=cre;
model rate_per_sq= age_of_prop operate_exp vacancy_rate total_sqft
/stb clm cli clb alpha = .01;

output out=results predicted=yhat LCLM=LCLMEAN UCLM=UCLMEAN LCL=LCLPRED UCL=UCLPRED STDP=SEmean STDI=SEi;

run;

 

 

Here is where I establish the new dataset. The if statement works if it states something obvious like "IF(1=1 and 2=2)," but I can't get it to return data when I want it to predict the rate_per_sq when the statement is defined as it is below.
data results_1;
set results;
if(age_of_prop=5 AND operate_exp=8.5 AND vacancy_rate=0.15 AND total_sqft=250000);

run;

 

proc print data=results_1;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Make sure that your input data set has the combination of values that you want to evaluate but make sure that the RATE is missing. I have to assume the your "rental rate" is the rate_per_sq variable since you do not state so explicitly (hint: indicate which variable you mean).

 

You will find the predicted value and the associate confidence limits in your results output set.

View solution in original post

2 REPLIES 2
ballardw
Super User

Make sure that your input data set has the combination of values that you want to evaluate but make sure that the RATE is missing. I have to assume the your "rental rate" is the rate_per_sq variable since you do not state so explicitly (hint: indicate which variable you mean).

 

You will find the predicted value and the associate confidence limits in your results output set.

heydaloran
Calcite | Level 5

You're right! I forgot that the IF statement can't draw predictive conclusions. it simply looks for and selects the values in the dataset, of which they didn't exist..

 

What I ended up doing is appending the data it requested to the original dataset. Then I ran the same statement and it worked fine.

 

Thanks for your help!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 2 replies
  • 1308 views
  • 2 likes
  • 2 in conversation