View source: R/quadratic_plateau.R
| quadratic_plateau | R Documentation | 
This function helps to fit a quadratic-plateau response model and to estimate a critical soil test values (CSTV) above which yield response becomes flat.
SS_QP(x, a, b, xs)
quadratic_plateau(
  data = NULL,
  stv,
  ry,
  target = NULL,
  tidy = TRUE,
  plot = FALSE,
  resid = FALSE
)
boot_quadratic_plateau(data, stv, ry, n = 1000, target = NULL, ...)
| x | selfstart arg. for explanatory variable in SSquadp3xs Default: NULL | 
| a | selfstart arg. for intercept Default: NULL | 
| b | selfstart arg. for slope Default: NULL | 
| xs | selfstart arg. for break/join point in SSquadp3xs Default: NULL | 
| data | Optional argument to call and object of type data.frame or data.table containing the stv and ry data, Default: NULL | 
| stv | name of the vector containing soil test values (-) of type  | 
| ry | name of the vector containing relative yield values (%) of type  | 
| target | 
 | 
| tidy | logical operator (TRUE/FALSE) to decide the type of return. TRUE returns a tidy data frame or tibble (default), FALSE returns a list. | 
| plot | logical operator (TRUE/FALSE) to plot the quadratic-plateau model, Default: FALSE | 
| resid | logical operator (TRUE/FALSE) to plot residuals analysis, Default: FALSE | 
| n | sample size for the bootstrapping Default: 500 | 
| ... | when running bootstrapped samples, the  | 
See online-documentation for additional details.
returns an object of type ggplot if plot = TRUE.
returns a residuals plot if resid = TRUE.
returns an object of class data.frame if tidy = TRUE,
returns an object of class list if tidy = FALSE.
SS_QP: selfStart function to pass into the quadratic_plateau fit
quadratic_plateau: function
boot_quadratic_plateau: bootstrapping function
For extended reference, we recommend to visit https://gradcylinder.org/post/quad-plateau/ by Austin Pearce. Self-start function code adapted from nlraa package by F. Miguez https://github.com/femiguez/nlraa
Bullock, D.G. and Bullock, D.S. (1994) Quadratic and Quadratic-Plus-Plateau Models for Predicting Optimal Nitrogen Rate of Corn: A Comparison. Agron. J., 86: 191-195. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2134/agronj1994.00021962008600010033x")}
eval_tidy,defusing-advanced
nlsLM
SSlinp
AIC,lm,optim,coef,predict
AICc
model-quality
nlsResiduals
bind
ggplot,aes,geom_rug,geom_point,geom_abline,geom_path,annotate,labs,theme
annotate
# Example dataset
 df <- data.frame("ry" = c(65,80,85,88,90,94,93,96,97,95,98,100,99,99,100),
                  "stv" = c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15))
 # Run
 fit_example_qp <- quadratic_plateau(data = df, 
 stv = stv, ry = ry, resid = TRUE, plot = FALSE)
 fit_example_qp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.