data(Pt_prof)
P <- unname(Pt_prof)
tsec <- as.numeric(names(Pt_prof))
# Generate model object
m <- Pt_model(P, tsec)
# View
print(m)
# Plot
plot(P ~ tsec, cex = 0.2)
with(m$Pfn, curve(inv(x), add = TRUE, col = "red"))
with(m$Pfn, curve(exp(x), add = TRUE, col = "blue"))
with(m$Pfn, curve(pwr(x), add = TRUE, col = "purple"))
with(m$Pfn, curve(thrp(x), add = TRUE, col = "green"))
legend("topright", legend = round(m$table$RSE, 2),
text.col = c("red", "blue", "purple", "green"),
title = "RSE",title.col = "black",
bty = "n")Run the code above in your browser using DataLab