W_func_GLM | R Documentation |
Calculate the diagonal elements nu of Fisher information matrix
W_func_GLM(X, beta, link = "logit")
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 |
the diagonal element nu of GLM Fisher information matrix, can be used as w in liftone_constrained_GLM
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.