InfluentialPoints.com
Biology, images, analysis, design...
Use/Abuse Principles How To Related
"It has long been an axiom of mine that the little things are infinitely the most important" (Sherlock Holmes)

Search this site

 

 

Errors-in-variables Symmetric Regression - using R

Reduced major axis regression


The R output for the regression analysis is:

> #Run standard OLS regression using linear model to obtain overall significance > model=lm(log10(vetbnt$epg)~ log10(vetbnt$tec)) > #Obtain the ANOVA table > anova.lm(model) Analysis of Variance Table Response: log10(vetbnt$epg) Df Sum Sq Mean Sq F value Pr(>F) log10(vetbnt$tec) 1 0.51075 0.51075 13.999 0.01341 * Residuals 5 0.18243 0.03649 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > #Obtain coefficients > summary(model) Call: lm(formula = log10(vetbnt$epg) ~ log10(vetbnt$tec)) Residuals: 1 2 3 4 5 6 7 -0.14828 -0.03022 0.08184 0.02856 -0.09356 -0.17432 0.33597 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -1.6390 0.8070 -2.031 0.0980 . log10(vetbnt$tec) 0.5693 0.1522 3.741 0.0134 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.191 on 5 degrees of freedom Multiple R-Squared: 0.7368, Adjusted R-squared: 0.6842 F-statistic: 14 on 1 and 5 DF, p-value: 0.01341 > #Fit ordinary least squares line as check on package > line.cis(log10(vetbnt$epg), log10(vetbnt$tec),method='OLS') coef(reg) lower limit upper limit elevation -1.6389739 -3.7133266 0.4353788 slope 0.5692951 0.1781607 0.9604296 > #Fit reduced major axis line > line.cis(log10(vetbnt$epg), log10(vetbnt$tec)) coef(SMA) lower limit upper limit elevation -2.1350855 -4.2100707 -0.06010032 slope 0.6632173 0.3788287 1.16109763