P-Value

Central Lmit Theorem(CLT)

mean(null>diff)

hist(null)

qqnorm(null)

qqline(null)

pops<-read.cssv("mice_pheno.csv")

hed(pops)

hf<- pops[popsSDiet=="hf"&popsSSex=="F",3]

chow<-pops[popsSDiet=="chow"&popsSSex=="F",3]

mean(hf)-mean(chow)

x<- sample(hf,12)

y<-sample(chow,12)

mean(x)_mean(y)

Ns<-c(3,5,10,25)

B<-10000

res<-sapply(Ns,funtion(n){sapply(1:8,function(j){mean(sample(hf,n))})})

lbrary(rafalib)

mypar2(2,2)

未完

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

sample variance

sample standard deviations

confidence intervals

t-statics:

开始编辑

dat<-read.csv("femaleMiceWeights.csv")

dat

control <- dat[1:12,2]

treatment<-dat[12+1:12,2]

diff <- mean(treatment)-mean(control)

print(diff)

t.test(treatment,control)

sd(control)

sd(control)/sqrt(length(control))

se <- sqrt(var(treatment)/length(treatment)+var(control)/length(control))

tstat <- diff/se

1-pnorm(tstat)+pnorm(-tstat)

qqnorm(treatment)

qqline(treatment)

t.test(treatment,control)

R语言绘图(FZ)的更多相关文章

  1. R语言绘图边框的单位

    在R语言中指定画图边框时,通常使用两种单位, lines 和 inches 当然,这两个单位之间是可以相互转换的,那么 1 inch = ? line 答案是1 inches = 5 lines 下面 ...

  2. R语言绘图高质量输出

    R语言通过支持Cairo矢量图形处理的类库,可以创建高质量的矢量图形(PDF,PostScript,SVG) 和 位图(PNG,JPEG, TIFF),同时支持在后台程序中高质量渲染.在ggplot2 ...

  3. linux命令行下使用R语言绘图

    系统:centos 6.4 64bit 环境安装参考:http://hi.baidu.com/solohac/item/4a18e78f1bef9b5825ebd99c 在R语言中可以使用png()等 ...

  4. R语言绘图:时间序列分析 ggplot2绘制ACF PACF

    R语言真是博大精深 方法一 Acf(gold[,2], type = "correlation",lag.max = 100) Acf(gold[,2], type = " ...

  5. 从零开始学习R语言(八)——R语言绘图

    本文首发于知乎专栏:https://zhuanlan.zhihu.com/p/74051739 也同步更新于我的个人博客:https://www.cnblogs.com/nickwu/p/125683 ...

  6. R语言绘图002-页面布局

    par().layout().split.screen()函数 1. par()函数的参数详解 函数par()可以用来设置或者获取图形参数,par()本身(括号中不写任何参数)返回当前的图形参数设置( ...

  7. R语言绘图边框

    在R语言中, 绘图边框一共有3个区域: device region : figure region : plot region   : 在描述不同区域大小的时候,有对应的不同参数: din : 返回d ...

  8. R语言绘图布局

    在R语言中,par 函数可以设置图形边距,其中oma 参数设置outer margin, mar 参数设置margin, 这些边距有什么不同呢,通过box函数可以直观的看到 box 默认在当前图形绘制 ...

  9. R语言——绘图函数深入学习

    利用R自带数据集 通过data()函数可以查看R自带数据集. > data() 返回以下结果,每一条记录都是一个数据,键入相应的数据名称可以查看具体信息. Data sets in packag ...

随机推荐

  1. 关于@Param

    1,使用@Param注解 当以下面的方式进行写SQL语句时: @Select("select column from table where userid = #{userid} " ...

  2. 集合之LinkedHashSet(含JDK1.8源码分析)

    一.前言 上篇已经分析了Set接口下HashSet,我们发现其操作都是基于hashMap的,接下来看LinkedHashSet,其底层实现都是基于linkedHashMap的. 二.linkedHas ...

  3. 莫烦theano学习自修第一天【常量和矩阵的运算】

    1. 代码实现如下: #!/usr/bin/env python #! _*_ coding:UTF-8 _*_ # 导入numpy模块,因为numpy是常用的计算模块 import numpy as ...

  4. web前端面試題

    1.怎麼判斷一個一個變量的類型是string? typeof(obj)==="string" typeof obj==="string" obj.constru ...

  5. 一、纯css实现顶部进度条随滚动条滚动

    一.效果图 二.直接复制粘贴 <!DOCTYPE html> <html lang="en"> <head> <meta charset= ...

  6. Vivado安装、生成bit文件及烧录FPGA的简要流程

    https://wenku.baidu.com/view/0294cbb3bb4cf7ec4bfed01a.html

  7. BZOJ2616 SPOJ PERIODNI(笛卡尔树+树形dp)

    考虑建一棵小根堆笛卡尔树,即每次在当前区间中找到最小值,以最小值为界分割区间,由当前最小值所在位置向两边区间最小值所在位置连边,递归建树.那么该笛卡尔树中的一棵子树对应序列的一个连续区间,且根的权值是 ...

  8. kibana get 查询失效

    kibana版本:5.4 在使用kibana 查询数据时,如果我们根据数据id 来获得一条数据,写法 get 索引名称/类型名称/文档主键 如:get testindex/testtype/01 这样 ...

  9. Spring模块介绍

    GroupId ArtifactId 说明 org.springframework spring-beans Beans 支持,包含 Groovy org.springframework spring ...

  10. HBase读取与写入流程

    写入流程 读取流程 https://yq.aliyun.com/articles/670748?spm=a2c4e.11153940.blogcont684011.28.427e4648CTtaPL