Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

/* Replace ONLY the values of XXX with the requested information */

/* Indicate the full filepath of your SAS data set


/* Note: Include the file extension
%LET FILE='XXX';

*/
*/

/**************/
/* REGRESSION */
/**************/
/* Do you want to perform a regression? (YES/NO)
%LET REGRESSION_STATUS=XXX;

*/

/* If YES, identify your dependent variable


/* Otherwise skip this portion
%LET REGRESSION_DEP=XXX;

*/
*/

/* If YES, identify your independent variable(s)


/* Otherwise skip this portion
/* Include a single space between multiple variables
%LET REGRESSION_IND=XXX;

*/
*/
*/

/***********************/
/* LOGISTIC REGRESSION */
/***********************/
/* Do you want to perform a logistic regression? (YES/NO)
%LET LOG_REGRESSION_STATUS=XXX;

*/

/* If YES, identify your dependent variable


/* Note: Must be a binary variable
%LET LOG_REGRESSION_DEP=XXX;

*/
*/

/* If YES, identify your dependent variable(s)


/* Include a single space between multiple variables
%LET LOG_REGRESSION_IND=XXX;

*/
*/

/**********************************************/
/*
DO NOT EDIT BELOW THIS LINE
*/
/**********************************************/
%MACRO REGRESSION;
%IF &REGRESSION_STATUS=YES %THEN
%DO;
TITLE 'Regression Results';
PROC REG DATA=&FILE;
MODEL &REGRESSION_DEP = &REGRESSION_IND;
RUN;
FOOTNOTE1 'If your null is j=0, your t-stat is valid';
FOOTNOTE2 'If your alternative is j NE 0, your p-value is valid';
TITLE;
%END;
%MEND REGRESSION;

%REGRESSION
%MACRO LOG_REGRESSION;
%IF &LOG_REGRESSION_STATUS=YES %THEN
%DO;
TITLE 'Logistical Regression Results';
PROC QLIM DATA=&FILE;
MODEL &LOG_REGRESSION_DEP = &LOG_REGRESSION_DEP
/ DISCRETE (D=LOGISTIC);
RUN;
FOOTNOTE1 'If your null is j=0, your t-stat is valid';
FOOTNOTE2 'If your alternative is j NE 0, your p-value is valid';
TITLE;
%END;
%MEND LOG_REGRESSION;
%LOG_REGRESSION

You might also like