Pyrite | Level 9

## Journal quaity regression output table

Hello Everyone,

Following on the post by zzecon

I would also like to produce regression output like this one:

Using the following code, I get a slightly diffferent output.

/*write a dataset with standard error on the same column of coefficient*/

data parmest_;

set work.parmest;

if not missing(stderr) and variable not in ('R-Square','Root MSE','N. Obs.') then do;

value=estimate; type='coefficient'; output; end;

if not missing(stderr) then do; value=stderr; type='stderr' ;output; end;

if variable in ('R-Square','Root MSE','N. Obs.') then do; value=estimate; type=variable ;output; end;

run;

proc format;

picture stderrf (round)

low-high=' 9.9999)' (prefix='(')

.=' ';

run;

proc report data=parmest_ nowd out=table;

column numord variable type dependent, (probt value);

define numord /group order=data noprint;

define variable / group order=data ' ';

define type / group order=data noprint;

define dependent / across ' ';

define value /analysis sum;

define probt /analysis sum;

compute value;

array cc _c8_ _c6_ _c4_ ;

if type='stderr' then do;

call define(_col_,'format','stderrf.');

end;

else do;

call define(_col_,'format','8.4');

do i= 1 to 3;

if ~missing(cc(i)) then do;

if 0.05<cc(i) <= 0.1 then call define(_col_, "style", "style=[ posttext='*']" );

else if 0.01 <cc(i) <=0.05 then call define(_col_, "style", "style=[ posttext='**']" );

else if cc(i) <= 0.01 then call define(_col_, "style", "style=[ posttext='***']" );

leave; end;

end;

end;

endcomp;

run;

This is what my output table looks like:

I see two problems:

1. I have two regressions.  I would like to see the output side-by-side (as above) I only see one here.

2. the coefficients and standard error values are actually different than in my table (attached), as if I would changing it unintentionally.

indavgcostPr > |t| value
 Intercept <.0001 8453.102*** <.0001 (1.3810) tag13 0.7400 -127.069 0.7400 (9.6254) avgcontract <.0001 -1224.34*** <.0001 (8.2317) tag13*avgcontract 1.5562 46.4737 1.5562 (2.5511) ses 0.0530 -42.3237* 0.0530 (1.8749) female 0.0064 -780.368*** 0.0064 (6.3947) age_gr <.0001 -2138.21*** <.0001 (4.8519) age_gr <.0001 -1909.67*** <.0001 (4.0391) age_gr <.0001 -1802.40*** <.0001 (2.4117) age_gr <.0001 -1830.20*** <.0001 (0.5354) age_gr <.0001 -1448.62*** <.0001 (3.2364) age_gr <.0001 -1609.45*** <.0001 (1.8672) age_gr <.0001 -1557.71*** <.0001 (4.7518) age_gr <.0001 -1618.78*** <.0001 (1.6792) age_gr <.0001 -1112.25*** <.0001 (4.4247) age_gr <.0001 -1069.81*** <.0001 (3.9204) age_gr <.0001 -1245.90*** <.0001 (0.5962) age_gr <.0001 -1336.19*** <.0001 (7.3560) age_gr <.0001 -1608.00*** <.0001 (6.7212) age_gr <.0001 -1644.24*** <.0001 (7.9121) age_gr <.0001 -993.303*** <.0001 (8.1234) age_gr <.0001 -1310.02*** <.0001 (2.4610) age_gr <.0001 -1282.29*** <.0001 (9.3784) age_gr 0.5106 210.1890 0.5106 (9.4449) age_gr 0.0015 -1615.85*** 0.0015 (0.1211) female*age_gr 0.0013 1127.503*** 0.0013 (0.1875) female*age_gr 0.0033 992.5148*** 0.0033 (7.4810) female*age_gr 0.0353 694.6752** 0.0353 (9.9497) female*age_gr 0.0659 623.0732* 0.0659 (8.8363) female*age_gr 0.1377 504.2382 0.1377 (9.6422) female*age_gr <.0001 1491.246*** <.0001 (3.3474) female*age_gr <.0001 1339.971*** <.0001 (8.7947) female*age_gr 0.0010 1102.112*** 0.0010 (4.9940) female*age_gr 0.0991 536.0772* 0.0991 (5.0355) female*age_gr 0.9996 -0.1699 0.9996 (4.0705) female*age_gr 0.0296 700.1651** 0.0296 (1.9080) female*age_gr 0.0951 534.5546* 0.0951 (0.2453) female*age_gr 0.0134 788.9965** 0.0134 (9.1323) female*age_gr 0.1294 491.9362 0.1294 (4.3554) female*age_gr 0.0600 624.4005* 0.0600 (1.9166) female*age_gr 0.0006 1197.305*** 0.0006 (8.4239) female*age_gr 0.0184 860.5910** 0.0184 (5.0921) female*age_gr 0.0267 -959.616** 0.0267 (2.9871) female*age_gr 0.1352 921.4893 0.1352 (6.853)
1 ACCEPTED SOLUTION

Accepted Solutions
Pyrite | Level 9

## Re: Journal quaity regression output table

Thx for your reply. I've actually found some mistakes. i will close this question and reopen another one with new dataset and code. Tx.
2 REPLIES 2
Diamond | Level 26

## Re: Journal quaity regression output table

1. Both outputs need to be somehow merged into the same data set and then run PROC REPORT to get both outputs side-by-side.

2. Give us a specific example, so we don't have to scroll through this mass of data and find the discrepancy on our own.

--
Paige Miller
Pyrite | Level 9

## Re: Journal quaity regression output table

Thx for your reply. I've actually found some mistakes. i will close this question and reopen another one with new dataset and code. Tx.
Discussion stats
• 2 replies
• 1904 views
• 0 likes
• 2 in conversation