I need x to = 1 - 178 (observations). So far my commands are:
/* transform consumption and income variables into logs*/
/* 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;
As you can see I don't have a column called X which simply equals id. Thank you for the help.
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 ...
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.
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.