• No results found

Module: Quasi likelihood

N/A
N/A
Protected

Academic year: 2022

Share "Module: Quasi likelihood"

Copied!
50
0
0

Loading.... (view fulltext now)

Full text

(1)

Paper: Regression Analysis III

Module: Quasi likelihood

(2)

Principal investigator: Dr. Bhaswati Ganguli,Professor, Department of Statistics, University of Calcutta

Paper co-ordinator: Dr. Bhaswati Ganguli,Professor, Department of Statistics, University of Calcutta

Content writer: Sayantee Jana, Graduate student, Department of Mathematics and Statistics, McMaster University Sujit Kumar Ray,Analytics professional, Kolkata

Content reviewer: Department of Statistics, University of Calcutta

(3)

I f(y) =e

yθ−b(θ) φ +c(y,φ)

, takinga(φ) =φ

I E(Y) =µ=b0(θ)

I V ar(Y) =b00(θ)φ=V(µ)φ

(4)

I f(y) =e

yθ−b(θ) φ +c(y,φ)

, takinga(φ) =φ

I E(Y) =µ=b0(θ)

I V ar(Y) =b00(θ)φ=V(µ)φ

(5)

I f(y) =e

yθ−b(θ) φ +c(y,φ)

, takinga(φ) =φ

I E(Y) =µ=b0(θ)

I V ar(Y) =b00(θ)φ=V(µ)φ

(6)

I L= yθ−b(θ)φ +c(y, φ)

I Differentiating Lw.r.tµ E[δL

δµ] = E[δL δθ.δθ

δµ]

= E[δL δθ]δθ

δµ

= E[y−b0(θ) φ ]δθ

δµ

(7)

I L= yθ−b(θ)φ +c(y, φ)

I Differentiating Lw.r.tµ E[δL

δµ] = E[δL δθ.δθ

δµ]

= E[δL δθ]δθ

δµ

= E[y−b0(θ) φ ]δθ

δµ

(8)

I L= yθ−b(θ)φ +c(y, φ)

I Differentiating Lw.r.tµ E[δL

δµ] = E[δL δθ.δθ

δµ]

= E[δL δθ]δθ

δµ

= E[y−b0(θ) φ ]δθ

δµ

(9)

I V ar[δLδµ] =V ar[δLδθ](δµδθ)2 =E[−δδθ2L2](δθδµ)2

I Where

E[δL

δθ]2 = E[−δ2L δθ2]

= b00(θ) φ

1 [b00(θ)]2

= 1

b00(θ).φ

(10)

I V ar[δLδµ] =V ar[δLδθ](δµδθ)2 =E[−δδθ2L2](δθδµ)2

I Where

E[δL

δθ]2 = E[−δ2L δθ2]

= b00(θ) φ

1 [b00(θ)]2

= 1

b00(θ).φ

(11)

I E[δLδµ]= 0 ...(I)

I V ar[δLδµ]= 1

b00(θ).φ ...(II)

I Very often the underlying distribution of the population may not be known (e.g in case of overdispersed data). In such cases , the likelihood can not be obtained and hence inferences can not be drawn on its basis. Recourse is then taken to a quasi - likelihood function which mimics the likelihood function and satisfied (I) and (II).

(12)

I E[δLδµ]= 0 ...(I)

I V ar[δLδµ]= 1

b00(θ).φ ...(II)

I Very often the underlying distribution of the population may not be known (e.g in case of overdispersed data). In such cases , the likelihood can not be obtained and hence inferences can not be drawn on its basis. Recourse is then taken to a quasi - likelihood function which mimics the likelihood function and satisfied (I) and (II).

(13)

I E[δLδµ]= 0 ...(I)

I V ar[δLδµ]= 1

b00(θ).φ ...(II)

I Very often the underlying distribution of the population may not be known (e.g in case of overdispersed data). In such cases , the likelihood can not be obtained and hence inferences can not be drawn on its basis. Recourse is then taken to a quasi - likelihood function which mimics the likelihood function and satisfied (I) and (II).

(14)

I Defineq = Vy−µ(µ).φ

I E(q) = 0and V(q) = V(µ).φ1

I q satisfied (I) and (II) and hence it can be used as a proxy to

δL δµ

(15)

I Defineq = Vy−µ(µ).φ

I E(q) = 0and V(q) = V(µ).φ1

I q satisfied (I) and (II) and hence it can be used as a proxy to

δL δµ

(16)

I Defineq = Vy−µ(µ).φ

I E(q) = 0and V(q) = V(µ).φ1

I q satisfied (I) and (II) and hence it can be used as a proxy to

δL δµ

(17)

