Learn R Programming

HRQoL (version 1.0)

print.summary.BBmm:

Description

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

Usage

# S3 method for summary.BBmm
print(x, ...)

Arguments

x
a summary.BBmm class model.
...
for extra arguments.

Value

Prints a summary.BBmm object.

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. (2017): Comparison of beta-binomial regression model approaches to analyze health related quality of life data, Statistical Methods in Medical Research, DOI: 10.1177/0962280217690413

See Also

BBmm, summary.BBmm

Examples

Run this code
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)
sum.model <- summary(model)
print(sum.model) # or just sum.model

Run the code above in your browser using DataLab