, , , : , ( ). - .
: ( ), ( ), ; , ; , , .
, , , z - :
, , , - . ; .
cor.test(x, y,alternative = c("two.sided", "less", "greater"), method = c("pearson", "kendall", "spearman"), conf.level = 0.95,...)
x, y | . |
alternative | "two.sided" ( )- , "greater" - "less"- . |
method | . "pearson", "kendall", "spearman". |
conf.level |
H0 alternative "two.sided".
( R qt(p,df)).
> x<-c(3.6,7.8,9.6,5.7,8.9)
> y<-c(2.7,8.9,6.5,8.8,6.4)
> cor.test(x,y,alternative = c("two.sided"), method = c("pearson"))
Pearson's product-moment correlation
t = 0.9142, df = 3, p-value = 0.428
95 percent confidence interval: -0.7063858 0.9555364
sample estimates: cor = 0.4667999
> cor.test(x,y,alternative= c("two.sided"), method=c("spearman"))
Spearman's rank correlation rho
S = 16, p-value = 0.7833
sample estimates: rho = 0.2
() 0.4668, t - 0.9142 3 , p -value 0.428. , 42.8%. 95% (-0.7063858, 0.9555364) , 5% .
|
|
(0.2), p -value (0.7833). X Y.
- , - , - () , - .
- .
:
- , . , :
,
- ;
- ;
- .
lm(formula=f), (, ); y~x , y x.
> x<-c(3.6,7.8,9.6,5.7,8.9)
> y<-c(2.7,8.9,6.5,8.8,6.4)
> p.lm<-lm(formula=x~y)
> summary(p.lm)
Residuals:
1 2 3 4 5
-1.7151 -0.3409 2.5529 -2.3954 1.8985
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 4.0845 3.5050 1.165 0.328
y 0.4558 0.4985 0.914 0.428
Residual standard error: 2.511 on 3 degrees of freedom
Multiple R-Squared: 0.2179, Adjusted R-squared: -0.0428
F-statistic: 0.8358 on 1 and 3 DF, p-value: 0.428
summary() :
(residuals - y). , ().
( , (0.328 0.428) 0.05 - .. , x y).
(R-squared), y, ( R2 0, F =0.8358, 42.8%, .. ).
:
abline(a, b, untf = FALSE,...)
abline(h=, untf = FALSE,...)
abline(v=, untf = FALSE,...)
a,b | |
untf | TRUE, |
h,v | Y |
plot(x, y, xlim=range(x),ylim=range(y),type="p", main, xlab, ylab,...)
|
|
X,Y | x y. |
xlim, ylim | x y. |
Type | ( p ) |
Main | |
Xlab,ylab | . |
abline() a b.
plot() .
plot(x,y)
abline(lm(x~y))
.
1. .. / ....: , 2000.-479.
2. .. / .. . : , 1990.-352.
3. / .. . : , 1991.-400.
4. . : -: , 2001.-752.
5. . /...:,1963.-272.
6. . - / . . : , 1999.-449.
7. .., .., .., .. R / .., .., .., .. 2007.-28