<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Rethinking | 暗微幽光</title>
    <link>http://scchen.com/zh/tags/rethinking/</link>
      <atom:link href="http://scchen.com/zh/tags/rethinking/index.xml" rel="self" type="application/rss+xml" />
    <description>Rethinking</description>
    <generator>Source Themes Academic (https://sourcethemes.com/academic/)</generator><language>zh-Hant</language><copyright>© 2017 Sau-Chin Chen</copyright>
    <image>
      <url>img/map[email:pmsp96@gmail.com gravatar:%!s(bool=false) shape:circle]</url>
      <title>Rethinking</title>
      <link>http://scchen.com/zh/tags/rethinking/</link>
    </image>
    
    <item>
      <title>Autopsy of NHST and Bayesian Models (part 1)</title>
      <link>http://scchen.com/zh/post/2016-04-30-autopsy-of-nhst-and-bayesian-models/2016-04-30-autopsy-of-nhst-and-bayesian-models/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>http://scchen.com/zh/post/2016-04-30-autopsy-of-nhst-and-bayesian-models/2016-04-30-autopsy-of-nhst-and-bayesian-models/</guid>
      <description>


&lt;p&gt;Chapter 2 of &lt;a href=&#34;http://xcelab.net/rm/statistical-rethinking/&#34;&gt;Statistical Rethinking: A Bayesian Course with Examples in R and Stan&lt;/a&gt; introduces a water tossing example for the demonstration how Bayesain model run through the data based on the researcher’s hypothesis. This chapter defines a three stage process that are used in the coming chapters. We start from a narrated &lt;strong&gt;Data Story&lt;/strong&gt; , then &lt;strong&gt;update&lt;/strong&gt; the models by filling data in, and finally &lt;strong&gt;evaluate&lt;/strong&gt; all the &lt;strong&gt;upated&lt;/strong&gt; models. This literated process shows a clear picture for the learners who have yet stuied statistics before read this book. The readers who have studied statistics, like me, will have a hole in the mind what are the differences between Bayesian methods and the null hypothesis significance testing (NHST) in this process. After read Michael Clark’s &lt;a href=&#34;https://sites.google.com/a/umich.edu/micl/miscfiles/IntroBayes.pdf&#34;&gt;Bayesian Basics: A Conceptual Introduction with Application in R and Stan&lt;/a&gt; on &lt;a href=&#34;http://mc-stan.org/documentation/&#34;&gt;Stan official site&lt;/a&gt;, I require the key to understand the difference between the two golems.&lt;/p&gt;
&lt;p&gt;The critical difference is which type of &lt;strong&gt;conditional probability&lt;/strong&gt; the statistical method is used to evaluate the model. Once we collected the data based on some hypothesis, we have the distribution of hypothesis $ p( ) $ and the distribution of data $ p(y) $. NHST compuates the probability we have the data when the hypothesis is true $ p(y|) $. In practical, &lt;em&gt;p&lt;/em&gt; value refers to the &lt;strong&gt;conditional probability&lt;/strong&gt; of the null hypothesis, and * confidence interval* suggests a range of plausible outcomes based on the &lt;em&gt;confiditional probability&lt;/em&gt; of the real hypothesis. A Bayesian method compuates the probability the hypothesis is approved based on the data we have $ p(|y) $. Because the computation of $ p(|y) $ needs the likelihood $ p(y|) $ and the priori $ p() $, of course a Baysian method cost more steps than NHST.&lt;/p&gt;
&lt;p&gt;$ $ has a term &lt;strong&gt;parameter&lt;/strong&gt; in many statstical textbooks. It is a space of numbers that provides the axis where the above probability distribution sit on. &lt;strong&gt;Likelihood&lt;/strong&gt; is the &lt;strong&gt;sampling distribution&lt;/strong&gt; we have to update before we run NHST. As like I show in &lt;a href=&#34;http://scchen.com/blog/2016/03/learning-sampling-distribution-in-r-programming.html&#34;&gt;Learning Sampling Distribution in R Programming&lt;/a&gt;, a sampling distribution will approach one $ $ with the increasing sample size. Sample size is the key for NHST because it could change the evaluation criteron on the statistical model.&lt;/p&gt;
&lt;p&gt;Here is a pseudo experiment I want to know if a test is success based on the expect value smaller than 5 (Obersvations are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10). I completed an experiment of 25 observations and an experiment 36 observations. In use of NHST with a critical value (p &amp;lt; .05), the criterion change with the sample size. The simulation&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;set.seed(1)
OBV &amp;lt;- 1:10
Dist25 &amp;lt;- NULL
Dist36 &amp;lt;- NULL
count = 100
while(count &amp;gt; 0){Dist25 &amp;lt;- c(Dist25,mean(sample(OBV, 25,replace = TRUE) ) ); count &amp;lt;- count - 1}
Dist25_Density &amp;lt;- data.frame(Theta = density(Dist25, kernel = &amp;quot;gaussian&amp;quot;)$x, Density = density(Dist25, kernel = &amp;quot;gaussian&amp;quot;)$y)
CL25 &amp;lt;- max(Dist25_Density$Theta[Dist25_Density$Theta &amp;lt; 5 &amp;amp; Dist25_Density$Density &amp;lt; .05])
print(CL25)  ## The smallest parameter that could make judgement


## [1] 4.152939


count = 100
while(count &amp;gt; 0){Dist36 &amp;lt;- c(Dist36,mean(sample(OBV, 36,replace = TRUE) ) ); count &amp;lt;- count - 1}
Dist36_Density &amp;lt;- data.frame(Theta = density(Dist36, kernel = &amp;quot;gaussian&amp;quot;)$x, Density = density(Dist36, kernel = &amp;quot;gaussian&amp;quot;)$y)
CL36 &amp;lt;- max(Dist36_Density$Theta[Dist36_Density$Theta &amp;lt; 5 &amp;amp; Dist36_Density$Density &amp;lt; .05])
print(CL36)  ## The smallest parameter that could make judgement


## [1] 4.41705&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When this experiment outputs a avarage value between 4.15 and 4.42, would you like to collect the data more than 36 participants? This is the opportunity many researchers have to struggle in their study. Researchers who are educated as like me used to collect the observation till the &lt;em&gt;p&lt;/em&gt; value is smaller than .05. Most researchers used to stop the experiment till the 36th participant finished the experiment. However, this treatment lacks of the serious scientific thinking. If the hypothesis has set up the conditions to have the average, the sample size should be appointed before the start of experiment.&lt;/p&gt;
&lt;p&gt;The appointment of sample size could be loose when the possible average is uncertain. When the experiment is conducted at first time in the world, NHST without the appointment of sample size could draw the range of averages that might obey the hypothesis. On the other hand, the following studies better has the appointment of sample size. In this case, NHST has to accompany the other statistical evaluation, such as power, effect size, to find the appropriate sample size. Therefore, NHST will perform well when the researcher conducted the first study or have the preparation as well as the first study. This will be the key in my autopsy of Bayesian method.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Check My Tools to Create and Manipulate Golems</title>
      <link>http://scchen.com/zh/post/2016-04-22-check-my-tools-to-create-and-manipulate-golems/2016-04-22-check-my-tools-to-create-and-manipulate-golems/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>http://scchen.com/zh/post/2016-04-22-check-my-tools-to-create-and-manipulate-golems/2016-04-22-check-my-tools-to-create-and-manipulate-golems/</guid>
      <description>


&lt;p&gt;Since two weeks before I published this post, I have started read the book &lt;a href=&#34;http://xcelab.net/rm/statistical-rethinking/&#34;&gt;Statistical Rethinking: A Bayesian Course with Examples in R and Stan&lt;/a&gt; written by &lt;a href=&#34;http://xcelab.net/rm/&#34;&gt;Richard McElreath&lt;/a&gt;. Richard is the evolutionary anthropologist at Max Planck Institute. He wrote this textbook for the PhD students who will use the Bayesian statistics in their research projects. Compared to the textbooks written by statisians and data scientistst, Richard’s book explain and demonstrate the statistical methods with examples instead of equations. His intention is to help who are not staticians but used to use statistics realize one fact: we rely on the statistical models as the representations of our answers rather than answer the questions by the raw data or naked truth. Many non-statisticians are used to find and learn what kind of methods or apps to deal with their data, but few are interested to know the models under the mentods and apps they are using. The trouble and danger is that they thought their jobs are done when the program printed the tables and figures but these outputs are from the statistical model is unable to answer their question. This situation is originated from many non-statisticans consider themselves the end-users of statistical models. Like any user of a packaged software, non-statisticans have no time to understand how the tools in their hands designed and conducted by statisticans.&lt;br /&gt;
Richard introduced the story of &lt;a href=&#34;https://en.wikipedia.org/wiki/Golem&#34;&gt;golem&lt;/a&gt; to raise the non-statsiticans’ attention to the troubles they had made and will make. A statistical model, like a golem, has the power beyond human to finish the work the human are unable to do, for example, trace the passengers’ track from the trillion of camera. Its power could be misused or out of control if we do not understand what is the root of its action. A user of ststistical method, no matter you are or are not stistician, have to keep the awareness of engineer when you are dealing with your data. Today everyone has many easier ways than a decade ago to keep the awareness of engineer. One advantage is that the learning curve for being an part-time hacker is getting smooth. Increasing R apps are opening many windows for who are want to outlook and modify the statistical models.&lt;br /&gt;
Since this post, every post listed in the category &lt;code&gt;Rethinking&lt;/code&gt; is one of the summaries and feedbacks to &lt;a href=&#34;https://www.crcpress.com/Statistical-Rethinking-A-Bayesian-Course-with-Examples-in-R-and-Stan/McElreath/9781482253443&#34;&gt;Statistical Rethinking: A Bayesian Course with Examples in R and Stan&lt;/a&gt;. At first I have to check my toolkits for create and manipulate the statistical models. They are R core and the packages. Years ago I have used to use the packages in my data processing. Now I show them for who start to use R after read this post.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;install.packages(c(&amp;quot;rpart&amp;quot;,&amp;quot;chron&amp;quot;,&amp;quot;Hmisc&amp;quot;,&amp;quot;Design&amp;quot;,&amp;quot;Matrix&amp;quot;,&amp;quot;stringr&amp;quot;,&amp;quot;lme4&amp;quot;,&amp;quot;coda&amp;quot;,&amp;quot;e1071&amp;quot;,&amp;quot;zipfR&amp;quot;,&amp;quot;ape&amp;quot;,&amp;quot;languageR&amp;quot;,&amp;quot;multcomp&amp;quot;,&amp;quot;contrast&amp;quot;,&amp;quot;shiny&amp;quot;,&amp;quot;ggplot2&amp;quot;, &amp;quot;dplyr&amp;quot;))&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Some of the packages are learned from I participated in &lt;a href=&#34;https://www.coursera.org/specializations/jhu-data-science&#34;&gt;Cousera Data Science&lt;/a&gt;. Now I used to use &lt;code&gt;dplyr&lt;/code&gt; to process the raw data, and I am learning how to draw the figures I need in use of &lt;code&gt;ggplot2&lt;/code&gt;. When this post is published, I have updated my R to R version 3.4.3 (2017-11-30). Through &lt;a href=&#34;http://xcelab.net/rm/statistical-rethinking/&#34;&gt;the codes of Heuristic Andrew&lt;/a&gt;, here are my installed packages.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ip &amp;lt;- as.data.frame(installed.packages()[,c(1,3:4)])
rownames(ip) &amp;lt;- NULL
ip &amp;lt;- ip[is.na(ip$Priority),1:2,drop=FALSE]
print(ip, row.names=FALSE)


##       Package   Version
##       acepack     1.4.1
##           ape       5.0
##    assertthat     0.2.0
##     backports     1.1.2
##     base64enc     0.1-3
##            BH  1.65.0-1
##         bindr       0.1
##      bindrcpp       0.2
##         binom     1.1-1
##        bitops     1.0-6
##      blogdown       0.4
##      bookdown       0.5
##           car     2.1-6
##       caTools    1.17.1
##     checkmate     1.8.5
##         chron    2.3-51
##          coda    0.19-1
##    colorspace     1.3-2
##      contrast      0.21
##    data.table  1.10.4-3
##     dichromat     2.0-0
##        digest    0.6.13
##         dplyr     0.7.4
##         e1071     1.6-8
##      evaluate    0.10.1
##       Formula     1.2-2
##       geepack     1.2-1
##       ggplot2     2.2.1
##          glue     1.2.0
##     gridExtra       2.3
##        gtable     0.2.0
##         highr       0.6
##         Hmisc     4.0-3
##     htmlTable    1.11.1
##     htmltools     0.3.6
##   htmlwidgets       0.9
##        httpuv     1.3.5
##     iterators     1.0.9
##      jsonlite       1.5
##         knitr      1.17
##      labeling       0.3
##     languageR     1.4.1
##         later       0.6
##  latticeExtra    0.6-28
##      lazyeval     0.2.1
##          lme4    1.1-15
##      magrittr       1.5
##      markdown       0.8
##  MatrixModels     0.4-1
##          mime       0.5
##        miniUI     0.1.1
##         minqa     1.2.4
##      multcomp     1.4-8
##       munsell     0.4.3
##       mvtnorm     1.0-6
##        nloptr     1.0.4
##      pbkrtest     0.4-7
##     pBrackets       1.0
##     pkgconfig     2.0.1
##         plogr     0.1-1
##       plotrix       3.7
##          plyr     1.8.4
##     polspline    1.1.12
##      quantreg      5.34
##            R6     2.2.2
##  RColorBrewer     1.1-2
##          Rcpp   0.12.14
##     RcppEigen 0.3.3.3.1
##      reshape2     1.4.3
##         rlang     0.1.4
##        RLRsim     3.1-3
##     rmarkdown       1.8
##           rms     5.1-1
##     rprojroot     1.3-1
##    rstudioapi       0.7
##      sandwich     2.4-0
##        scales     0.5.0
##         servr       0.8
##         shiny     1.0.5
##          simr     1.0.3
##   sourcetools     0.1.6
##       SparseM      1.77
##       stringi     1.1.6
##       stringr     1.2.0
##       TH.data     1.0-8
##        tibble     1.3.4
##       viridis     0.4.0
##   viridisLite     0.2.0
##        xtable     1.8-2
##          yaml    2.1.16
##         zipfR    0.6-10
##           zoo     1.8-0


print(paste0(&amp;quot;There are &amp;quot;,dim(ip)[1], &amp;quot; packages installed in my laptop.&amp;quot;))


## [1] &amp;quot;There are 92 packages installed in my laptop.&amp;quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Richard’s book inspired me help people control their golems/ststistical models in the process of coding. In his book, literature and codes are separated. Readers who are not familiar with coding skill might hardly follow his literature. Literatural coding might be the best way to impliment the &lt;code&gt;Rethinking&lt;/code&gt;. I am going to accumulating the codes of Bayesian statistics and thake notes of his and others literatures in the coming posts.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Rethink Significance</title>
      <link>http://scchen.com/zh/post/2016-05-05-rethink-significance/2016-05-05-rethink-significance/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>http://scchen.com/zh/post/2016-05-05-rethink-significance/2016-05-05-rethink-significance/</guid>
      <description>


&lt;p&gt;To trace the fallacy of use hypothesis testing, I am programming the examples in Dr. Adrianus D. de Groot’s paper &lt;code&gt;The meaning of “signiﬁcance” for different types of research&lt;/code&gt;. This paper is published in 1956 in the Dutch journal &lt;em&gt;Nederlands Tijdschrift voor de Psychologie en Haar Grensgebieden&lt;/em&gt;. &lt;a href=&#34;https://en.wikipedia.org/wiki/Adriaan_de_Groot&#34;&gt;Adrianus De Groot&lt;/a&gt; is Dutch psychologist and chess master. During 1950s and 1960s, he suggested the concept of emperical cycle for the researchers who use the statistical tools in the social and behavioral researches.&lt;/p&gt;
&lt;div class=&#34;float&#34;&gt;
&lt;img src=&#34;http://scchen.com/images/524px-Empirical_Cycle.png&#34; alt=&#34;Emperical cycle&#34; /&gt;
&lt;div class=&#34;figcaption&#34;&gt;Emperical cycle&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Emperical cycle&lt;/p&gt;
&lt;p&gt;de Groot’s emperical cycle distinguish two types of emperical research: &lt;strong&gt;exploratory research&lt;/strong&gt; and &lt;strong&gt;confirmatory research&lt;/strong&gt;. &lt;strong&gt;Exploratory research&lt;/strong&gt; aims to formulate the hypotheses that covers the process from &lt;code&gt;observation&lt;/code&gt; to &lt;code&gt;induction&lt;/code&gt;. &lt;strong&gt;Confirmatory research&lt;/strong&gt; attempts to test the predicited concequences based the hypothesis. Thus a &lt;strong&gt;Confirmatory research&lt;/strong&gt; covers &lt;code&gt;deduction&lt;/code&gt;, &lt;code&gt;testing&lt;/code&gt;, and &lt;code&gt;evaluation&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In the time de Groot started his academic career, the protocol of hypothesis testing has been completed by the leading statisticans, &lt;a href=&#34;https://en.wikipedia.org/wiki/Ronald_Fisher&#34;&gt;Ronald Fisher&lt;/a&gt;, &lt;a href=&#34;https://en.wikipedia.org/wiki/Jerzy_Neyman&#34;&gt;Jerzy Neyman&lt;/a&gt;, and &lt;a href=&#34;https://en.wikipedia.org/wiki/Egon_Pearson&#34;&gt;Egon Pearson&lt;/a&gt;. Psychologists at that time learned and used &lt;em&gt;p value&lt;/em&gt; to evaluate the results. de Groot in his paper has suggested that the hypothesis testing is the appropriate tool to evaluate the result of a confirmatory reserach. He in the same paper also discussed the problems that perhapes happen when the hypothesis testing was used to decide the available hypotheses in an exploratory research. There are two cases of explorartoy research discussed in his paper. One has finite hypotheses, and the other has infinite hypotheses. Both cases show up in front of every researcher in anytime and in anywhere. Many researcher struggle how to pick the available hypotheses up according to the data in hands.&lt;/p&gt;
&lt;div id=&#34;exploratory-research-has-finite-hypotheses&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Exploratory research has finite hypotheses&lt;/h3&gt;
&lt;p&gt;The section title in de Groot’s paper is &lt;code&gt;Hypothesis testing research for multiple hypotheses&lt;/code&gt;. He presumed the case as follow:&lt;/p&gt;
&lt;p&gt;We give &lt;em&gt;N&lt;/em&gt; as the number of hypotheses yet to be tested. Every hypothesis is going to be evaluated by the hypothesis testing. We also give &lt;em&gt;n&lt;/em&gt; as the number of hypothese successfully passed the test. Every hypothesis have the probability .05 pass the test. This probability refers to the type 1 error in the present hypothesis testing.&lt;/p&gt;
&lt;p&gt;Today we have 10 hypotheses (N = 10) to be evaluated by the data. Consider all the consequences, we can calculate all the probabilities given the counts of positive hypotheses.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;require(xtable)
N &amp;lt;- 10
n &amp;lt;- 0:10
alpha &amp;lt;- .05
REJECT_P &amp;lt;- 0
PASS_P &amp;lt;- rep(0,length(n))
for(k in n){
        REJECT_P = REJECT_P + choose(N,k)*alpha^k*(1 - alpha)^(N - k) 
        PASS_P[k+1] = 1 - REJECT_P
}
SUCCESS = data.frame(n,PASS_P)
colnames(SUCCESS) &amp;lt;- c(&amp;quot;n&amp;quot;, &amp;quot;Probability(Positive Results)&amp;quot;)
print(xtable(SUCCESS), include.rownames = FALSE, type = &amp;quot;html&amp;quot; ) &lt;/code&gt;&lt;/pre&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr class=&#34;header&#34;&gt;
&lt;th&gt;n&lt;/th&gt;
&lt;th&gt;Probability(Positive Results)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0.40&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0.09&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;0.01&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;0.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;0.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;0.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;0.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;0.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;0.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;0.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;0.00&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;pre&gt;&lt;code&gt;plot(PASS_P ~ n, xlab = &amp;quot;Smallest Number of Positive Hypotheses&amp;quot;, ylab = &amp;quot;Probability(Positive Results)&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;http://scchen.com/post/2016-05-05-rethink-significance_files/figure-html/MultiHypo-1.png&#34; /&gt;&lt;/p&gt;
&lt;p&gt;That table is telling us if we wish acquire at least one positive hypothesis, the probability is 0.4012631. That plot shows the probability dramatically decrease with the increasing numbers in our wish. In other words, when we have no precise knowlegde about the use of hyphtesis testing, the more hypotheses we want to induce, the higher risk we get nothing.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;exploratory-research-has-infinite-hypotheses&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Exploratory research has infinite hypotheses&lt;/h3&gt;
&lt;p&gt;This case is everywhere in this era of big data. de Groot called this case &lt;code&gt;Material-exploration: N becomes unspeciﬁed&lt;/code&gt;. In his paper, material refers to data because data is a low frequency word in his era. The researchers in his era has realized the best way to deal with this case is &lt;strong&gt;to let the data tell the story&lt;/strong&gt;. The research on this case obviously is an &lt;strong&gt;exploratory research&lt;/strong&gt;. For the researchers in de Groot’s era and in the era of big data, there are two routes to finish this kind of research project. One route is to label and categorize the hypotheses. This route is the hot topic of &lt;a href=&#34;https://en.wikipedia.org/wiki/Machine_learning&#34;&gt;machine learning&lt;/a&gt; in the present data science. The other route is to decide the possible hypotheses. Today the researchers on this route mostly rely on the multiple variate statistical tools.&lt;/p&gt;
&lt;p&gt;de Groot suggests the caution to the research that attempts to decide the potential hypotheses. &lt;strong&gt;N&lt;/strong&gt; is infinite because not all hypotheses could be induced in this case. Whe we have 20 testable hypotheses from 200 potential hypotheses. If a researcher confirmed that 10 of the 20 hypotheses have the positive support by the data, based on the type 1 error, he/she has to understand that 5% hypotheses are positive (10/200) but 50% hypotheses are positive (10/20). This caution is like the misuse of golem that is discussed in &lt;a href=&#34;https://www.crcpress.com/Statistical-Rethinking-A-Bayesian-Course-with-Examples-in-R-and-Stan/McElreath/9781482253443&#34;&gt;Statistical Rethingking&lt;/a&gt;. In the timing I am writing this note, this caution implied the researchers who are thinking the potential hypotheses are decided assumed that they have finished a emperical circle.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;role-of-preregisteration&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Role of Preregisteration&lt;/h3&gt;
&lt;p&gt;Decades of misusing the hypothesis testing have resulted in a bad situation we have to faced. There is no clear cutoff between the exploratory research and the confirmatory research. Many published papers in nature are the exploratory researches, but they are packaged in the form of confirmatory research by the authors (editors and reviewers have the responsibility too). This is why de Groot’s originated paper was translated and published 60 years later. This post is one of the fundemental I will cite when I introduce and discuss the preregistration.&lt;/p&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Why we need a readable data table in behavioral scientific research?</title>
      <link>http://scchen.com/zh/post/2016-05-31-why-we-need-a-readable-data-table-in-behavioral-scientific-research/2016-05-31-why-we-need-a-readable-data-table-in-behavioral-scientific-research/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>http://scchen.com/zh/post/2016-05-31-why-we-need-a-readable-data-table-in-behavioral-scientific-research/2016-05-31-why-we-need-a-readable-data-table-in-behavioral-scientific-research/</guid>
      <description>


&lt;div id=&#34;a-bad-case&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;A bad case&lt;/h3&gt;
&lt;p&gt;A few days ago I was dealing with a raw data set as like the following table.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr class=&#34;header&#34;&gt;
&lt;th&gt;ID&lt;/th&gt;
&lt;th&gt;Group&lt;/th&gt;
&lt;th&gt;I01&lt;/th&gt;
&lt;th&gt;I02&lt;/th&gt;
&lt;th&gt;I03&lt;/th&gt;
&lt;th&gt;I04&lt;/th&gt;
&lt;th&gt;I05&lt;/th&gt;
&lt;th&gt;I06&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td&gt;s01&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td&gt;s02&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td&gt;s03&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td&gt;s04&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td&gt;s05&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td&gt;s06&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;This table is a tiny version I copied from a master graduate’s spss raw data table. The format of the table is frequently seen in the data files for SPSS software. This format originated the “row cognition” for data in every mind who are not familar with the statistical tools. Without the awareness of structure, people used to stack a lot of bricks horizontally. As like the table shows, there are the data of 6 participants. A new statistical tool user tend to fill all the information and data for a participant in a row as possible. This format fits human cognition for the naive thing who never manipulate before. However, the computers recognize the table by column, in other words, a “column cognition”. I show you how computer deal with the summation of one participant’s scores by the following codes.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;s01_data &amp;lt;- c(3,4,5,1,2,3)
units &amp;lt;- rep(1,6)
sum(s01_data)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;[1] 18&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;t(units)%*%s01_data


 [,1]&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;[1,] 18&lt;/p&gt;
&lt;p&gt;The function &lt;code&gt;sum&lt;/code&gt; is one of the first functions a new statistical tool user have learned at the first class. &lt;code&gt;sum&lt;/code&gt; is used to add all the scores of a participant. A new user tend to append the summation to the end of a row. But the last code show you a programing language recognizes the scores of a participant by column. The evidence is that the sturcture of &lt;code&gt;t(units)&lt;/code&gt; is row but the structure of &lt;code&gt;s01_data&lt;/code&gt; is a column. How do we eliminate the difference between human and machine cognition? Why human tend to deal with the data by row rather by column?&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;codes-to-make-the-table-readable&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Codes to make the table readable&lt;/h3&gt;
&lt;p&gt;To make the table readable for the computer, I have to modify the format of this table as like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Table &amp;lt;- read.csv(&amp;quot;data.csv&amp;quot;)
New_Table = data.frame(ID = rep(Table[,1],6), Group = rep(Table[,2],6), Item = rep(names(Table[,3:8]), each = 6), Resp = unlist(c(Table[,3:8])), row.names = NULL)
head(New_Table)


##    ID Group Item Resp
## 1 s01     A  I01    3
## 2 s02     A  I01    2
## 3 s03     A  I01    4
## 4 s04     B  I01    2
## 5 s05     B  I01    2
## 6 s06     B  I01    2&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The new table arrange all the raw scores in one column. I create a new column &lt;code&gt;Item&lt;/code&gt; in this table. &lt;code&gt;Item&lt;/code&gt; is the index like &lt;code&gt;ID&lt;/code&gt; and &lt;code&gt;Group&lt;/code&gt;. We are able to summarize the total score of each participant by combine the index ‘ID’ and ‘Item’. We also average the group means by the index &lt;code&gt;Group&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;configurate-human-mind-approaching-a-readable-data-table&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Configurate human mind approaching a readable data table&lt;/h3&gt;
&lt;p&gt;Why we have to make effort for waving a table readable for the computer? It is the human nature we prefer every column filled with meanings in a table. Every item has the reason a researcher put it into the study. Organizing all scores of items in a row occupy the meanings in the human cognition, but the index of items is meaningless for every human mind. A researcher need a table filled with the analyzable data for the statitical tool. In the case of this post, the analyzable data is the summation of all 6 items. A table like this case embodies the desired table for the researcher but needs a column of summarized scores for the computer. This gap has to be fixed before a precise statistical process is conducted. The solution I prefer is design the table format at first. This is the main reason I and my students have to prepare a code book before the start of the experiment.&lt;/p&gt;
&lt;p&gt;The secondary solution depends on the packaged functions. There are many raw data table organized like the bad case at first, because the software to collect the raw data and organize them in this way, for example, google From apps. To deal with these data, I have to transform the raw data before I import them to R. A reproducible way is to transform them in use of the R codes. The functions have to isolate which columns are index and which columns are raw responses. To my knowledge, a code book is needed to define the columns to be arranged.&lt;/p&gt;
&lt;/div&gt;
</description>
    </item>
    
  </channel>
</rss>
