FixEf: Linear combination of the fixed effect for each categories in...

Description Usage Arguments Value Examples

View source: R/integralComputation.R View source: R/FixEf.R

Description

Linear combination of the fixed effect for each categories in multivariate count outcome.

Linear combination of the fixed effect for each categories in multivariate count outcome.

Usage

1
2
3
FixEf(x.vec, b, Des, method)

FixEf(x.vec, b, Des, method)

Arguments

x.vec

a value of binary covariate.

b

vector of regression coefficients.

Des

a design matrix

method

either "dirmult" for Dirichlet - multinomial or "multl" for multinomial logistics mixed model.

Value

a vector representing the result of multiplication between Des and b according to value of x.vec and the chosen method.

a vector representing the result of multiplication between Des and b according to value of x.vec and the chosen method.

Examples

1
2
3
4
5
6
Des <- as.matrix(cbind(rep(1,6),rep(0:1,3),c(0,0,1,1,0,0), c(rep(0,4),rep(1,2)),c(0,0,0,1,0,0),c(rep(0,5),1)))
beta <- c(0,0.5,-3.5,-1.3,0.8,-0.15,-2,1)
FixEf(x.vec = 1,b = beta, Des = Des,method = "dirmult")
Des <- as.matrix(cbind(rep(1,6),rep(0:1,3),c(0,0,1,1,0,0), c(rep(0,4),rep(1,2)),c(0,0,0,1,0,0),c(rep(0,5),1)))
beta <- c(0,0.5,-3.5,-1.3,0.8,-0.15,-2,1)
FixEf(x.vec = 1,b = beta, Des = Des,method = "dirmult")

IvonneMartin/JMoverCat documentation built on July 21, 2020, 12:12 a.m.