###### Example 1: The effects of fertilizers on coastal Bermuda grass
data(Grass)
fit1 <- gnm(Yield ~ b0 + b1/(Nitrogen + a1) + b2/(Phosphorus + a2) + b3/(Potassium + a3),
family=gaussian(inverse), start=c(b0=0.1,b1=13,b2=1,b3=1,a1=45,a2=15,a3=30), data=Grass)
localInfluence(fit1, type="local", perturbation="case-weight", plot.it=TRUE, col="red",
lty=1, lwd=1, col.lab="blue", col.axis="blue", col.main="black", family="mono")
###### Example 2: Assay of an Insecticide with a Synergist
data(Melanopus)
fit2 <- gnm(Killed/Exposed ~ b0 + b1*log(Insecticide-a1) + b2*Synergist/(a2 + Synergist),
family=binomial(logit), weights=Exposed, start=c(b0=-3,b1=1.2,a1=1.7,b2=1.7,a2=2),
data=Melanopus)
### Local Influence just for the parameter "b1"
localInfluence(fit2, type="local", perturbation="case-weight", plot.it=TRUE, coefs="b1", col="red",
lty=1, lwd=1, col.lab="blue", col.axis="blue", col.main="black", family="mono")
###### Example 3: Developmental rate of Drosophila melanogaster
data(Drosophila)
fit3 <- gnm(Duration ~ b0 + b1*Temp + b2/(Temp-a), family=Gamma(log),
start=c(b0=3,b1=-0.25,b2=-210,a=55), weights=Size, data=Drosophila)
localInfluence(fit3, type="total", perturbation="case-weight", plot.it=TRUE, col="red",
lty=1, lwd=1, col.lab="blue", col.axis="blue", col.main="black", family="mono")
###### Example 4: Radioimmunological Assay of Cortisol
data(Cortisol)
fit4 <- gnm(Y ~ b0 + (b1-b0)/(1 + exp(b2+ b3*lDose))^b4, family=Gamma(identity),
start=c(b0=130,b1=2800,b2=3,b3=3,b4=0.5), data=Cortisol)
localInfluence(fit4, type="total", perturbation="case-weight", plot.it=TRUE, col="red",
lty=1, lwd=1, col.lab="blue", col.axis="blue", col.main="black", family="mono")
Run the code above in your browser using DataLab