print.BBmm: Print a BBmm class model.

Description Usage Arguments Value Author(s) References See Also Examples

Description

print.BBmm is the BBmm specific method fot the generic function print which prints objects returned by modelling functions.

Usage

1
2
## S3 method for class 'BBmm'
print(x, ...)

Arguments

x

a BBmm class model.

...

for extra arguments.

Value

Prints a BBmm object.

Author(s)

J. Najera-Zuloaga

D.-J. Lee

I. Arostegui

References

Breslow N. E. & Calyton D. G. (1993): Approximate Inference in Generalized Linear Mixed Models, Journal of the American Statistical Association, 88, 9-25

Lee Y. & Nelder J. A. (1996): Hierarchical generalized linear models, Journal of the Royal Statistical Society. Series B, 58, 619-678

Najera-Zuloaga J., Lee D.-J. & Arostegui I. (2018): A beta-binomial mixed-effects model approach for analysing longitudinal discrete and bounded outcomes, Biometrical Journal.

See Also

BBmm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
set.seed(14)

# Defining the parameters
k <- 100
m <- 10
phi <- 0.5
beta <- c(1.5,-1.1)
sigma <- 0.5

# Simulating the covariate and random effects
x <- runif(k,0,10)
X <- model.matrix(~x)
z <- as.factor(rBI(k,4,0.5,2))
Z <- model.matrix(~z-1)
u <- rnorm(5,0,sigma)


# The linear predictor and simulated response variable
eta <- beta[1]+beta[2]*x+crossprod(t(Z),u)
p <- 1/(1+exp(-eta))
y <- rBB(k,m,p,phi)
dat <- data.frame(cbind(y,x,z))
dat$z <- as.factor(dat$z)

# Apply the model
model <- BBmm(fixed.formula = y~x,random.formula = ~z,m=m,data=dat)
print(model) # or just model

idaejin/PROreg documentation built on May 9, 2019, 5:04 a.m.