I Defineq = Vy−µ(µ).φ

I E(q) = 0and V(q) = V(µ).φ1

I q satisfied (I) and (II) and hence it can be used as a proxy to

δL δµ

(18)

I Q=Rµ y

y−u φV(u)du

I δQ

δµ = φVy−µ(µ) =q

I Q as a substitute forL

I Only requirement to write q or Qis to identifyV(µ) as a function of µ.

I To estimate to β

¯ : maximizePn

i=1Qi w.r.tβ

¯ .

(19)

I Q=Rµ y

y−u φV(u)du

I δQ

δµ = φVy−µ(µ) =q

I Q as a substitute forL

I Only requirement to write q or Qis to identifyV(µ) as a function of µ.

I To estimate to β

¯ : maximizePn

i=1Qi w.r.tβ

¯ .

(20)

I Q=Rµ y

y−u φV(u)du

I δQ

δµ = φVy−µ(µ) =q

I Q as a substitute forL

I Only requirement to write q or Qis to identifyV(µ) as a function of µ.

I To estimate to β

¯ : maximizePn

i=1Qi w.r.tβ

¯ .

(21)

I Q=Rµ y

y−u φV(u)du

I δQ

δµ = φVy−µ(µ) =q

I Q as a substitute forL

I Only requirement to write q or Qis to identifyV(µ) as a function of µ.

I To estimate to β

¯ : maximizePn

i=1Qi w.r.tβ

¯ .

(22)

I Q=Rµ y

y−u φV(u)du

I δQ

δµ = φVy−µ(µ) =q

I Q as a substitute forL

I Only requirement to write q or Qis to identifyV(µ) as a function of µ.

I To estimate to β

¯ : maximizePn

i=1Qi w.r.tβ

¯ .

(23)

ur = δ δβr

n

X

i=1

Qi

=

n

X

i=1

δQi δµi

δµi δηi

δηi δβr

=

n

X

i=1

qi(δµi

δηi)xir

=

n

X

i=1

yi−µi V(µi)φ(δµi

δηi

)xir

(24)

Q = Z µ

y

y−u φu du

= 1

φ[ylogu−u]µy

= 1

φ[ylogµ−µ−ylogy+y]

u = 1Xn yi−µi

(δµi

)x

(25)

Q = Z µ

y

y−u φu du

= 1

φ[ylogu−u]µy

= 1

φ[ylogµ−µ−ylogy+y]

u = 1Xn yi−µi

(δµi

)x

(26)

Q = Z µ

y

y−u φu du

= 1

φ[ylogu−u]µy

= 1

φ[ylogµ−µ−ylogy+y]

u = 1Xn yi−µi

(δµi

)x

(27)

Q = Z µ

y

y−u φ du

= 1

φ[u.y−u2 2 ]µy

= 1

φ[µy−µ2

2 −y2+y2 2 ]

= 1

2φ[−y2+ 2µy−µ2]

= −(y−µ)2

(28)

I V(µ) =µ(1−µ)

Q = Z µ

y

y−u φ(u(1−u))du

= 1 φ{

Z µ y

y

u(1−u)du− Z µ

y

du 1−u}

= 1 φ{y

Z µ y

1−u+u u(1−u)du−

Z µ y

du 1−u}

(29)

= 1 φ{y

Z µ y

1 udu+y

Z µ y

du 1−u −

Z µ y

du 1−u}

= 1

φ{[ylogu]µy −[ylog(1−u)]µy + [log(1−u)]µy}

= 1

φ{ylogµ−ylogy−ylog(1−µ)+ylog(1−y)+log(1−µ)−log(1−y)}

= 1

φ{ylog µ

1−µ+log(1−µ)−ylog y

1−y −log(1−y)}

ylog1−µµ +log(1−µ) ←log likelihood for the Binomial distribution

(30)

Q=

n

X

i=1

Qi Where

Qi = Z µi

yi

yi−u φV(u)du D= 2

n

X

i=1

Z yi

µi

yi−u V(u) du

I estimation : quasi score vector : u

¯= δQ

δβ

n ¯

(31)

=X

i=1

yi−µi φV(µi)

δµi δβ

¯

= 1

φDV−1(y

¯

−µ

¯) Where D= ((δµi

δβ

¯ )) V =diag((V(µi)))

¯y−µ

¯ =

Y1−µ1

Y2−µ2 ...

(32)

A = E[− δ2Q δβ

¯δβ

¯

0]

= −1 φ

n

X

i=1

E[(yi−µi) δ δβ

¯

0

1 V(µi)(δµi

δβ

¯

) + 1 V(µi)(δµi

δβ

¯ ) δ

δβ

¯

0(yi−µi)]

