search for: expect_zig

Displaying 1 result from an estimated 1 matches for "expect_zig".

Did you mean: expect_id
2011 Sep 14
0
Convert SAS NLMIXED code for zero-inflated gamma regression to R
...p(-eta_f)); eta_h = b0_h + b1_h*x1; mu = exp(eta_h); theta = exp(log_theta); r = mu/theta; if y=0 then ll = log(p_yEQ0); else ll = log(1 - p_yEQ0) - lgamma(theta) + (theta-1)*log(y) - theta*log(r) - y/r; model y ~ general(ll); predict (1 - p_yEQ0)*mu out=expect_zig; predict r out=shape; estimate "scale" theta; run; From: http://listserv.uga.edu/cgi-bin/wa?A2=ind0805A&L=sas-l&P=R20779 Best, Mikhail PS. I cross-posted this to stackoverflow under R and SAS - apologies if you're reading this twice... == Mikhail Spivakov, PhD Europea...