data(compaction)
attach(compaction)
out <- fitbusscher(Pr = PR, theta = Mois, Bd = BD)
summary(out)
Rsq(out)
# 3D plot
X <- seq(min(Mois), max(Mois), len = 30) # theta
Y <- seq(min(BD), max(BD), len = 30) # Bd
f <- function(x, y) coef(out)[1] * (x^coef(out)[2]) * (y^coef(out)[3])
Z <- outer(X, Y, f)
persp(X, Y, Z,
xlab = "Soil moisture",
ylab = "Soil bulk density",
zlab = "Penetration resistance",
ticktype = "detailed",
phi = 20, theta = 30)
# End (not run)
Run the code above in your browser using DataLab