Displaying 1 result from an estimated 1 matches for "vianc".
Did you mean:
ianc
2006 Mar 08
1
power and sample size for a GLM with Poisson response variable
...quare distn.
>
> asy.pwr<-function(counts=c(7,1),py=c(1081,3180))
> { # a two group Poisson regression power computation # py is
> person-years or person-time however measured
> group<-gl(2,1)
> ncp<-summary(glm(counts~group+offset(log(py)),family=poisson))$null.de
> viance
>
> q.tile<-qchisq(.95,1) # actually just the X2 critical value of
> 3.841459 list(power=round(1-pchisq(q.tile,df=1,ncp),2))}
>
> The second function, sim.pwr, estimates power using simulated Poisson
> random variates. The most time consuming step is the call to rpois....