|
楼主

楼主 |
发表于 2011-6-7 21:30:40
|
只看该作者
%HPGLIMMIX macro on large scale hierarchical mixed model
From oloolo's blog on SasProgramming
<p><a href="http://feedads.g.doubleclick.net/~a/HQ_vuxRvY3Y5EX4SGIUaZbePskE/0/da"><img src="http://feedads.g.doubleclick.net/~a/HQ_vuxRvY3Y5EX4SGIUaZbePskE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/HQ_vuxRvY3Y5EX4SGIUaZbePskE/1/da"><img src="http://feedads.g.doubleclick.net/~a/HQ_vuxRvY3Y5EX4SGIUaZbePskE/1/di" border="0" ismap="true"></img></a></p>%HPGLIMMIX SAS macro. Modeling a sample data using Gamma Regression with all ZIP in AK, AL, AR, AZ with 2-level hierarchies: State and ZIP within State, total 4 blocks with max 693 columns per block. Same results, but running time of 71sec vs. 35min39sec using GLIMMIX. <br />
<br />
<pre style="background-color: #ebebeb; border-bottom: #999999 1px dashed; border-left: #999999 1px dashed; border-right: #999999 1px dashed; border-top: #999999 1px dashed; color: #000001; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 100%;"><code>
1715
1716 options nomprint nomlogic;
1717 %hpglimmix(data=temp2,
1718 stmts=%str(
1719 class zip zip_state;
1720 model y = x ;
1721 random int zip/subject=zip_state;
1722 ),
1723 error=gamma,
1724 link=LOG,
1725 options=NOTEST);
NOTEST
The HPGLIMMIX Macro
Data Set : WORK.TEMP2
Error Distribution : GAMMA
Link Function : LOG
Response Variable : Y
Job Starts at : 06JUN2011:15:51:19
HPGLIMMIX Iteration History
Iteration Convergence criterion
1 0.0081058432 13 sec
2 0.0004213646 13 sec
3 2.7137935E-7 13 sec
4 3.1854799E-9 12 sec
Output from final Proc HPMixed run:
Job Ends at : 06JUN2011:15:52:30
1726 options nomprint nomlogic;
1727
1728 proc glimmix data=temp2;
1729 class zip zip_state;
1730 model y = x /s dist=gamma;
1731 random int zip /subject=zip_state;
1732 run;
NOTE: Convergence criterion (PCONV=1.11022E-8) satisfied.
NOTE: PROCEDURE GLIMMIX used (Total process time):
real time 35:38.93
cpu time 34:30.90
</code></pre><br />
GLIMMIX output:<br />
<pre style="background-color: #ebebeb; border-bottom: #999999 1px dashed; border-left: #999999 1px dashed; border-right: #999999 1px dashed; border-top: #999999 1px dashed; color: #000001; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 100%;"><code>
Covariance Parameter Estimates
Standard
Cov Parm Subject Estimate Error
Intercept zip_state 0.000152 0.000125
zip zip_state 0.000066 3.105E-6
Residual 0.000405 2.281E-6
Solutions for Fixed Effects
Standard
Effect Estimate Error DF t Value Pr > |t|
Intercept 6.5873 0.006180 3 1065.95 <.0001
Direct 0.003436 0.000218 62634 15.79 <.0001
</code></pre><br />
<br />
%HPGLIMMIX output:<br />
<pre style="background-color: #ebebeb; border-bottom: #999999 1px dashed; border-left: #999999 1px dashed; border-right: #999999 1px dashed; border-top: #999999 1px dashed; color: #000001; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 100%;"><code>
_cov data from HPGLIMMIX
Obs CovParm Subject Estimate
1 Intercept zip_state 0.000152
2 zip zip_state 0.000066
3 Residual 0.000405
_soln data from HPGLIMMIX
Obs Effect Estimate StdErr
1 Intercept 6.5873 0.006180
2 Direct 0.003436 0.000218
</code></pre><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29815492-8354118659515520074?l=www.sas-programming.com' alt='' /></div><img src="http://feeds.feedburner.com/~r/SasProgramming/~4/jnm4OPM160s" height="1" width="1"/> |
|