[R] Help with function lmodel2

avcommande avcmd at orange.fr
Sun Jun 12 19:56:36 CEST 2016





Hello everyone,

 

Does anybody know whether it's possible to calculate extract major axis regression residuals on the results of a major axis Model II regression done by lmodel2? 

Many thanks, 

Orca

 

Example :

 

> data1 data1

    SSTo  SSTp

1  17.21 20.36

2  19.61 20.19

3  18.60 20.08

4  18.76 19.71

5  18.24 20.48

6  19.10 20.56

7  20.45 20.56

8  18.68 19.71

9  16.55 20.48

10 17.33 20.60

11 18.12 18.93

12 18.02 18.65

13 18.43 18.90

14 18.57 18.62

15 17.40 18.79

16 18.91 19.28

17 18.43 18.58

18 17.02 18.40

19 16.96 17.79

20 17.05 17.82

21 16.98 18.07

22 16.86 18.00

23 17.00 17.79

24 16.70 18.18

25 15.93 18.07

26 17.06 17.85

 

> Reg1<-lmodel2(SSTo~SSTp,data=data1,"interval","interval",99)

> Reg1

 

Model II regression

 

Call: lmodel2(formula = SSTo ~ SSTp, data = data1, range.y =

"interval", range.x = "interval", nperm = 99)

 

n = 26   r = 0.5671202   r-square = 0.3216254 

Parametric P-values:   2-tailed = 0.002517785    1-tailed = 0.001258892 

Angle between the two OLS regression lines = 30.86925 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  6.651441 0.5862273        30.38000              0.01

2     MA -2.397667 1.0601457        46.67227              0.01

3    SMA -1.892541 1.0336913        45.94911                NA

4    RMA  3.144884 0.7698721        37.59167              0.01

 

Confidence intervals

  Method 2.5%-Intercept 97.5%-Intercept 2.5%-Slope 97.5%-Slope

1    OLS     -0.2070452       13.509927  0.2275463   0.9449083

2     MA    -22.1054387        7.308805  0.5517999   2.0922780

3    SMA     -9.8957401        3.801737  0.7354715   1.4528336

4    RMA     -7.3480741       11.432676  0.3358252   1.3194076

 

Eigenvalues: 1.751428 0.4828554 

 

H statistic used for computing C.I. of MA: 0.09327046

	[[alternative HTML version deleted]]



More information about the R-help mailing list