Hi all SAS Users,
Have a nice week,
Today I want to run PROC REG with a subsample, I know one way is to create a subsample and run PROC REG, but I wondering if there is any way to run directly in PROC REG procedure without another data step for creating a subsample.
My code of running for the WHOLE sample as below:
proc reg data=merge_treat_con_copy;
model wINV_DAY= pt wFIRM_SIZE LNGDP UNEMPLOYMENT INFLATION
wTANGIBILITY FCF wLOG_MVE wCAP_INT wGRO_MAR/ tol vif collin;
run;
Now I want to run where INDC3="RTLS".
Can you please hint me to sort it out?
Warmest regards and thanks,
Phil.
@Phil_NZ wrote:
Hi all SAS Users,
Have a nice week,
Today I want to run PROC REG with a subsample, I know one way is to create a subsample and run PROC REG, but I wondering if there is any way to run directly in PROC REG procedure without another data step for creating a subsample.
My code of running for the WHOLE sample as below:
proc reg data=merge_treat_con_copy; model wINV_DAY= pt wFIRM_SIZE LNGDP UNEMPLOYMENT INFLATION wTANGIBILITY FCF wLOG_MVE wCAP_INT wGRO_MAR/ tol vif collin; run;
Now I want to run where INDC3="RTLS".
Can you please hint me to sort it out?
Warmest regards and thanks,
Phil.
Your question includes the answer. Just use a WHERE statement.
where INDC3="RTLS";
proc reg data=merge_treat_con_copy(where=(indc3='RTLS'));
@Phil_NZ wrote:
Hi all SAS Users,
Have a nice week,
Today I want to run PROC REG with a subsample, I know one way is to create a subsample and run PROC REG, but I wondering if there is any way to run directly in PROC REG procedure without another data step for creating a subsample.
My code of running for the WHOLE sample as below:
proc reg data=merge_treat_con_copy; model wINV_DAY= pt wFIRM_SIZE LNGDP UNEMPLOYMENT INFLATION wTANGIBILITY FCF wLOG_MVE wCAP_INT wGRO_MAR/ tol vif collin; run;
Now I want to run where INDC3="RTLS".
Can you please hint me to sort it out?
Warmest regards and thanks,
Phil.
Your question includes the answer. Just use a WHERE statement.
where INDC3="RTLS";
1 & 2 are available in almost ALL process in SAS.
You've seen examples of all in the past few months so I assume you know how to code them.
@Phil_NZ wrote:
Hi all SAS Users,
Have a nice week,
Today I want to run PROC REG with a subsample, I know one way is to create a subsample and run PROC REG, but I wondering if there is any way to run directly in PROC REG procedure without another data step for creating a subsample.
My code of running for the WHOLE sample as below:
proc reg data=merge_treat_con_copy; model wINV_DAY= pt wFIRM_SIZE LNGDP UNEMPLOYMENT INFLATION wTANGIBILITY FCF wLOG_MVE wCAP_INT wGRO_MAR/ tol vif collin; run;
Now I want to run where INDC3="RTLS".
Can you please hint me to sort it out?
Warmest regards and thanks,
Phil.
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!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.