boundaryFit: Fit multiple boundary lines.

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/trader.R

Description

Fit multiple boundary lines, write their results and choose the best one.

Usage

1
2
boundaryFit(boundaries, x, y, boundary = NULL, prefix = "bo", 
  store = TRUE, storedev = pdf, initNLS = NULL)

Arguments

boundaries

Data frame with segments (x-axis) and tops(y-axis).

x

x coordinates of all priors.

y

y coordinates of all priors.

boundary

Own boundary line function of one argument, eg. boundary=function(x) {5.0067*exp(-0.664*x)}

prefix

Prefix of saved files.

store

If to save figures.

storedev

Format for saving the graphical outputs, eg. pdf or jpeg.

initNLS

Vector for initialization of start values for nls (set a,b,c,d for nls).

Details

Boundary-line method scales the percent growth change of Nowacki & Abrams (1997) according to growth rate prior to disturbance. In their example, Black & Abrams (2003) defined moderate and major releases as those falling within 20-49.9%, and 50-100% of the boundary line, respectively. Advantage of the boundary-line is standardization, which takes into account the relationships among tree age, size, and canopy class determining radial growth rate (Black et al. 2004). On the downside, Black et al. (2009) suggest approximately 50000 ring width measurements is necessary for boundary line determination for a given species (Black et al. 2009).

Value

Return list object with

fun

Fitted function (boundary line).

rsq

R square of the fit.

bestModel

Best fitted model.

Note

Check reference.

Author(s)

Pavel Fibich <[email protected]>, Jan Altman <[email protected]>, Tuomas Aakala <[email protected]>, Jiri Dolezal <[email protected]>

References

Black, B.A. & Abrams, M.D. (2003) Use of boundary-line growth patterns as a basis for dendroecological release criteria. Ecological Applications, 13, 1733-1749.
Black, B.A., Abrams, M.D., Gagen, M., Daniels, L.D., Kipfmueller, K.F., Speer, J.H. & Anchukaitis, K.J. (2004) Development and application of boundary-line release criteria. Dendrochronologia, 22, 31-42.
Black, B.A., Abrams, M.D., Rentch, J.S. & Gould, P.J. (2009) Properties of boundary-line release criteria in North American tree species. Annals of Forest Science, 66.

See Also

boundaryGet, plotBoundary, nls

Examples

1
2
3
4
5
6
data(relData)
bo<-boundaryGet(relData1)
bofit<-boundaryFit(bo$bo,bo$x,bo$y)

plotBoundary(bo$bo,bo$x,bo$y,boundary=bofit$fun,rsq=bofit$rsq)
plotBoundary(bo$bo,bo$x,bo$y,boundary=function(x) {5.0067*exp(-0.664*x)})

Example output

[1] "--Summary of y=a+bx fit."

Call:
lm(formula = tops ~ segments, data = boundaries)

Residuals:
      1       2       3       4       5       6       7 
-2.1637  1.7473  1.3473 -0.1650 -0.1749 -0.2988 -0.2922 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)  
(Intercept)   2.6631     1.0656   2.499   0.0545 .
segments     -0.7266     0.5287  -1.374   0.2277  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.399 on 5 degrees of freedom
Multiple R-squared:  0.2742,	Adjusted R-squared:  0.129 
F-statistic: 1.889 on 1 and 5 DF,  p-value: 0.2277

[1] "--Summary of y=a+bx+cx^2 fit."

Call:
lm(formula = tops ~ segments + I(segments^2), data = boundaries)

Residuals:
      1       2       3       4       5       6       7 
-1.2627  1.7473  0.8067 -0.8858 -0.7155 -0.2988  0.6088 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)
(Intercept)     1.1766     1.5661   0.751    0.494
segments        1.7961     2.0898   0.859    0.439
I(segments^2)  -0.7208     0.5796  -1.244    0.282

Residual standard error: 1.328 on 4 degrees of freedom
Multiple R-squared:  0.4765,	Adjusted R-squared:  0.2148 
F-statistic: 1.821 on 2 and 4 DF,  p-value: 0.274

[1] "--Summary of y=ae^bx fit."

Formula: tops ~ a * exp(b * segments)

Parameters:
  Estimate Std. Error t value Pr(>|t|)
a   2.4721     1.4860   1.664    0.157
b  -0.3441     0.4231  -0.813    0.453

Residual standard error: 1.48 on 5 degrees of freedom

Number of iterations to convergence: 19 
Achieved convergence tolerance: 7.85e-06

[1] "y=c+ae^bx nls error: step factor 0.000488281 reduced below 'minFactor' of 0.000976562"
[1] "y=c+dx+ae^bx nls error: singular gradient"
[1] "y=ae^bx+ce^dx nls error: Missing value or an infinity produced when evaluating the model"
[1] "--Summary of y=a+blog(x) fit."

Formula: tops ~ a + b * log(segments)

Parameters:
  Estimate Std. Error t value Pr(>|t|)  
a   1.5195     0.6389   2.378   0.0633 .
b  -0.4241     0.7248  -0.585   0.5839  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.588 on 5 degrees of freedom

Number of iterations to convergence: 1 
Achieved convergence tolerance: 8.688e-09

[1] "--Summary of y=a+bx+clog(x)+dxlog(x) fit."

Call:
lm(formula = tops ~ segments + log(segments) + segments:log(segments), 
    data = boundaries)

Residuals:
        1         2         3         4         5         6         7 
-0.007628  0.001627  0.189574 -0.418157  0.170181  0.193449 -0.129045 

Coefficients:
                       Estimate Std. Error t value Pr(>|t|)   
(Intercept)              30.061      4.285   7.016  0.00595 **
segments                -26.547      4.156  -6.388  0.00777 **
log(segments)            14.067      1.957   7.189  0.00555 **
segments:log(segments)   10.384      1.852   5.606  0.01121 * 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.313 on 3 degrees of freedom
Multiple R-squared:  0.9782,	Adjusted R-squared:  0.9564 
F-statistic: 44.86 on 3 and 3 DF,  p-value: 0.005431

[1] "The fitted boundary line summary!"
[1] "Logarithmic model y=a+bx+clog(x)+dxlog(x) was the best!"

Call:
lm(formula = tops ~ segments + log(segments) + segments:log(segments), 
    data = boundaries)

Residuals:
        1         2         3         4         5         6         7 
-0.007628  0.001627  0.189574 -0.418157  0.170181  0.193449 -0.129045 

Coefficients:
                       Estimate Std. Error t value Pr(>|t|)   
(Intercept)              30.061      4.285   7.016  0.00595 **
segments                -26.547      4.156  -6.388  0.00777 **
log(segments)            14.067      1.957   7.189  0.00555 **
segments:log(segments)   10.384      1.852   5.606  0.01121 * 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.313 on 3 degrees of freedom
Multiple R-squared:  0.9782,	Adjusted R-squared:  0.9564 
F-statistic: 44.86 on 3 and 3 DF,  p-value: 0.005431

png 
  2 
png 
  2 

TRADER documentation built on May 29, 2017, 11:20 p.m.