Question
data one; set SASUSER.COMPANYDATA; /* Create new variables by dividing existing variables by Price */ Deflated_UE = Earnings_Diff / SPBSdate; Deflated_FR = Forecast_Rev / SPBSdate;
data one; set SASUSER.COMPANYDATA;
/* Create new variables by dividing existing variables by Price */ Deflated_UE = Earnings_Diff / SPBSdate; Deflated_FR = Forecast_Rev / SPBSdate;
/* Examine correlation */ proc corr data=one; var BMARQT Earnings_Diff Forecast_Rev deflated_UE deflated_FR; run;
/* Run regressions by fiscal quarter */ %macro run_regressions; %do i=1 %to 4; /* Undeflated variables regression */ proc reg data=one; by FISQRT; where FISQRT=&i; model BMARQT = Earnings_Diff Forecast_Rev; title 'Undeflated Variables Regression for Fiscal Quarter &i'; run;
/* Deflated variables regression */ proc reg data=one; by FISQRT; where FISQRT=&i; model BMARQT = Deflated_UE Deflated_FR; title 'Deflated Variables Regression for Fiscal Quarter &i'; run;
%end; %mend run_regressions;
%run_regressions;
/* Step 1: Create the Met variable */ data two; set one; if Earnings_Diff >=0 then Met=1; else Met=0; run;
/* Step 2: Run regressions with the Met variable */ proc reg data=two; model BMARQT = Earnings_Diff Forecast_Rev Met / vif; title 'Undeflated Variables Regression with Met'; run;
proc reg data=two; model BMARQT = Deflated_UE Deflated_FR Met / vif; title 'Deflated Variables Regression with Met'; run;
/* Step 3: Split data by fiscal quarter */ proc sort data=two; by FISQRT; run;
%macro run_regression_with_met; %do i=1 %to 4; data quarter&i.; set two; if FISQRT = &i.; run;
proc reg data=quarter&i.; model BMARQT = Earnings_Diff Forecast_Rev Met / vif; title 'Undeflated Variables Regression with Met - Quarter &i.'; run;
proc reg data=quarter&i.; model BMARQT = Deflated_UE Deflated_FR Met / vif; title 'Deflated Variables Regression with Met - Quarter &i.'; run; %end; %mend run_regression_with_met;
%run_regression_with_met;
/* Define the array and loop to convert variables into thousands of dollars */ data two; set one;
/* Define the array for variables to be converted */ array vars[*] TABSdate CIBSdate CSBSdate;
/* Loop through each variable in the array */ do i = 1 to dim(vars); /* Convert each variable to thousands of dollars */ vars[i] = vars[i] * 1000; end;
drop i; /* Drop the temporary index variable */ run;
What do you find? How do the correlations compare across the four variables?
For each regression, examine the following: a. The coefficient estimate for each variable. b. The t-statistic for each variable; is it statistically significant in the predicted direction? c. The adjusted R2 for each model.
How would you interpret the coefficient on the MET variable?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started