seinfitR | R Documentation |
This function fits the Seinhorst equation to experimental data describing the relationship
between preplant nematode densities and plant growth using nonlinear least squares fitting.
The fitting process is performed using the nlsLM
function from the minpack.lm
package.
seinfitR(p_i, y, data, start, z_fixed = FALSE, control = seinfitR_control())
p_i |
A character string specifying the column name in |
y |
A character string specifying the column name in |
data |
A data frame containing the experimental data. It must include at least two columns:
one representing the preplant nematode densities ( |
start |
A list of initial parameter values for |
z_fixed |
Logical. If |
control |
A control object created using |
A list of class "seinfitR"
containing:
fit |
An object of class |
summary_seinfitR |
Summary statistics of the fitted model. |
cov |
The covariance matrix of parameter estimates (if available). |
data |
The original dataset used for fitting. |
x |
The name of the predictor variable used ( |
y |
The name of the response variable used ( |
z_fixed |
Logical value indicating whether |
# Example: Modeling plant response to nematode densities using "jambu" dataset
# Fit the model using seinfitR with specified initial values
model <- seinfitR(p_i = "p_i", y = "y", data = jambu,
start = list(m = 0.103, t = 250, z = 0.991),
control = seinfitR_control(maxiter = 5))
# View model summary
summary(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.