= 1 φ

n

X

i=1

(δµi δβ

¯ ) 1

V(µi)(δµi δβ

¯

0)]

= 1

φD0V−1D

(33)

At themth iteration βˆ

¯

(m) = βˆ

¯

(m−1)

+ [A−1u

¯] β

¯

=βˆ

¯

(m−1)

= βˆ

¯

(m−1)

+ [(D0V−1D)−1D0V−1(y

¯

−µ

¯)]β= ˆˆ β(m−1)

(34)

At themth iteration βˆ

¯

(m) = βˆ

¯

(m−1)

+ [A−1u

¯] β

¯

=βˆ

¯

(m−1)

= βˆ

¯

(m−1)

+ [(D0V−1D)−1D0V−1(y

¯

−µ

¯)]β= ˆˆ β(m−1)

(35)

I E(ˆβ

¯) =β

¯+O(n−1) D(ˆβ

¯) =φ(D0V−1D)−1+O(n−1)

φ(D0V−1D)−1 ← involves the overdispersion parameters

I Estimate of φ: No estimate of φcan be directly obtained from the Quasi - likelihood.

Conventionally φis estimated as - φˆ= 1

n−p

n

X

i=1

(yi−µˆi)2 V(ˆµi) This is moment estimation.

(36)

I E(ˆβ

¯) =β

¯+O(n−1) D(ˆβ

¯) =φ(D0V−1D)−1+O(n−1)

φ(D0V−1D)−1 ← involves the overdispersion parameters

I Estimate of φ: No estimate of φcan be directly obtained from the Quasi - likelihood.

Conventionally φis estimated as - φˆ= 1

n−p

n

X

i=1

(yi−µˆi)2 V(ˆµi) This is moment estimation.

(37)

not be known (e.g in case of overdispersed data). In such cases , the likelihood can not be obtained and hence inferences can not be drawn on its basis.

I To overcome this a quasi - likelihood function which mimics the likelihood function and satisfies (I) and (II) is used.

I E[δLδµ]= 0 ...(I)

I V ar[δLδµ]= 1

b00(θ).φ ...(II)

(38)

not be known (e.g in case of overdispersed data). In such cases , the likelihood can not be obtained and hence inferences can not be drawn on its basis.

I To overcome this a quasi - likelihood function which mimics the likelihood function and satisfies (I) and (II) is used.

I E[δLδµ]= 0 ...(I)

I V ar[δLδµ]= 1

b00(θ).φ ...(II)

(39)

not be known (e.g in case of overdispersed data). In such cases , the likelihood can not be obtained and hence inferences can not be drawn on its basis.

I To overcome this a quasi - likelihood function which mimics the likelihood function and satisfies (I) and (II) is used.

I E[δLδµ]= 0 ...(I)

I V ar[δLδµ]= 1

b00(θ).φ ...(II)

(40)

not be known (e.g in case of overdispersed data). In such cases , the likelihood can not be obtained and hence inferences can not be drawn on its basis.

I To overcome this a quasi - likelihood function which mimics the likelihood function and satisfies (I) and (II) is used.

I E[δLδµ]= 0 ...(I)

I V ar[δLδµ]= 1

b00(θ).φ ...(II)

(41)

not be known (e.g in case of overdispersed data). In such cases , the likelihood can not be obtained and hence inferences can not be drawn on its basis.

I To overcome this a quasi - likelihood function which mimics the likelihood function and satisfies (I) and (II) is used.

I E[δLδµ]= 0 ...(I)

I V ar[δLδµ]= 1

b00(θ).φ ...(II)

(42)

I Quasi deviance function : D= 2Pn i=1

Ryi

µi

yi−u V(u)du

I estimation : quasi score vector : u

¯= 1φDV−1(y

¯

−µ

¯)

I Quasi information matrix : A= φ1D0V−1D

I Estimator : βˆ

¯

(m)= ˆβ

¯

(m−1)

+ [(D0V−1D)−1D0V−1(y

¯−µ

¯)]β= ˆˆ β(m−1)

I Estimate of φ: φˆ= n−p1 Pn i=1

(yi−ˆµi)2 Vµi)

(43)

I Quasi deviance function : D= 2Pn i=1

Ryi

µi

yi−u V(u)du

I estimation : quasi score vector : u

¯= 1φDV−1(y

¯

−µ

¯)

I Quasi information matrix : A= φ1D0V−1D

I Estimator : βˆ

¯

(m)= ˆβ

¯

(m−1)

+ [(D0V−1D)−1D0V−1(y

¯−µ

¯)]β= ˆˆ β(m−1)

