W_func_GLM: Calculate the diagonal elements nu of Fisher information...

View source: R/W_func_GLM.R

W_func_GLMR Documentation

Calculate the diagonal elements nu of Fisher information matrix

Description

Calculate the diagonal elements nu of Fisher information matrix

Usage

W_func_GLM(X, beta, link = "logit")

Arguments

X

Model matrix

beta

Parameters of GLM model

link

GLM link function, default is "logit", options are "logit", "probit", "cloglog", "loglog", "identity", identity is the same as ordinary linear regression

Value

the diagonal element nu of GLM Fisher information matrix, can be used as w in liftone_constrained_GLM

Examples

beta = c(0, 3, 3, 3) #main effect model beta_0, beta_1, beta_21, beta_22
#gives the 6 categories (0,0,0), (0,1,0),(0,0,1),(1,0,0),(1,1,0),(1,0,1)
X.liftone=matrix(data=c(1,0,0,0,1,0,1,0,1,0,0,1,1,1,0,0,1,1,1,0,1,1,0,1), ncol=4, byrow=TRUE)
#calculate diagonal elements of W based on beta's under logit link
W=W_func_GLM(X= X.liftone, beta=beta, link="logit")


CDsampling documentation built on Oct. 13, 2024, 9:07 a.m.