I always forget about these nice if conditions within a function like
"sum". Thank you for the example, Sven.
Best,
Artur
Am 23.08.2013 13:02, schrieb Sven Schreiber:
Am 23.08.2013 12:39, schrieb Artur Tarassow:
> Hi,
> I am just wondering if there already exists a built-in accessors for the
> number of cases correctly predicted after a logit/probit estimation? I
> couldn't find any in the manual, but maybe I missed something.
>
I haven't yet worked with these models in gretl, but assuming that $yhat
produces something useful there (like the probability), it should be
pretty easy, no?:
numcorrectpredict = sum(($yhat>0.5)==binarydep)
hth,
sven
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
--
Jabber account: t.artur(a)ubuntu-jabber.de
Join me on Diaspora: t_artur(a)despora.de
(Invitation to Diaspora:
https://despora.de/i/9fba3608d45a
You would like to send an encrypted PGP message?
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.12 (GNU/Linux)
mQENBFHqSQABCADvcNkANqF9klVT4o0XbTJUccyvci7DTtbW6W9DBCuqtLoCMaJl
/mSFcK3p5RkpSLjI1CoD0ocLizImUmuMRPneyi2/MEKyTelMR5VG2d6B0xS8gs+d
xbCLQ1kUDWYMmkrM2S2evH3/T5T+2ND5JzLILbbLix6Tos1N8FZyecI6WJUwN4t8
TIkn3Y9Pk/VKwBCLsMh7+i8zlhpO39MQLnFp40GZgnr/xiOhdmEFSzSM++SHwByg
4+vp5qRauZAI14yysMS2cjoiTqWbACf2tyJqiS5usCjO7GzVP7IkN8636mrIyovZ
JV0EjUUq5RXzRW1E9o0rxbkjq5LpMzkbawjjABEBAAG0HkFydHVyIFQuIDx0X2Fy
dHVyQGxhdmFiaXQuY29tPokBPgQTAQIAKAUCUepJAAIbIwUJCWYBgAYLCQgHAwIG
FQgCCQoLBBYCAwECHgECF4AACgkQ6Xw4V49pjGZhSwf+Pr9ml4pGm3S4hOGNeDQM
+LgDJ813WKuWk0+wAuFkBbPqVuTQRy56Xdbi5Zm0kAk9tE0smBlZyAGiBd1w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