11-14-2014 10:54 AM
Hi all, I am a newcomer to SAS and need your help.
I am running a 2 stage Heckman procedure on a panel data. I will get results of the first stage, panel probit and calculate the Inverse Mills Then I will run the second model, regression, in STATA. Actually since I could not run fixed effects probit in STATA I had to use SAS. We have a heteroscedasticity problem so I would like to enforce the se s to be robust. Below is the code.
PROC GENMOD DATA=
CLASS FIRM_ID ALLIANCE_START_YEAR;
Model DEDICATED_ALLIANCE_FUNCTION = SIC7372 SIC7373 SIC7374 FIRM_AGE FIRM_R_D_INTENSITY_T_1 FIRM_SOLVENCY_T_1 ALLIANCE_EXPERIENCE / dist = B link=probit MAXITER = 10000 TYPE3 WALD;
REPEATED subject= FIRM_ID / WITHIN= ALLIANCE_START_YEAR /* TYPE=AR(1) */;
- How can I take care of hetero problem and enforce the se s to be robust. Is there an option like in STATA vce(robust) ?
- I would like to be able to report the standardized coefficients, is there a way for that?
- I would like to calculate the Pseudo R2 or at least the loglikelihood, but someone told me that the calculation is not based on MLE? Any suggestions?
Thanks a lot!
11-17-2014 09:18 AM
I assume the heterogeneity is between ALLIANCE_START_YEAR values. If so, you might consider using PROC GLIMMIX, which has a variety of shrinkage estimators and can model heterogeneous variances. It would mean defining one of the right hand side variables as the repeated measure of interest, which doesn't seem to appear in the current model You might try:
PROC GLIMMIX DATA=
CLASS FIRM_ID ALLIANCE_START_YEAR repeatedvarname; /*where repeatedvarname identifies the repeated variable*/
Model DEDICATED_ALLIANCE_FUNCTION =repeatedvarname SIC7372 SIC7373 SIC7374 FIRM_AGE FIRM_R_D_INTENSITY_T_1 FIRM_SOLVENCY_T_1 ALLIANCE_EXPERIENCE / dist = B link=probit ddfm=kr2 solution; /*Kenward-rogers adjustment to df and standard errors*/
RANDOM repeatedvarname/subject=firm_id group=alliance_start_year type=ar(1); /*This is a G-side approach. If you wish an R-side approach, add residual after the slash*/
This will give the log likelihood, and the standardized coefficients can be calculated from the solution, which should report the estimates and the Prasad-Rao-Kecker-Harville-Jeske adjusted standard errors .