lm
object, draws an inverse.response plot with the response $Y$ on the
vertical axis and the fitted values $\hat{Y}$
on the horizontal axis. Uses nls
to
estimate $\lambda$ in the function
$\hat{Y}=b_0+b_1Y^{\lambda}$.
Adds the fitted curve to the plot.
inv.res.plot is an alias for inverse.response.plot.inverse.response.plot(m, lambda=c(0,1),maxiter=100,xlab=NULL,...)
nls
, the maximum number of iterations to
be used to compute the optimal value of lambdainv.tran.plot
and then to plot
.inv.tran.plot
and inv.tran.estimate
, for which
this is just a convenient front-end, and nls
.data(highway)
highway$Sigs1 <- (round(highway$Sigs*highway$Len)+1)/highway$Len
attach(highway)
d <- data.frame(Rate=Rate,logLen=logb(Len,2),
logADT=logb(ADT,2),logTrks=logb(Trks,2),
Slim=Slim,Shld=Shld,logSigs1=logb(Sigs1,2))
attach(d)
m2 <- lm(Rate~logLen+logADT+logTrks+Slim+Shld+logSigs1,d)
inv.res.plot(m2,key=c(6,2))
Run the code above in your browser using DataLab