zoukankan      html  css  js  c++  java
  • R语言命令汇总

    > qqplot(spear,fastrankweight)
    > qqplot(spear,fastrankweight,main="title")
    > qqplot(spear,fastrankweight,main="distribution relation between spearman and fastrank")
    > cor(spear,fastrankweight,method="pearson")
    [1] 0.3001109
    > cor(spear,fastrankweight,method="spearman")
    [1] -0.01457876
    > cor(spear,fastrankweight,method="kendall")
    [1] -0.002459491

     data2=read.table("D:\WorkSpace\TestData\20170929\feats2.tsv",header=T)

    Call:
    lm(formula = y ~ x, data = data1)

    Residuals:
        Min      1Q  Median      3Q     Max
    -188.34  -54.64   -3.18   24.25 1447.13

    Coefficients:
                Estimate Std. Error t value Pr(>|t|)   
    (Intercept)   -71.35      29.76  -2.397   0.0183 * 
    x             612.67     123.80   4.949 2.96e-06 ***
    ---
    Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

    Residual standard error: 171.1 on 102 degrees of freedom
    Multiple R-squared:  0.1936,    Adjusted R-squared:  0.1857
    F-statistic: 24.49 on 1 and 102 DF,  p-value: 2.957e-06

    > coefficient<-lm.data1$coefficients
    > coefficient[1]
    (Intercept)
      -71.34905
    > coefficient[2]
          x
    612.669
    > ARsquared<-summary(lm.data1)$adj.r.squared
    > ks.test(lm.data1$residuals,"pnorm",0)

            One-sample Kolmogorov-Smirnov test

    data:  lm.data1$residuals
    D = 0.51524, p-value < 2.2e-16
    alternative hypothesis: two-sided

    > ab<-round(lm.data1$coefficients[1],3)
    > bb<-round(lm.data1$coefficients[2],3)
    > plot(data1$x,data1$y,xlab="x",ylab = "y",col="red",pch="*")
    > abline(lm.data1,col="blue")
    > text(mean(data1$x),max(data1$y),paste("y = ",bb,"x+(",ab,")",sep = ""))
    >

  • 相关阅读:
    ActiveMQ中JMS的可靠性机制
    ActiveMQ中Broker的应用与启动方式
    ActiveMQ支持的传输协议
    ActiveMQ常见消息类型
    Oracle体系结构及备份(十六)——bg-ckpt
    PHP自学之路---雇员管理系统(1)
    UVa11187
    给Android组件添加事件一个很好用的方法
    【项目那些事儿】项目哪些事儿?
    struts2对拦截器使用带实例
  • 原文地址:https://www.cnblogs.com/finallyliuyu/p/7613818.html
Copyright © 2011-2022 走看看