Multivarite Procedures in SAS 1 Introduction the goal of the data methods that we have been discussing is to prepare a data set analysis file that can be used in an empirical investigation we have discussed some simple statistics and cross tabulations that can be performed in SAS these procedures indicate general associations in the data the procedures do not account for indirect and possibly confounding influences from other observed variables estimates of direct or partial associations that account for these indirect influences come from multivariate procedures such as regression analyses probit procedures etc SAS has many multivariate routines some of these will be immediately recognizable many others are available but tougher to find SAS is written for a broad set of users the descriptions that other scientists use and that SAS uses do not always line up with the descriptions that economists use should you actually use these routines it can be convenient to use the routines available in SAS however economists often find the routines in packages like Stata to be more useful can t make a good choice without knowing at least some of what s available in SAS 2 PROC REG1 the SAS regression procedure PROC REG is the workhorse of multivariate procedures it estimates OLS regressions basic syntax and operation PROC REG regression options model label MODEL dep var list of explanatory variables model options where the dep var is a SAS variable with the dependent or outcome variable in the regression the list of expanatory variables is a list separated by spaces of independent variables in the regression model label is a label that will appear in all of the output associated with this model it is useful for producing readable output unless asked to do otherwise the REG procedure automatically includes an intercept term to drop the intercept use the NOINT model option 1 See http support sas com documentation cdl en statug 59654 HTML default reg toc htm 1 the REG procedure outputs estimated coefficients coefficient standard errors as well as test statistics and p values under the null hypothesis that the true coefficient is zero for the intercept and independent variables the REG procedure also calculates the residual sum of squares the R2 and adjusted R2 statistics the mean square error F test statistics and other statistics estimating many models PROC REG can be modified to estimate many models in the same procedure i e without calling another regression procedure multiple MODEL statements can be included in the same procedure also a list of dependent variables can be provided instead of a single dependent variable all variables that appear before the equals sign in the MODEL statement are treated as dependent variables testing and correcting for heteroskedasticity including the SPEC model option leads to a heteroskedasticity specification test artificial regression test being performed including the ACOV model option leads to a heteroskedasticity consistent variance covariance matrix being calculated note that newer versions of SAS starting with version 9 2 will have more convenient and flexible options testing for first order autocorrelation the DWPROB model option will lead to a first order Durbin Watson test with a corresponding p value for the null hypothesis of no autocorrelation note that the DWPROB option assumes that the data are sorted in chronological order tests of model restrictions restrictions on the coefficients from the last specified model can be tested using the TEST statement syntax test label TEST test expression 1 test expression 2 test expression k the test expressions are mathematical expressions involving the explanatory variables coefficients actually from the regression model if equals signs are included in an expression TEST tests the actual specification if equals signs are omitted TEST tests the hypothesis that all of the expressions are jointly equal to zero multiple TEST statements can be issued in the same REGgression procedure examples PROC REG MODEL y x1 x2 x3 TEST x2 0 x3 0 estimates a regression with y as the dependent variable and x1 x2 and x3 as the independent variables 2 it then tests the null hypothesis that x2 x3 0 i e that x2 and x3 are jointly equal to zero note that TEST x2 x3 would have tested the same hypothesis TEST x2 x3 and TEST x2 x3 test the null hypothesis that x2 x3 TEST x2 1 and TEST x2 1 test the null hypothesis that x2 1 outputting predictions and residuals a data set with predictions and residuals from the regression can be produced using the OUTPUT statement the OUTPUT will produce these statistics for the last MODEL estimated multiple OUTPUT statements can be included the OUTPUT statement must include at least one statistics keyword P prediction variable generates and stores predictions R residual variable generates and stores estimated residuals see the documentation for additional supported statistics the OUTPUT data set would contain one observation for every observation read into the REGression procedure it also will contain copies of all of the dependent and independent variables used in the procedure outputting coefficient estimates including the option OUTEST SAS data set in the PROC REG statement causes the procedure to create a SAS data set containing the coefficients for all of the estimated models the data set contains one observation per model estimated models are identified by a MODEL variable and by the names of the dependent variables coefficients are stored in variables with the same names as the explanatory variables 3 PROC LOGISTIC the primary procedure for running binary choice models is PROC LOGISTIC as the name suggests PROC LOGISTIC estimates logit models however it also estimates probit and other types of models SAS has a PROC PROBIT that can be configured to estimate binary choice probit models the standard specification estimates another type of model syntax PROC LOGISTIC options MODEL response specification resp variable options list of independent variables model options the response specification can be of two types 3 a binary variable or ordered categorical variable positive outcomes total outcomes where the first term is a SAS variable with the number of positive outcomes in a grouped observation and the second term is the total number of outcomes this is used to estimate grouped binary data note that you can only specify one MODEL per LOGISTIC procedure to estimate multiple models you need to
View Full Document
Unlocking...