Learn R Programming

pql (version 0.1.0)

pqlBLogist: The weighted Gauss-Newton estimators of the PQL in Logistic-GLMs

Description

The average weighted estimator and the unknown weighted estimator of the PQL in Logistic-GLMs through damped Gauss-Newton updates.

Usage

pqlBLogist(data,G,nk)

Value

betaBW,betaBA,MSEW,MSEA

Arguments

data

is a design matrix with uniform distribution and the response vector.

G

is the number of subsets.

nk

is the size of subsets.

Examples

Run this code
G <- 20;n=1000;p=5; nk=50
b=runif(p, 0, 1)
beta =matrix(b,nrow=p)
X=matrix(rnorm(n*p),nrow=n)
L=X%*%beta
prob=1/exp(-(0.48+(L))+1)
y=1/(1+exp(-X))
y=(prob>runif(n))
y= ifelse((prob>runif(n)), 1, 0)
data=cbind(y,X)
pqlBLogist(data,G,nk)

Run the code above in your browser using DataLab