Accuracy.
- To: mathgroup at smc.vnet.net
- Subject: [mg5038] Accuracy.
- From: Hyunho Shin <shinhh at plaza.snu.ac.kr>
- Date: Sat, 19 Oct 1996 16:40:38 -0400
- Organization: School of Economics, SNU.
- Sender: owner-wri-mathgroup at wolfram.com
Hi, In Mathematica, I run the next: ---------------------------------------------------------------------- <<Statistics`Master` n = 500; x2dist = NormalDistribution[1,1]; x3dist = NormalDistribution[-1,4]; udist = NormalDistribution[0,1]; x1 = Table[1, {n}]; x2 = Table[Random[x2dist], {n}]; x3 = Table[Random[x3dist], {n}]; u = Table[Random[udist], {n}]; x = Transpose[{x1, x2, x3}]; ystar = x.{1,2,3} + u; y = Table[If[Part[ystar, i] > 0, 1, 0], {i, n}]; tol = 0.00000001; b0 = {1,1,1}; Do[ Print[b0]; f = PDF[NormalDistribution[0,1], x.b0]; F = CDF[NormalDistribution[0,1], x.b0]; first = Inverse[Transpose[(f^2/(F(1-F)))*x].x]; second = Transpose[(f/(F(1-F)))*x].(y-F+f*x.b0); b1 = first*second; If[Max[Abs[b0-b1]/bo] < tol, Break[]]; b0 = b1, {100}]; "In PROBIT Model," "Estimated Parameter: bprobit = " b0 ", and" fprobit = PDF[NormalDistribution[0,1], Map[Mean, Transpose[x]].b1]; "(d F)/(d xj) = " fprobit * b0 -------------------------------------------------------------------- But I got the message: 1 Power::infy: Infinite expression -- encountered. 0. because, in Mathematica, some elements of F are taken to 1. But, F is a list of values of CDF of Standard Normal Distribution, so any element of F cannot be 1. I think Mathematica round off all elements of F, some values, eg 0.99999999999999999999999999999999999999991, are taken to 1's. I want the method in which I get sufficiently accruate values, in this context. Thanks in advance, Hyunho Shin (shinhh at plaza.snu.ac.kr)