simdata_bet {bbreg}R Documentation

simdata_bet

Description

Function to generate synthetic data from the beta regression.

Usage

simdata_bet(kap, lam, x, v, repetitions = 1, link.mean, link.precision)

Arguments

kap

coefficients kappa related to the mean parameter.

lam

coefficients lambda related to the precision parameter.

x

matrix containing the covariates for the mean submodel. Each column is a different covariate.

v

matrix containing the covariates for the precision submodel. Each column is a different covariate.

repetitions

the number of random draws to be made.

link.mean

a string containing the link function for the mean. The possible link functions for the mean are "logit","probit", "cauchit", "cloglog".

link.precision

a string containing the link function the precision parameter. The possible link functions for the precision parameter are "identity", "log", "sqrt", "inverse".

Value

a list of response vectors z (with 0 < z_i < 1).

See Also

simdata_bes, dbessel, dbbtest

Examples

n = 100; x = cbind(rbinom(n, 1, 0.5), runif(n, -1, 1)); v = runif(n, -1, 1);
z = simdata_bet(kap = c(1, -1, 0.5), lam = c(0.5,- 0.5), x, v, repetitions = 1,
link.mean = "logit", link.precision = "log")
z = unlist(z)
hist(z, xlim = c(0, 1), prob = TRUE)

[Package bbreg version 2.0.1 Index]