I Estimate of φ: φˆ= n−p1 Pn i=1

(yi−ˆµi)2 Vµi)

(44)

I Quasi deviance function : D= 2Pn i=1

Ryi

µi

yi−u V(u)du

I estimation : quasi score vector : u

¯= 1φDV−1(y

¯

−µ

¯)

I Quasi information matrix : A= φ1D0V−1D

I Estimator : βˆ

¯

(m)= ˆβ

¯

(m−1)

+ [(D0V−1D)−1D0V−1(y

¯−µ

¯)]β= ˆˆ β(m−1)

I Estimate of φ: φˆ= n−p1 Pn i=1

(yi−ˆµi)2 Vµi)

(45)

I Quasi deviance function : D= 2Pn i=1

Ryi

µi

yi−u V(u)du

I estimation : quasi score vector : u

¯= 1φDV−1(y

¯

−µ

¯)

I Quasi information matrix : A= φ1D0V−1D

I Estimator : βˆ

¯

(m)= ˆβ

¯

(m−1)

+ [(D0V−1D)−1D0V−1(y

¯−µ

¯)]β= ˆˆ β(m−1)

I Estimate of φ: φˆ= n−p1 Pn i=1

(yi−ˆµi)2 Vµi)

(46)

I Quasi deviance function : D= 2Pn i=1

Ryi

µi

yi−u V(u)du

I estimation : quasi score vector : u

¯= 1φDV−1(y

¯

−µ

¯)

I Quasi information matrix : A= φ1D0V−1D

I Estimator : βˆ

¯

(m)= ˆβ

¯

(m−1)

+ [(D0V−1D)−1D0V−1(y

¯−µ

¯)]β= ˆˆ β(m−1)

I Estimate of φ: φˆ= n−p1 Pn i=1

(yi−ˆµi)2 Vµi)

(47)

# install.packages("qcc")

require(qcc) ## contains the function qcc.overdispersion.test

(48)

# data from Wetherill and Brown (1991) pp. 212--213, 216--218:

x <- c(12,11,18,11,10,16,9,11,14,15,11,9,10,13,12, 8,12,13,10,12,13,16,12,18,16,10,16,10,12,14) size <- rep(50, length(x))

qcc.overdispersion.test(x,size)

x <- c(11,8,13,11,13,17,25,23,11,16,9,15,10,16,12, 8,9,15,4,12,12,12,15,17,14,17,12,12,7,16) qcc.overdispersion.test(x)

(49)

data(breslow.dat, package = "robust") names(breslow.dat)

head(breslow.dat)

summary(breslow.dat[c(6, 7, 8, 10)])

# plot distribution of post-treatment seizure counts opar <- par(no.readonly = TRUE)

par(mfrow = c(1, 2)) attach(breslow.dat)

hist(sumY, breaks = 20, xlab = "Seizure Count", main = "Distribution of Seizures")

boxplot(sumY ~ Trt, xlab="Treatment",main="Group Comparisons") par(opar)

(50)

family = poisson()) summary(fit)

# interpreting model parameters coef(fit)

exp(coef(fit))

# evaluating overdispersion

qcc.overdispersion.test(breslow.dat$sumY, type = "poisson")

# fit model with quasipoisson

fit.od <- glm(sumY ~ Base + Age + Trt, data = breslow.dat, family = quasipoisson())

References

Related documents

Nursing student of Sri Gokulam College of Nursing, Salem (affiliated to The Tamil Nadu Dr. Medical University) is validated and can proceed with this tool and content for

Nursing student of Sri Gokulam College of Nursing, Salem (affiliated to Dr.M.G.R. Medical University) is validated and can proceed with this tool and content for the main

Nursing student of Kongunadu College Of Nursing, Coimbatore (affiliated to The Tamil Nadu Dr. Medical University) is validated and can proceed with this tool and

Politically, Japan is divided into eight regions: Hokkaido, Tohoku, Kanto, Chubu, Kansai, Chugoku, Shikoku and Kyushu.. These regions cover the 47 prefectures (states)

Whenever a student interacts with it, it access the Student Module for student profile and Domain Module for content information and selects the appropriate teaching strategy

Content writer: Souvik Bandyopadhyay, Senior Lecturer, Indian Institute of Public Health, Hyderabad.. Content

Nursing student of Sri Gokulam College of Nursing, Salem (affiliated to Dr.M.G.R. Medical University) is validated and can proceed with this tool and content

Nursing student of Sara Nursing College, Dharapuram (affiliated to Dr.M.G.R.Medical University) is validated and can proceed with this tool and content for the main study entitled