Date: Thu, 13 Jan 2011 16:31:10 -0200
Reply-To: Ricardo Gonçalves da Silva
<rgs.rsilva@BANCOVOTORANTIM.COM.BR>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ricardo Gonçalves da Silva
<rgs.rsilva@BANCOVOTORANTIM.COM.BR>
Subject: RES: AIC and P-seudo R2 for TOBIT Model
In-Reply-To: <140712.6694.qm@web32405.mail.mud.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"
Dale,
Thank you so much. This is exactly what I need.
I always forgot the ODS tables.... I think I'm getting old....
Thanks in advance,
Rick
-----Mensagem original-----
De: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] Em nome de Dale McLerran
Enviada em: quinta-feira, 13 de janeiro de 2011 15:50
Para: SAS-L@LISTSERV.UGA.EDU
Assunto: Re: AIC and P-seudo R2 for TOBIT Model
Ricardo,
Use an ODS OUTPUT statement to write the fit statistics and
pseudo-R^2 values to output data sets. The fit statistics are
in a table named "FitSummary" and the goodness of fit statistics
are in a table named "GoodnessOfFit".
Since I do not see any BY statement in your QLIM code, you must
have a macro do loop which iterates over trials in your
simulation. Thus, the results generated by one invocation of
the QLIM procedure will be for a single trial in your simulation.
In order to obtain fit statistics and goodness-of-fit statistics
for all trials in a single data set, you will have to write
results for the current trial to a temporary file and then append
the results for the i-th trial to a master data set which will
record results across all trials.
Code which follows provides a template for how you might
construct your code:
ods output FitSummary=FitStats_i
GoodnessOfFit=GOF_i;
PROC QLIM DATA=BANCO METHOD=TRUREG OUTEST = TESTES_3;
MODEL Z_SCORE1 = COVAR1 / NOINT;
ENDOGENOUS Z_SCORE1 ~ CENSORED(LB=0 UB=1);
OUTPUT OUT=LGD_PRED_1(KEEP = PRED_Z_SCORE_1)
PREDICTED = PRED_Z_SCORE_1;
RUN;
/* Attach simulation trial number to fit statistics */
data FitStats_i;
set FitStats_i;
trial = &iter;
run;
data GOF_i;
set GOF_i;
trial = &iter;
run;
/* Append trial fit statistics to master data set recording */
/* fit statistics across all simulation trials. */
proc append base=FitStats data=FitStats_i;
run;
proc append base=GOF data=GOF_i;
run;
HTH,
Dale
---------------------------------------
Dale McLerran
Fred Hutchinson Cancer Research Center
mailto: dmclerra@nFoHsCpRaCm.org
Ph: (206) 667-2926
Fax: (206) 667-5977
---------------------------------------
--- On Thu, 1/13/11, Ricardo Gonçalves da Silva <rgs.rsilva@BANCOVOTORANTIM.COM.BR> wrote:
> From: Ricardo Gonçalves da Silva <rgs.rsilva@BANCOVOTORANTIM.COM.BR>
> Subject: AIC and P-seudo R2 for TOBIT Model
> To: SAS-L@LISTSERV.UGA.EDU
> Date: Thursday, January 13, 2011, 7:33 AM
> Hi,
>
> I'm conducting a simulation study and using PROC QLIM to
> run a lot of Tobit regressions. For each run, I need some
> kind of model fit statistic. I know that AIC and BIC is
> available for this model, however, I don't' know how to
> invoke it to written in my outest output.
>
> Any help?
>
> Further, anybody knows how to calculate Pseudo-R2 for this
> model?
>
> Code Example:
>
> PROC QLIM DATA=BANCO METHOD=TRUREG OUTEST = TESTES_3;
> MODEL Z_SCORE1 = COVAR1 / NOINT;
> ENDOGENOUS Z_SCORE1 ~ CENSORED(LB=0 UB=1);
> OUTPUT OUT=LGD_PRED_1(KEEP = PRED_Z_SCORE_1)
> PREDICTED = PRED_Z_SCORE_1;
> RUN;
>
> Of course, the above code is inside a macro.
> _____________________________
> Ricardo Gonçalves Silva, M.Sc.
> Banco Votorantim S/A
> Riscos
> F: (11) 5171-2010
> rgs.rsilva@bancovotorantim.com.br
>
> Esta mensagem e seus anexos podem conter informações
> confidenciais ou privilegiadas. Se você não é o
> destinatário dos mesmos você não está autorizado a
> utilizar o material para qualquer fim. Solicitamos que você
> apague a mensagem e avise imediatamente ao remetente. O
> conteúdo desta mensagem e seus anexos não representam
> necessariamente a opinião e a intenção da empresa, não
> implicando em qualquer obrigaçâo ou responsabilidade da
> parte da mesma.
> This message may contain confidential and/or privileged
> information. If you are not the addressee or authorized to
> receive this for the addressee, you must not use, copy,
> disclose or take any action based on this message or any
> information herein. If you have received this message in
> error, please advise the sender immediately by reply e-mail
> and delete this message. The contents of this message and
> its attachments do not necessarily express the opinion or
> the intention of the company, and do not implies any legal
> obligation or responsibilities from this
> company.
>
Esta mensagem e seus anexos podem conter informações confidenciais ou privilegiadas. Se você não é o destinatário dos mesmos você não está autorizado a utilizar o material para qualquer fim. Solicitamos que você apague a mensagem e avise imediatamente ao remetente. O conteúdo desta mensagem e seus anexos não representam necessariamente a opinião e a intenção da empresa, não implicando em qualquer obrigaçâo ou responsabilidade da parte da mesma.
This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. The contents of this message and its attachments do not necessarily express the opinion or the intention of the company, and do not implies any legal obligation or responsibilities from this company.
|