Learn R Programming

IsoplotR (version 0.18)

titterington: Linear regression of X,Y,Z-variables with correlated errors

Description

Implements the maximum likelihood algorithm of Ludwig and Titterington (1994)

Usage

titterington(x, alpha = 0.05)

Arguments

x

a [9 x n] matrix with the following columns: X, sX, Y, sY, Z, sZ, rhoXY, rhoXZ, rhoYZ.

alpha

cutoff value for confidence intervals

Value

a four-element list of vectors containing:

par

4-element vector c(a,b,A,B) where a is the intercept of the X-Y regression, b is the slope of the X-Y regression, A is the intercept of the X-Z regression, and B is the slope of the X-Z regression.

cov

[4 x 4]-element covariance matrix of par

mswd

the mean square of the residuals (a.k.a `reduced Chi-square') statistic

p.value

p-value of a Chi-square test for linearity

df

the number of degrees of freedom for the Chi-square test (3\(n\)-3)

References

Ludwig, K.R. and Titterington, D.M., 1994. Calculation of \(^{230}\)Th/U isochrons, ages, and errors. Geochimica et Cosmochimica Acta, 58(22), pp.5031-5042.

Examples

Run this code
# NOT RUN {
d <- matrix(c(0.1677,0.0047,1.105,0.014,0.782,0.015,0.24,0.51,0.33,
              0.2820,0.0064,1.081,0.013,0.798,0.015,0.26,0.63,0.32,
              0.3699,0.0076,1.038,0.011,0.819,0.015,0.27,0.69,0.30,
              0.4473,0.0087,1.051,0.011,0.812,0.015,0.27,0.73,0.30,
              0.5065,0.0095,1.049,0.010,0.842,0.015,0.27,0.76,0.29,
              0.5520,0.0100,1.039,0.010,0.862,0.015,0.27,0.78,0.28),
            nrow=6,ncol=9)
colnames(d) <- c('X','sX','Y','sY','Z','sZ','rXY','rXZ','rYZ')
titterington(d)
# }

Run the code above in your browser using DataLab