Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

Stat 431 ASSIGNMENT 3 SOLUTIONS

Beoordeling
-
Verkocht
-
Pagina's
7
Cijfer
A+
Geüpload op
07-12-2022
Geschreven in
2022/2023

Stat 431 ASSIGNMENT 3 SOLUTIONS 1. (a) Given the tolerance distribution, the probability of response the dose x is π(x) = Zx −∞ exp((u − µ)/δ) δ(1 + exp((u − µ)/δ) 2 du = exp((x − µ)/δ) 1 + exp((x − µ)/δ) ⇒ log π(x) 1 − π(x) = − µ δ + 1 δ x This implies that it is most appropriate to choose a logistic link function. (b) The binary logistic regression model is log π(x) 1 − π(x) = β0 + β1x where β0 = − µ δ and β1 = 1 δ . (c) The R code and output for fitting the logistic regression model are given below: # Input the data -("",header=T) # Construct the response variable for logistic regression $resp-cbind($y,$$y) # Fit a dose response model using the logit model. model.1-glm(resp~z,family=binomial(link=logit),data=) summary(model.1) Coefficients: Value Std. Error t value (Intercept) -16.49433 1. -11.30631 z 18.51255 1. 11.57137 (Dispersion Parameter for Binomial family taken to be 1 ) Null Deviance: 286.8762 on 7 degrees of freedom Residual Deviance: 3. on 6 degrees of freedom # Determine p-value of residual deviance 1-pchisq(3., 6) [1] 0. From the above output, we see the residual deviance given by D = 3. with 6 d.f., and p-value= D(χ 2 (6) 3.) = 0., this indicates that the logistic model does provide a good fit to the observed data. The R code for producing the dose-response curve are given below: beta-model.1$coefficients dose-seq(0.7, 1.15, by=0.0001) x-cbind(rep(1, length(dose)), dose) prob-exp(x%*%beta)/(1+exp(x%*%beta))

Meer zien Lees minder
Instelling
Vak

Voorbeeld van de inhoud

Stat 431 ASSIGNMENT 3 SOLUTIONS

1. (a) Given the tolerance distribution, the probability of response the dose x is
Zx
exp((u − µ)/δ)
π(x) = du
δ(1 + exp((u − µ)/δ)2
−∞
exp((x − µ)/δ)
=
1 + exp((x − µ)/δ)
π(x) µ 1
⇒ log = − + x
1 − π(x) δ δ
This implies that it is most appropriate to choose a logistic link function.
(b) The binary logistic regression model is

π(x)
log = β0 + β1 x
1 − π(x)

where β0 = − µδ and β1 = 1δ .
(c) The R code and output for fitting the logistic regression model are given below:
# Input the data
ammonia.dat<-read.table("ammonia.dat",header=T)

# Construct the response variable for logistic regression
ammonia.dat$resp<-cbind(ammonia.dat$y,ammonia.dat$m-ammonia.dat$y)

# Fit a dose response model using the logit model.
model.1<-glm(resp~z,family=binomial(link=logit),data=ammonia.dat)
summary(model.1)

Coefficients:
Value Std. Error t value
(Intercept) -16.49433 1.458861 -11.30631
z 18.51255 1.599858 11.57137

(Dispersion Parameter for Binomial family taken to be 1 )

Null Deviance: 286.8762 on 7 degrees of freedom
Residual Deviance: 3.181074 on 6 degrees of freedom

# Determine p-value of residual deviance
1-pchisq(3.181074, 6)
[1] 0.7858011


From the above output, we see the residual deviance given by D = 3.181074 with 6 d.f.,
and p-value= D(χ2(6) > 3.181074) = 0.7858011, this indicates that the logistic model
does provide a good fit to the observed data.

The R code for producing the dose-response curve are given below:
beta<-model.1$coefficients
dose<-seq(0.7, 1.15, by=0.0001)
x<-cbind(rep(1, length(dose)), dose)
prob<-exp(x%*%beta)/(1+exp(x%*%beta))


1

, plot(ammonia.dat$z, ammonia.dat$y/ammonia.dat$m, xlim=c(0.7, 1.15),
ylim=c(0, 1), xlab="dose", ylab="Probability of response")
lines(dose, prob)
title("Dose-Response Curve")


Dose-Response Curve




1.0









0.8
Probability of response


0.6
0.4





0.2









0.0




0.7 0.8 0.9 1.0 1.1
dose




From the plot, we see the observed probabilities of response (the dots) and the estimated
probabilities of response (the curve) from the fitted logistic regression model agree quite
well, which also implies that the model fits the data well.
(d) Realize that the tolerance distribution is actually logistic distribution. You can just
recognize this and use the result that the variance of the logistic distribution is

π2δ2
σ2 = .
3
Alternatively, you can try to derive the variance by first finding the MGF of this distribu-
tion function: M (t) = eµt Γ(1+δt)Γ(1−δt) and then the variance is just M 00 (0)−(M 0 (0))2 .

The CI for β1 is (15.37683, 21.64827)), so the CI for the variance of u is

(π 2 (1/βˆ1 ))2 /3, π 2 (1/βˆ1 )2 /3)
= (π 2 (1/21.64827)2 /3, π 2 (1/15.37683)2 /3) = (0.007019919, 0.01391377)




2

Geschreven voor

Instelling
Studie
Vak

Documentinformatie

Geüpload op
7 december 2022
Aantal pagina's
7
Geschreven in
2022/2023
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$6.99
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
Abbyy01 Exam Questions
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
94
Lid sinds
4 jaar
Aantal volgers
33
Documenten
1337
Laatst verkocht
6 dagen geleden

3.5

13 beoordelingen

5
5
4
2
3
3
2
1
1
2

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen