Karen Ross
2009-Jul-16 07:44 UTC
[R] calculating R-squared or equivalent for Model II regression
Hi, Does anybody know whether it's possible (and sensible) to calculate R^2 (or something approximating R^2) on the results of a major axis Model II regression done by lmodel2? The function lmodel2 provides an R^2 for the OLS regression only (example below) Also, is it possible to extract major axis regression residuals? Many thanks, Karen Example:> Result <- lmodel2( sqrt(DBH.cm/100) ~ sqrt(height.m), data=data.KR, "relative", "relative", 99)> ResultModel II regression Call: lmodel2(formula = sqrt(DBH.cm/100) ~ sqrt(height.m), data = data.KR2004.Call.open, range.y = "relative", range.x = "relative", nperm = 99) n = 138 r = 0.9901839 r-square = 0.9804641 --> for OLS Parametric P-values: 2-tailed = 4.123218e-118 1-tailed = 2.061609e-118 Angle between the two OLS regression lines = 0.2637846 degrees Permutation tests of OLS, MA, RMA slopes: 1-tailed, tail corresponding to sign A permutation test of r is equivalent to a permutation test of the OLS slope P-perm for SMA = NA because the SMA slope cannot be tested Regression results Method Intercept Slope Angle (degrees) P-perm (1-tailed) 1 OLS -0.2460454 0.2452351 13.77901 0.01 2 MA -0.2468372 0.2455126 13.79400 0.01 3 SMA -0.2529825 0.2476662 13.91032 NA 4 RMA -0.2547898 0.2482996 13.94451 0.01 Confidence intervals Method 2.5%-Intercept 97.5%-Intercept 2.5%-Slope 97.5%-Slope 1 OLS -0.2638713 -0.2282196 0.2393650 0.2511051 2 MA -0.2636291 -0.2300910 0.2396437 0.2513974 3 SMA -0.2699308 -0.2364311 0.2418657 0.2536058 4 RMA -0.2720098 -0.2380816 0.2424441 0.2543344 Eigenvalues: 1.153060 0.001229238 H statistic used for computing C.I. of MA: 3.072071e-05 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- This email is intended for the addressee(s) named and may contain confidential and/or privileged information. If you are not the intended recipient, please notify the sender and then delete it immediately. Any views expressed in this email are those of the individual sender except where the sender expressly and with authority states them to be the views of the Department of Environment and Climate Change (NSW). [[alternative HTML version deleted]]