방문자
Scientist. Husband. Daddy. --- TOLLE. LEGE
[1] 이 블로그는 대한민국 저작권법(28조)과 U.S. Copyright Act (17 USC. §107)에 정의된 "저작권물의 공정한 이용원칙 | the U.S. fair use doctrine" 을 따릅니다. [2] 저작권(© 최광민)이 명시된 모든 글과 번역문들에 대해 (1) 원글의 URL 주소링크를 밝히지 않은 모든 형태의 (2) 전문 복제-배포, (3) 임의수정 및 자의적 본문 발췌, (4) 화면캡처 및 배포를 금지합니다. [3] 아울러 이 블로그의 내용을 AI 학습용으로 이용하는 것 역시 금지합니다. [운영] [대문으로] [방명록]
블로그 후원하기
[한국] 하나은행 (최광민): 376-910-500-183-07
[미국] 벤모 Venmo: @pay4kc
[국제] 페이팔 PayPal: @pay4kc
블로그 내부검색
주제
연재
한 주 BEST
- [© 최광민] 예수 vs. 예수 #07: 삼위일체 개념은 어디서 유래했을까?
- [© 최광민] 예수 vs. 짜라투스투라 #01: 기독교의 예수는 짜라투스트라를 표절했을까?
- [© 최광민] 예수 vs. 붓다 #1: 소위 "불교계통" 복음서들의 정체: {이사전}, {보병궁 복음서}, {유란시아書}, {임마누엘의 탈무드}
- [© 최광민] 예수 vs. 예수 #11: 크리스마스의 기원과 동방박사의 별 (합본)
- [© 최광민] 랍비 카두리의 메시아, 예수
- [© 최광민] 예수 vs. 예수 #02: 예수는 언제부터 신이었을까?
- [© 최광민] 전쟁에 관한 기독교 초기교부들의 견해
- [© 최광민] 불문학자 민희식 vs. 불교작가 민희식 | 제 1부: 한국이 낳은 어떤 "세계적(?)" 석학?
- [© 최광민] 아멘 vs. 아멘: 유대교/기독교의 '아멘'은 이집트신 '아멘'에서 유래했을까?
- [© 최광민] 로마카톨릭 vs. 프로테스탄트 #03: 예정과 자유의지, 그리고 구원
최신 포스팅
Tests: R, Perl
Labels:
Informatics
이메일로 전송BlogThis!X에 공유Facebook에서 공유
- using chi-square test
- d-separation
T-test with Perl
#! /usr/bin/perl
use Statistics::TTest;
use Statistics::Basic qw(:all);
my @Data1 = qw(1 2 3 4);
my @Data2 = qw(11 12 13 11 16);
my $mean = mean( @Data1 ) ;
print $mean;
my $ttest = new Statistics::TTest;
$ttest->set_significance(95);
$ttest->load_data(\@Data1,\@Data2);
#$ttest->output_t_test();
my $t = $ttest->t_statistic;
my $df = $ttest->df;
my $prob = $ttest->{t_prob};
my $test = $ttest->null_hypothesis();
print "t=$t (df = $df) - p-value = $prob\nNull hypothesis is $test\n";
T-test with R (paired)
args <- commandArgs(TRUE)
data1 <- args[1] # data file / numeric vector
data2 <- args[2] # data file / numeric vector
v1 <- read.table( file=data1, header=F )
v1 <- as.vector( v1 )
v2 <- read.table( file=data2, header=F )
v2 <- as.vector( v2 )
t.test( v1, v2, paired=F )
One-way ANOVA
http://www.math.mcmaster.ca/peter/s2ma3/s2ma3_0102/classnotes/notes20020328.html
Tuekey TEst
http://www.agr.kuleuven.ac.be/vakken/statisticsbyR/ANOVAbyRr/multiplecomp.htm
require(graphics)
#summary(fm1 = aov(breaks ~ wool + tension, data = warpbreaks))
#TukeyHSD(fm1, "tension", ordered = TRUE)
c2 = read.table(file="c2.txt", header=T)
fm2 = aov( score ~ group, data=c2)
TukeyHSD(fm2, "group", ordered = TRUE)
plot(TukeyHSD(fm2, "group"))
c4 = read.table(file="c4.txt", header=T)
fm4 = aov( score ~ group, data=c4)
TukeyHSD(fm4, "group", ordered = TRUE)
plot(TukeyHSD(fm4, "group"))
g1 g2 g3 g4
-------------------
1 2 3 2
2 3 1 2
-------------------
g = read.csv( "g-ratio.csv", sep="\t" )
d = read.csv( "diameter.csv", sep="\t" )
g1 = as.vector( g[,1] )
g1 = g1[ g1 != "" ][-1]
g2 = as.vector( g[,2] )
g2 = g2[ g2 != "" ][-1]
g3 = as.vector( g[,3] )
g3 = g3[ g3 != "" ][-1]
g4 = as.vector( g[,4] )
g4 = g4[ g4 != "" ][-1]
group = c( rep("g1", length(g1)), rep("g2", length(g2)), rep("g3", length(g3)), rep("g4", length(g4)) )
score = as.numeric( c( g1, g2, g3, g4 ) )
t = data.frame( group )
t$score = score
fm = aov( score ~ group, data=t)
TukeyHSD(fm, "group", ordered = TRUE)
plot(TukeyHSD(fm, "group"))
이메일로 전송BlogThis!X에 공유Facebook에서 공유
Labels:
Informatics
Scientist. Husband. Daddy. --- TOLLE. LEGE
[1] This blog complies with the "Fair Use Doctrine" as defined in Article 28 of the Republic of Korea Copyright Act and the U.S. Copyright Act (17 USC. §107). [2] Regarding copyrighted (© Kwangmin Choi) articles and translations, the following actions are prohibited (1) without providing a link to the original URL: (2) Full reproduction and distribution, (3) Unauthorized modification and arbitrary excerpting, and (4) Screen capturing and distribution. [3] Additionally, using the content of this blog for AI training is strictly prohibited. [운영] [대문으로] [방명록]
블로그 후원하기
[한국] 하나은행 (최광민): 376-910-500-183-07
[미국] 벤모 Venmo: @pay4kc
[국제] 페이팔 PayPal: @pay4kc


