Learn R Programming

onls (version 0.2)

summary.onls: Summary function for 'onls' objects

Description

Provides a summary for the parameters of the converged fit, including their standard errors, t values and p values, together with residual standard errors with respect to both the vertical and the orthogonal residuals. See 'Details' for how parameters held fixed in the original onls call, and known_sigma-based scaling, are handled.

Usage

# S3 method for onls
summary(object, correlation = FALSE, symbolic.cor = FALSE, ...)

Value

A list of class "summary.onls", with components:

formula

the model formula.

residONLS

the vertical residuals (observed minus fitted response at the observed predictors).

sigmaONLS

residual standard error of the vertical distances.

sigma_o

residual standard error of the orthogonal (precision-weighted) distances.

df

a length-2 vector, the number of free (non-fixed) parameters and the residual degrees of freedom; sum(df) equals the number of observations.

cov.unscaled

the unscaled covariance matrix of the free parameters; see 'Details'.

call

the matched call.

convInfo

convergence information from onls.

control

the control settings used, see onls.

na.action

information on the handling of NAs.

coefficients, parameters

(identical) matrices of Estimate, Std. Error, t value and Pr(>|t|), one row per parameter (including fixed ones, with NA in the last three columns for those); see 'Details'.

known_sigma

as in object.

reduced_chisq

as in object.

correlation

(only if correlation = TRUE) the correlation matrix of the free parameters only; see 'Details'.

symbolic.cor

(only if correlation = TRUE) as supplied.

Arguments

object

an object returned from onls.

correlation

logical. If TRUE, the correlation matrix of the estimated (non-fixed) parameters is returned and printed.

symbolic.cor

logical. If TRUE, print the correlations in a symbolic form.

...

further arguments passed to or from other methods.

Author

Andrej-Nikolai Spiess

Details

Fixed parameters. If object was fitted with some parameters held fixed (see onls), those parameters were never estimated: their Estimate is still shown (the fixed value used), but Std. Error, t value and Pr(>|t|) are reported as NA rather than 0/Inf/a spuriously small p-value, matching R's own convention for non-estimated coefficients (e.g. aliased terms in summary.lm). The residual degrees of freedom in df count only the free (non-fixed) parameters, so that df[1] + df[2] equals the number of observations, as in summary.lm/summary.nls. If correlation = TRUE, fixed parameters are dropped from the returned correlation matrix entirely (rather than padded with NA rows/columns), since correlation with a held-fixed constant is not a meaningful quantity.

cov.unscaled. object$vcov was already scaled by onls itself: not at all if known_sigma = TRUE, or by the orthogonal-distance reduced chi-square (object$reduced_chisq) if known_sigma = FALSE. cov.unscaled undoes exactly that scaling (dividing by object$reduced_chisq only in the latter case), so that vcov(object) == cov.unscaled * sigma^2 holds with the appropriate sigma, matching the summary.lm/summary.nls convention. This is not the same quantity as the vertical-residual variance (sigmaONLS^2): the vertical and orthogonal residual sums of squares generally differ, even for an unweighted fit, so cov.unscaled must not be confused with, or derived from, sigmaONLS.

Examples

Run this code
## See 'onls'.

Run the code above in your browser using DataLab