Description Usage Arguments Value Examples
Family function for beta-Poisson generalized linear model
1 | BPfam(alp, bet, lam1, lam2, link = "log")
|
alp |
A non-negative value, the parameter of Beta function (alpha) |
bet |
A non-negative value, the parameter of Beta function (beta) |
lam1 |
A non-negative value, the parameter for scaling |
lam2 |
A non-negative value, the parameter for smoothing, used for BP4 or BP5 |
link |
The link function, as a character string, similar to quasi-poisson family, typically log link |
An object of class "family" for function glm() to fit a beta-Poisson generalized linear model
1 2 3 4 5 6 7 8 9 10 | set.seed(2015)
control.dat=rBP(100,alp=0.6,bet=1.5,lam1=20,lam2=0.05)
treated.dat=rBP(100,alp=0.2,bet=5,lam1=200,lam2=0.1)
x=c(control.dat,treated.dat)
y=c(rep(1,length(control.dat)),rep(2,length(treated.dat)))
fdat=data.frame(x=x,group=y)
fam0=do.call("BPfam", list(alp=0.6,bet=1.5,lam1=20,lam2=0.05, link = "log"))
fit=glm(x~.,data=fdat,family=fam0)
fit
summary(fit)$coefficients
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.