Assess the fit of a dose-response curve using the chi-squared statistic. The curve is described by the intercept and slope of a straight line in the log dose vs. probit effect scale.
assessfit(params, DEdata, fit = gamtable1(), simple =TRUE)
Arguments
params: A numeric vector of length two, with the estimated intercept and slope of the dose-effect relation on the log10 and probit scale. These parameters define the dose-response curve.
DEdata: A data frame of dose-effect data (typically, the output from dataprep) containing at least these four variables: dose, ntot, pfx, fxcateg.
fit: A model object that can be used to predict the corrected values (as proportions) from distexpprop5, the distance between the expected values (as proportions) and 0.5, default gamtable1().
simple: A logical scalar indicating if the output should be restricted to just the P value, default TRUE.
Returns
If simple=FALSE, a list of length two. The first element, chi, is a numeric vector of length three: chistat, chi-squared statistic; df, degrees of freedom; and pval, P value. The second element, contrib, is a matrix of three numeric vectors the same length as obsn: exp, expected effects; obscorr, observed effects corrected; and contrib, contributions to the chi-squared.
If simple=TRUE, a numeric scalar, the chi-squared statistic (see details).
Details
This function is used to find the dose-response curve that minimizes the chi-squared statistic measuring the distance between the observed and expected values of the response (the proportion affected). Following Litchfield and Wilcoxon (1949, steps B1 and B2), records with expected effects < 0.01% or > 99.99% are deleted, and other expected effects are "corrected" using the correctval function.
Litchfield, JT Jr. and F Wilcoxon. 1949. A simplified method of evaluating dose-effect experiments. Journal of Pharmacology and Experimental Therapeutics 96(2):99-113. [link].