Hi guys,
I have a muiltiple regression model with 2 dummy variables. The qualitative variables in my data looks like this:
Broad | Sector |
---|---|
1 | 0 |
1 | 0 |
0 | 0 |
0 | 1 |
0 | 0 |
Each observation can belong to either the Broad category, Sector category, or neither. This would require me to have 2 dummy variables. How can I add these dummies to my model which looks like this so far:
PROC REG data=GH3 outest=est;
by symbol;
model ADV = Volume Volatility MarketCap;
(need to add my dummies to this model)
run;
quit;
data FINAL;
set est;
format Volume Volatility MarketCap e15.;
run;
proc print data = FINAL;
run;
quit;
-------------
Thanks in advance,
Razzle
I think that most of the dummy variables are added to the input dataset. If you don't want to recreate the data, you can create a view which has the dummy variables in it.
proc sql;
create view work.gh3_view as
select
t1.*
,case when t1.category='Broad' then 1 else 0 end as Broad
,case when t1.category='Sector' then 1 else 0 end as Sector
from work.gh3;
quit;
and then use that as the input data to your proc.
I think that most of the dummy variables are added to the input dataset. If you don't want to recreate the data, you can create a view which has the dummy variables in it.
proc sql;
create view work.gh3_view as
select
t1.*
,case when t1.category='Broad' then 1 else 0 end as Broad
,case when t1.category='Sector' then 1 else 0 end as Sector
from work.gh3;
quit;
and then use that as the input data to your proc.
Thanks a lot.
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 25. Read more here about why you should contribute and what is in it for you!
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.