get.pseudodata.binomial {icmm} | R Documentation |
Obtain pseudodata based on the binary logistic regression model.
Description
For logistic regression, given the current estimates of regression coefficients, working responses and their corresponding weights are obtained.
Usage
get.pseudodata.binomial(Y, X, beta0, beta, niter)
Arguments
Y |
an (n*1) numeric matrix of responses. |
X |
an (n*p) numeric design matrix. |
beta0 |
a scalar value of intercept term. |
beta |
a (p*1) matrix of regression coefficients. |
niter |
number of iterations in ICM/M algorithm. |
Value
Return a list including elements
z |
an (n*1) matrix of working responses |
sigma2 |
an (n*1) matrix of inverse of weights. |
Author(s)
Vitara Pungpapong, Min Zhang, Dabao Zhang
Examples
data(simBinomial)
Y<-as.matrix(simBinomial[,1])
X<-as.matrix(simBinomial[,-1])
p<-dim(X)[2]
# Obtain initial values from lasso
data(initbetaBinomial)
initbeta<-as.matrix(initbetaBinomial)
# Get Pseudodata
pseudodata<-get.pseudodata.binomial(Y=Y, X=X, beta0=0, beta=initbeta, niter=1)
z<-pseudodata$z
sigma<-sqrt(pseudodata$sigma2)
[Package icmm version 1.2 Index]