BookmarkSubscribeRSS Feed
Mahiya17
Calcite | Level 5

I need x to = 1 - 178 (observations). So far my commands are:

 

/* transform consumption and income variables into logs*/

data session3.combinedfiles;
set session3.combinedfiles;

y=log(PCECC96);
x1=log(DPIC96);
x2=log(MPRIME);
run;

 

/* multiple regression model: suppose Y now depends on x1 and x2: Y = beta0+ beta1 x1 + beta2 x2 + error*/

proc reg data=session3.combinedfiles;
model y = x1 x2;
output out=session3.est_data1 residual=e predicted=y_hat lcl=lower95 ucl=upper95;
run;
quit;

 

As you can see I don't have a column called X which simply equals id. Thank you for the help.

 

 


q1.PNG
3 REPLIES 3
Cynthia_sas
SAS Super FREQ
Hi:
This doesn't look like a Graph question. Perhaps you would get more responses if you posted this in one of the other forums, such as the SAS Statistical Procedures forum, under Analytics.

cynthia
Mahiya17
Calcite | Level 5

Thank you. I posted it there.

GraphGuy
Meteorite | Level 14

I'm not sure about the statistical proc, but if you just want to add an 'x' variable to your dataset, that contains the observation id, maybe something like this will work ...

 

data session3.combinedfiles;
set session3.combinedfiles;

x=_n_;

y=log(PCECC96);
x1=log(DPIC96);
x2=log(MPRIME);
run;

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 3 replies
  • 819 views
  • 0 likes
  • 3 in conversation