vcov.dr4pl {dr4pl} | R Documentation |
Obtain the variance-covariance matrix of the parameter estimators of a 4PL model.
Description
This function obtains the variance-covariance matrix of the parameter estimators of a 4PL model. The variance-covariance matrix returned by this function can be used to compute the standard errors and confidence intervals for statistical inference.
Usage
## S3 method for class 'dr4pl'
vcov(object, parm = NULL, use.Hessian = T, ...)
## S3 method for class 'dr4pl_param'
vcov(object, dose, response, use.Hessian = T, ...)
Arguments
object |
An object of the dr4pl class. |
parm |
parameters of the dr4pl object. Usually made with [dr4pl_theta]. The class of this object determines in which space the covariance is calculated for theta_2. |
use.Hessian |
logical, if set to TRUE, the default, then the Hessian matrix scaled by 1/2 is used as an approximation to C.hat. Otherwise the First order Jacobian is used instead. |
... |
dots for future extensions |
dose |
dose levels |
response |
response values |
Details
This function obtains the variance-covariance matrix of the parameter estimators of a 4PL model. The Hessian matrix is used to obtain the second order approximation to the sum-of-squares loss function, and then the standard errors are computed as the square roots of the half of the Hessian matrix. Please refer to Subsection 5.2.2 of Seber and Wild (1989).
Value
The variance-covariance matrix of the parameter estimators of a 4PL model whose columns are in the order of the upper asymptote, IC50, slope and lower asymptote from left to right and whose rows are in the same order.
a covariance matrix. If the 'parm' argument is of the class 'dr4pl_log10', then the covariance of row/column 2 represents log10(theta_2). If theta is of 'dr4pl_theta', then the covariance of row/column 2 represents theta_2 in linear space.
References
Seber GAF, Wild CJ (1989). Nonlinear regression, Wiley Series in Probability and Mathematical Statistics: Probability and Mathematical Statistics. John Wiley \& Sons, Inc., New York. ISBN 0-471-61760-1, doi: 10.1002/0471725315, http://dx.doi.org.libproxy.lib.unc.edu/10.1002/0471725315.
Examples
obj.dr4pl <- dr4pl(Response ~ Dose, data = sample_data_1) # Fit a 4PL model to data
vcov(obj.dr4pl) # Variance-covariance matrix of the parameters
obj.dr4pl <- dr4pl(Response ~ Dose, data = sample_data_2) # Fit a 4PL model to data
vcov(obj.dr4pl) # Variance-covariance matrix of the parameters