我想拟合以下广义非线性模型:Probit(G)=K+1/Sigma*(Temp-T0)*Time
. 作为天真的模型,我创建Probits(G)
并qnorm(G)
安装了Nonlinear Model
. 但我想适应类似于功能的Nonlinear Model
链接。logit
glm
R
我怎样才能用logit
链接来拟合这种广义非线性模型R
?
Data <-
structure(list(Temp = c(23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L,
27L, 27L, 27L, 27L, 27L, 27L, 33L, 33L, 33L, 33L, 33L, 33L, 33L,
35L, 35L, 35L, 35L, 35L), Time = c(144L, 168L, 192L, 216L, 240L,
264L, 288L, 312L, 120L, 144L, 168L, 192L, 216L, 240L, 72L, 96L,
120L, 144L, 168L, 192L, 216L, 96L, 120L, 144L, 168L, 192L), G = c(15,
25.5, 27, 28, 28.5, 39.5, 41.5, 43, 13, 21.5, 29.5, 30.5, 32.5,
35, 13.5, 28, 32.5, 33.5, 35, 39.5, 42, 6.5, 30, 39.5, 57, 58.5
)), .Names = c("Temp", "Time", "G"), class = "data.frame", row.names = c(NA,
-26L))
Data$GermRate <- 1/Data$Time
Data$Probits <- qnorm(p=Data$G/100) # Get Probits
fm1 <-
nls(
formula= Probits ~ K+1/Sigma*(Temp-T0)*Time
, data=Data
, start=list(K=1, Sigma=2, T0=2)
#, algorithm= "port"
)
fm1Summary <- summary(fm1)
fm1Coef <- summary(fm1)$coef