Likelihood profile for various measurement error values
Likelihood profile for various measurement error values
Estimates the standard deviation of measurement error (sign) of the response variable, an input of the cbvn() function, when a measured value is not available (Lark & Milne, 2016). sigh is fixed at each of a set of values in turn, and remaining parameters are estimated conditional on sigh
by maximum likelihood. The maximized likelihoods for the sequence of values constitutes a likelihood profile. The value of sigh where the profile is maximized is selected.
data: A dataframe with two numeric columns, independent (x) and dependent (y) variables respectively.
sigh: A vector of the suggested standard deviations of the measurement error values.
model: Selects the functional form of the boundary line. It includes "blm" for linear model, "lp" for linear plateau model, "mit"
for the Mitscherlich model, "schmidt" for the Schmidt model, "logistic" for logistic model, "logisticND" for logistic model proposed by Nelder (1961), "inv-logistic" for the inverse logistic model, "double-logistic" for the double logistic model, "qd" for quadratic model and the "trapezium" for the trapezium model. For custom models, set model = "other".
equation: A custom model function writen in the form of an R function. Applies only when argument model="other", else it is NULL.
start: A numeric vector of initial starting values for optimization in fitting the boundary model. Its length and arrangement depend on the suggested model:
For the "blm" model, it is a vector of length 7 arranged as the intercept, the slope, mean of x, mean of y, standard deviation of x, standard deviation of y and the correlation of x
and y.
For the "lp" model, it is a vector of length 8 arranged as the intercept, the slope, the maximum or plateau response, mean of x, mean of y, standard deviation of x, standard deviation of y
and the correlation of x and y.
For the "mit" model, it is a vector of length 8 arranged as the intercept, shape parameter, the maximum or plateau response, mean of x, mean of y, standard deviation of x, standard deviation of y
and the correlation of x and y.
For the "logistic", "inv-logistic" and "logisticND"
models, it is a vector of length 8 arranged as scaling parameter, shape parameter, the maximum or plateau value, mean of x, mean of y, standard deviation of x, standard deviation of y and the correlation of x and y.
For the "double-logistic" model, it is a vector of length 11 arranged as scaling parameter, shape parameter, maximum response, maximum response, scaling parameter two, shape parameter two, mean of x, mean of y, standard deviation of x, standard deviation of y and the correlation of x and y.
For the "trapezium" model, it is a vector of length 10 arranged as intercept one, slope one, maximum response, intercept two, slope two, mean of x, mean of y, standard deviation of x, standard deviation of y and the correlation of x and y.
For the "qd" model, it is a vector of length 8 arranged as a constant, linear coefficient, quadratic coefficient,mean of x, mean of y, standard deviation of x, standard deviation of y
and the correlation of x and y.
For the "schmidt" model, it is a vector of length 8 arranged the scaling parameter, shape parameter (x-value at maximum response ), maximum response, mean of x, mean of y, standard deviation of x, standard deviation of y and the correlation of x
and y.
UpLo: Selects the type of boundary. "U" fits the upper boundary and "L" fits the lower boundary.
optim.method: Describes the method used to optimize the model as in the optim() function. The methods include "Nelder-Mead", "BFGS", "CG", "L-BFGS-B", "SANN" and "Brent".
plot: If TRUE, a plot is part of the output. If FALSE, plot is not part of output (default is TRUE).
Returns
A list of length 2 containing the suggested standard deviations of measurement error values and the corresponding log-likelihood values. additionally, a likelihood profile plot (log-likelihood against the standard deviation of measurement error) is produced.
Details
Some inbuilt models are available for the cbvn() function. The suggest model forms are as follows:
Linear model ("blm")
y=β1+β2x
where β1 is the intercept and β2 is the slope.
2. Linear plateau model ("lp")
y=min(β1+β2x,β0)
where β1 is the intercept , β2 is the slope and β0
is the maximum response.
3. The logistic ("logistic") and inverse logistic ("inv-logistic") models
y=1+eβ2(β1−x)β0y=β0−1+eβ2(β1−x)β0
where β1 is a scaling parameter , β2 is a shape parameter and β0 is the maximum response.
4. Logistic model ("logisticND") (Nelder (1961))
y=1+(β1×e−β2x)β0
where β1 is a scaling parameter, β2 is a shape parameter and β0 is the maximum response.
5. Double logistic model ("double-logistic")
y=1+eβ2(β1−x)β0,1−1+eβ4(β3−x)β0,2
where β1 is a scaling parameter one, β2 is shape parameter one, β0,1 and β0,2 are the maximum response , β3 is a scaling parameter two and β4 is a shape parameter two.
6. Quadratic model ("qd")
y=β1+β2x+β3x2
where β1 is a constant, β2 is a linear coefficient and β3 is the quadratic coefficient.
7. Trapezium model ("trapezium")
y=min(β1+β2x,β0,β3+β4x)
where β1 is the intercept one, β2 is the slope one, β0 is the maximum response, β3 is the intercept two and β3 is the slope two.
8. Mitscherlich model ("mit")
y=β0−β1∗β2x
where β1 is the intercept, β2 is a shape parameter and β0 is the maximum response.
9. Schmidt model ("schmidt")
y=β0+β1(x−β2)2
where β1 is ascaling parameter, β2 is a shape parameter (x-value at maximum response ) and β0 is the maximum response .
The function ble_profile() utilities the optimization procedure of the optim() function to determine the model parameters. There is a tendency for optimization algorithms to settle at a local optimum. To remove the risk of settling for local optimum parameters, it is advised that the function is run using several starting values and the results with the largest likelihood can be taken as a representation of the global optimum.
The common errors encountered due to poor start values
function cannot be evaluated at initial parameters
Lark, R. M., & Milne, A. E. (2016). Boundary line analysis of the effect of water filled pore space on nitrous oxide emission from cores of arable soil. European Journal of Soil Science, 67 , 148-159.
Nelder, J.A. 1961. The fitting of a generalization of the logistic curve. Biometrics 17: 89–110.