Comparing slopes of SACs - Davies test
Dear list, I am comparing species accumulation curves (in marine fouling communities) from 12 different ecoregions and I could use some help. One way to do this is to compare the asymptote's location (when fiting a non-linear curve). This is done. However I came across with this Davies test which I believe tests for a change in the slope - an initial break (Package: segmented). First question: can I only use this test for linear fits? I first fitted a linear model as a first step to identify the breakpoint:
SF_LM <- lm(SF ~ Samples, data=SAC.data) ### fit linear model as first step to id breakpoint - need davies test next summary(SF_LM)
Call:
lm(formula = SF ~ Samples, data = SAC.data)
Residuals:
Min 1Q Median 3Q Max
-8.0124 -0.8671 0.4903 1.4117 1.7396
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 13.19690 0.54598 24.17 < 2e-16 ***
Samples 0.21550 0.01863 11.56 1.76e-15 ***
---
Then I tried the test but I got this message:
SF_LM_rr <- davies.test(SF_LM, "Samples") ### find break point initial
Error in formula.default(eval(parse(text = x)[[1L]])) : invalid formula Any help? Also, do you recommend any other way (test) to compare these curves? Thanks in advance Jo?o Jo?o Canning Clode, PhD Postdoctoral Fellow Marine Invasions Research Lab Smithsonian Environmental Research Center 647 Contees Wharf Road Edgewater, MD 21037 Email: canning-clodej at si.edu Web: www.canning-clode.com Tel: 443-482-2354