[This article was first published on The 20% Statistician, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
< !--[if gte mso 9]>< xml> < o:OfficeDocumentSettings> < o:AllowPNG/> < ![endif]-->Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
< !--[if gte mso 9]>< xml> < w:WordDocument> < w:View>Normal < w:Zoom>0 < w:TrackMoves/> < w:TrackFormatting/> < w:DoNotShowPropertyChanges/> < w:PunctuationKerning/> < w:ValidateAgainstSchemas/> < w:SaveIfXMLInvalid>false < w:IgnoreMixedContent>false < w:AlwaysShowPlaceholderText>false < w:DoNotPromoteQF/> < w:LidThemeOther>EN-US < w:LidThemeAsian>X-NONE < w:LidThemeComplexScript>X-NONE < w:Compatibility> < w:BreakWrappedTables/> < w:SnapToGridInCell/> < w:WrapTextWithPunct/> < w:UseAsianBreakRules/> < w:DontGrowAutofit/> < w:SplitPgBreakAndParaMark/> < w:EnableOpenTypeKerning/> < w:DontFlipMirrorIndents/> < w:OverrideTableStyleHps/> < m:mathPr> < m:mathFont m:val="Cambria Math"/> < m:brkBin m:val="before"/> < m:brkBinSub m:val="--"/> < m:smallFrac m:val="off"/> < m:dispDef/> < m:lMargin m:val="0"/> < m:rMargin m:val="0"/> < m:defJc m:val="centerGroup"/> < m:wrapIndent m:val="1440"/> < m:intLim m:val="subSup"/> < m:naryLim m:val="undOvr"/> < ![endif]-->< !--[if gte mso 9]>< xml> < w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="false" DefSemiHidden="false" DefQFormat="false" DefPriority="99" LatentStyleCount="371"> < w:LsdException Locked="false" Priority="0" QFormat="true" Name="Normal"/> < w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 1"/> < w:LsdException Locked="false" Priority="9" SemiHidden="true" UnhideWhenUsed="true" QFormat="true" Name="heading 2"/> < w:LsdException Locked="false" Priority="9" SemiHidden="true" UnhideWhenUsed="true" QFormat="true" Name="heading 3"/> < w:LsdException Locked="false" Priority="9" SemiHidden="true" UnhideWhenUsed="true" QFormat="true" Name="heading 4"/> < w:LsdException Locked="false" Priority="9" SemiHidden="true" UnhideWhenUsed="true" QFormat="true" Name="heading 5"/> < w:LsdException Locked="false" Priority="9" SemiHidden="true" UnhideWhenUsed="true" QFormat="true" Name="heading 6"/> < w:LsdException Locked="false" Priority="9" SemiHidden="true" UnhideWhenUsed="true" QFormat="true" Name="heading 7"/> < w:LsdException Locked="false" Priority="9" SemiHidden="true" UnhideWhenUsed="true" QFormat="true" Name="heading 8"/> < w:LsdException Locked="false" Priority="9" SemiHidden="true" UnhideWhenUsed="true" QFormat="true" Name="heading 9"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="index 1"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="index 2"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="index 3"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="index 4"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="index 5"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="index 6"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="index 7"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="index 8"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="index 9"/> < w:LsdException Locked="false" Priority="39" SemiHidden="true" UnhideWhenUsed="true" Name="toc 1"/> < w:LsdException Locked="false" Priority="39" SemiHidden="true" UnhideWhenUsed="true" Name="toc 2"/> < w:LsdException Locked="false" Priority="39" SemiHidden="true" UnhideWhenUsed="true" Name="toc 3"/> < w:LsdException Locked="false" Priority="39" SemiHidden="true" UnhideWhenUsed="true" Name="toc 4"/> < w:LsdException Locked="false" Priority="39" SemiHidden="true" UnhideWhenUsed="true" Name="toc 5"/> < w:LsdException Locked="false" Priority="39" SemiHidden="true" UnhideWhenUsed="true" Name="toc 6"/> < w:LsdException Locked="false" Priority="39" SemiHidden="true" UnhideWhenUsed="true" Name="toc 7"/> < w:LsdException Locked="false" Priority="39" SemiHidden="true" UnhideWhenUsed="true" Name="toc 8"/> < w:LsdException Locked="false" Priority="39" SemiHidden="true" UnhideWhenUsed="true" Name="toc 9"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Normal Indent"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="footnote text"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="annotation text"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="header"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="footer"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="index heading"/> < w:LsdException Locked="false" Priority="35" SemiHidden="true" UnhideWhenUsed="true" QFormat="true" Name="caption"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="table of figures"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="envelope address"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="envelope return"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="footnote reference"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="annotation reference"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="line number"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="page number"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="endnote reference"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="endnote text"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="table of authorities"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="macro"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="toa heading"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List Bullet"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List Number"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List 2"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List 3"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List 4"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List 5"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List Bullet 2"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List Bullet 3"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List Bullet 4"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List Bullet 5"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List Number 2"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List Number 3"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List Number 4"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List Number 5"/> < w:LsdException Locked="false" Priority="10" QFormat="true" Name="Title"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Closing"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Signature"/> < w:LsdException Locked="false" Priority="1" SemiHidden="true" UnhideWhenUsed="true" Name="Default Paragraph Font"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Body Text"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Body Text Indent"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List Continue"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List Continue 2"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List Continue 3"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List Continue 4"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List Continue 5"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Message Header"/> < w:LsdException Locked="false" Priority="11" QFormat="true" Name="Subtitle"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Salutation"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Date"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Body Text First Indent"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Body Text First Indent 2"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Note Heading"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Body Text 2"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Body Text 3"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Body Text Indent 2"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Body Text Indent 3"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Block Text"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Hyperlink"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="FollowedHyperlink"/> < w:LsdException Locked="false" Priority="22" QFormat="true" Name="Strong"/> < w:LsdException Locked="false" Priority="20" QFormat="true" Name="Emphasis"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Document Map"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Plain Text"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="E-mail Signature"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="HTML Top of Form"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="HTML Bottom of Form"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Normal (Web)"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="HTML Acronym"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="HTML Address"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="HTML Cite"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="HTML Code"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="HTML Definition"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="HTML Keyboard"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="HTML Preformatted"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="HTML Sample"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="HTML Typewriter"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="HTML Variable"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Normal Table"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="annotation subject"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="No List"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Outline List 1"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Outline List 2"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Outline List 3"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Simple 1"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Simple 2"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Simple 3"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Classic 1"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Classic 2"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Classic 3"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Classic 4"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Colorful 1"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Colorful 2"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Colorful 3"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Columns 1"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Columns 2"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Columns 3"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Columns 4"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Columns 5"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Grid 1"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Grid 2"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Grid 3"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Grid 4"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Grid 5"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Grid 6"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Grid 7"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Grid 8"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table List 1"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table List 2"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table List 3"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table List 4"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table List 5"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table List 6"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table List 7"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table List 8"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table 3D effects 1"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table 3D effects 2"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table 3D effects 3"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Contemporary"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Elegant"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Professional"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Subtle 1"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Subtle 2"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Web 1"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Web 2"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Web 3"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Balloon Text"/> < w:LsdException Locked="false" Priority="39" Name="Table Grid"/> < w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="Table Theme"/> < w:LsdException Locked="false" SemiHidden="true" Name="Placeholder Text"/> < w:LsdException Locked="false" Priority="1" QFormat="true" Name="No Spacing"/> < w:LsdException Locked="false" Priority="60" Name="Light Shading"/> < w:LsdException Locked="false" Priority="61" Name="Light List"/> < w:LsdException Locked="false" Priority="62" Name="Light Grid"/> < w:LsdException Locked="false" Priority="63" Name="Medium Shading 1"/> < w:LsdException Locked="false" Priority="64" Name="Medium Shading 2"/> < w:LsdException Locked="false" Priority="65" Name="Medium List 1"/> < w:LsdException Locked="false" Priority="66" Name="Medium List 2"/> < w:LsdException Locked="false" Priority="67" Name="Medium Grid 1"/> < w:LsdException Locked="false" Priority="68" Name="Medium Grid 2"/> < w:LsdException Locked="false" Priority="69" Name="Medium Grid 3"/> < w:LsdException Locked="false" Priority="70" Name="Dark List"/> < w:LsdException Locked="false" Priority="71" Name="Colorful Shading"/> < w:LsdException Locked="false" Priority="72" Name="Colorful List"/> < w:LsdException Locked="false" Priority="73" Name="Colorful Grid"/> < w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 1"/> < w:LsdException Locked="false" Priority="61" Name="Light List Accent 1"/> < w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 1"/> < w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 1"/> < w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 1"/> < w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 1"/> < w:LsdException Locked="false" SemiHidden="true" Name="Revision"/> < w:LsdException Locked="false" Priority="34" QFormat="true" Name="List Paragraph"/> < w:LsdException Locked="false" Priority="29" QFormat="true" Name="Quote"/> < w:LsdException Locked="false" Priority="30" QFormat="true" Name="Intense Quote"/> < w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 1"/> < w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 1"/> < w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 1"/> < w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 1"/> < w:LsdException Locked="false" Priority="70" Name="Dark List Accent 1"/> < w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 1"/> < w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 1"/> < w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 1"/> < w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 2"/> < w:LsdException Locked="false" Priority="61" Name="Light List Accent 2"/> < w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 2"/> < w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 2"/> < w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 2"/> < w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 2"/> < w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 2"/> < w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 2"/> < w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 2"/> < w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 2"/> < w:LsdException Locked="false" Priority="70" Name="Dark List Accent 2"/> < w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 2"/> < w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 2"/> < w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 2"/> < w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 3"/> < w:LsdException Locked="false" Priority="61" Name="Light List Accent 3"/> < w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 3"/> < w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 3"/> < w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 3"/> < w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 3"/> < w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 3"/> < w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 3"/> < w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 3"/> < w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 3"/> < w:LsdException Locked="false" Priority="70" Name="Dark List Accent 3"/> < w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 3"/> < w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 3"/> < w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 3"/> < w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 4"/> < w:LsdException Locked="false" Priority="61" Name="Light List Accent 4"/> < w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 4"/> < w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 4"/> < w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 4"/> < w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 4"/> < w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 4"/> < w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 4"/> < w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 4"/> < w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 4"/> < w:LsdException Locked="false" Priority="70" Name="Dark List Accent 4"/> < w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 4"/> < w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 4"/> < w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 4"/> < w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 5"/> < w:LsdException Locked="false" Priority="61" Name="Light List Accent 5"/> < w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 5"/> < w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 5"/> < w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 5"/> < w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 5"/> < w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 5"/> < w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 5"/> < w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 5"/> < w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 5"/> < w:LsdException Locked="false" Priority="70" Name="Dark List Accent 5"/> < w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 5"/> < w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 5"/> < w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 5"/> < w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 6"/> < w:LsdException Locked="false" Priority="61" Name="Light List Accent 6"/> < w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 6"/> < w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 6"/> < w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 6"/> < w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 6"/> < w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 6"/> < w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 6"/> < w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 6"/> < w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 6"/> < w:LsdException Locked="false" Priority="70" Name="Dark List Accent 6"/> < w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 6"/> < w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 6"/> < w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 6"/> < w:LsdException Locked="false" Priority="19" QFormat="true" Name="Subtle Emphasis"/> < w:LsdException Locked="false" Priority="21" QFormat="true" Name="Intense Emphasis"/> < w:LsdException Locked="false" Priority="31" QFormat="true" Name="Subtle Reference"/> < w:LsdException Locked="false" Priority="32" QFormat="true" Name="Intense Reference"/> < w:LsdException Locked="false" Priority="33" QFormat="true" Name="Book Title"/> < w:LsdException Locked="false" Priority="37" SemiHidden="true" UnhideWhenUsed="true" Name="Bibliography"/> < w:LsdException Locked="false" Priority="39" SemiHidden="true" UnhideWhenUsed="true" QFormat="true" Name="TOC Heading"/> < w:LsdException Locked="false" Priority="41" Name="Plain Table 1"/> < w:LsdException Locked="false" Priority="42" Name="Plain Table 2"/> < w:LsdException Locked="false" Priority="43" Name="Plain Table 3"/> < w:LsdException Locked="false" Priority="44" Name="Plain Table 4"/> < w:LsdException Locked="false" Priority="45" Name="Plain Table 5"/> < w:LsdException Locked="false" Priority="40" Name="Grid Table Light"/> < w:LsdException Locked="false" Priority="46" Name="Grid Table 1 Light"/> < w:LsdException Locked="false" Priority="47" Name="Grid Table 2"/> < w:LsdException Locked="false" Priority="48" Name="Grid Table 3"/> < w:LsdException Locked="false" Priority="49" Name="Grid Table 4"/> < w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark"/> < w:LsdException Locked="false" Priority="51" Name="Grid Table 6 Colorful"/> < w:LsdException Locked="false" Priority="52" Name="Grid Table 7 Colorful"/> < w:LsdException Locked="false" Priority="46" Name="Grid Table 1 Light Accent 1"/> < w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 1"/> < w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 1"/> < w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 1"/> < w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 1"/> < w:LsdException Locked="false" Priority="51" Name="Grid Table 6 Colorful Accent 1"/> < w:LsdException Locked="false" Priority="52" Name="Grid Table 7 Colorful Accent 1"/> < w:LsdException Locked="false" Priority="46" Name="Grid Table 1 Light Accent 2"/> < w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 2"/> < w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 2"/> < w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 2"/> < w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 2"/> < w:LsdException Locked="false" Priority="51" Name="Grid Table 6 Colorful Accent 2"/> < w:LsdException Locked="false" Priority="52" Name="Grid Table 7 Colorful Accent 2"/> < w:LsdException Locked="false" Priority="46" Name="Grid Table 1 Light Accent 3"/> < w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 3"/> < w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 3"/> < w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 3"/> < w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 3"/> < w:LsdException Locked="false" Priority="51" Name="Grid Table 6 Colorful Accent 3"/> < w:LsdException Locked="false" Priority="52" Name="Grid Table 7 Colorful Accent 3"/> < w:LsdException Locked="false" Priority="46" Name="Grid Table 1 Light Accent 4"/> < w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 4"/> < w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 4"/> < w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 4"/> < w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 4"/> < w:LsdException Locked="false" Priority="51" Name="Grid Table 6 Colorful Accent 4"/> < w:LsdException Locked="false" Priority="52" Name="Grid Table 7 Colorful Accent 4"/> < w:LsdException Locked="false" Priority="46" Name="Grid Table 1 Light Accent 5"/> < w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 5"/> < w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 5"/> < w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 5"/> < w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 5"/> < w:LsdException Locked="false" Priority="51" Name="Grid Table 6 Colorful Accent 5"/> < w:LsdException Locked="false" Priority="52" Name="Grid Table 7 Colorful Accent 5"/> < w:LsdException Locked="false" Priority="46" Name="Grid Table 1 Light Accent 6"/> < w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 6"/> < w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 6"/> < w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 6"/> < w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 6"/> < w:LsdException Locked="false" Priority="51" Name="Grid Table 6 Colorful Accent 6"/> < w:LsdException Locked="false" Priority="52" Name="Grid Table 7 Colorful Accent 6"/> < w:LsdException Locked="false" Priority="46" Name="List Table 1 Light"/> < w:LsdException Locked="false" Priority="47" Name="List Table 2"/> < w:LsdException Locked="false" Priority="48" Name="List Table 3"/> < w:LsdException Locked="false" Priority="49" Name="List Table 4"/> < w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark"/> < w:LsdException Locked="false" Priority="51" Name="List Table 6 Colorful"/> < w:LsdException Locked="false" Priority="52" Name="List Table 7 Colorful"/> < w:LsdException Locked="false" Priority="46" Name="List Table 1 Light Accent 1"/> < w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 1"/> < w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 1"/> < w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 1"/> < w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 1"/> < w:LsdException Locked="false" Priority="51" Name="List Table 6 Colorful Accent 1"/> < w:LsdException Locked="false" Priority="52" Name="List Table 7 Colorful Accent 1"/> < w:LsdException Locked="false" Priority="46" Name="List Table 1 Light Accent 2"/> < w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 2"/> < w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 2"/> < w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 2"/> < w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 2"/> < w:LsdException Locked="false" Priority="51" Name="List Table 6 Colorful Accent 2"/> < w:LsdException Locked="false" Priority="52" Name="List Table 7 Colorful Accent 2"/> < w:LsdException Locked="false" Priority="46" Name="List Table 1 Light Accent 3"/> < w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 3"/> < w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 3"/> < w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 3"/> < w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 3"/> < w:LsdException Locked="false" Priority="51" Name="List Table 6 Colorful Accent 3"/> < w:LsdException Locked="false" Priority="52" Name="List Table 7 Colorful Accent 3"/> < w:LsdException Locked="false" Priority="46" Name="List Table 1 Light Accent 4"/> < w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 4"/> < w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 4"/> < w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 4"/> < w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 4"/> < w:LsdException Locked="false" Priority="51" Name="List Table 6 Colorful Accent 4"/> < w:LsdException Locked="false" Priority="52" Name="List Table 7 Colorful Accent 4"/> < w:LsdException Locked="false" Priority="46" Name="List Table 1 Light Accent 5"/> < w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 5"/> < w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 5"/> < w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 5"/> < w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 5"/> < w:LsdException Locked="false" Priority="51" Name="List Table 6 Colorful Accent 5"/> < w:LsdException Locked="false" Priority="52" Name="List Table 7 Colorful Accent 5"/> < w:LsdException Locked="false" Priority="46" Name="List Table 1 Light Accent 6"/> < w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 6"/> < w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 6"/> < w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 6"/> < w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 6"/> < w:LsdException Locked="false" Priority="51" Name="List Table 6 Colorful Accent 6"/> < w:LsdException Locked="false" Priority="52" Name="List Table 7 Colorful Accent 6"/> < ![endif]-->< !--[if gte mso 10]>< ![endif]-->I’m happy to announce my first R package ‘TOSTER’ for equivalence tests (but don’t worry, there is an old-fashioned spreadsheet as well).
In an earlier blog post I talked about equivalence tests. Sometimes you perform a study where you might expect the effect is zero or very small. So how can we conclude an effect is ‘zero or very small’? One approach is to specify effect sizes we consider ‘not small’. For example, we might decide that effects larger than d = 0.3 (or smaller than d = -0.3 in a two-sided t-test), are ‘not small’. Now, if we observe an effect that falls between the two equivalence bounds of d = -0.3 and d = 0.3 we can act (in good old-fashioned Neyman-Pearson approach to statistical inferences) as if the effect is ‘zero or very small’. It might not be exactly zero, but it is small enough. You can check out a great interactive visualization of equivalence testing by RPsychologist.
We can use two one-sided tests to statistically reject effects ≤-0.3, and ≥ 0.3. This is the basic idea of the TOST (two one-sided tests) equivalence procedure. The idea is simple, and it is conceptually similar to the traditional null-hypothesis test you probably use in your article to reject an effect of zero. But where all statistics programs will allow you to perform a normal t-test, it is not yet that easy to perform a TOST equivalence test (Minitab is one exception).
But psychology really needs a way to show effects are too small to matter (see ‘Why most findings in psychology are statistically unfalsifiable’ by Richard Morey and me). So I made a spreadsheet and R package to perform the TOST procedure. The R package is available from CRAN, which means you can install it using install.packages(“TOSTER”).
Let’s try a practical example (this is one of the examples from the vignette that comes with the R package).
Eskine (2013) showed that participants who had been exposed to organic food were substantially harsher in their moral judgments relative to those in the control condition (Cohen’s d = 0.81, 95% CI: [0.19, 1.45]). A replication by Moery & Calin-Jageman (2016, Study 2) did not observe a significant effect (Control: n = 95, M = 5.25, SD = 0.95, Organic Food: n = 89, M = 5.22, SD = 0.83). The authors have used Simonsohn’s recommendation to power their study so that they have 80% power to detect an effect the original study had 33% power to detect. This is the same as saying: We consider an effect to be ‘small’ when it is smaller than the effect size the original study had 33% power to detect.
With n = 21 in each condition, Eskine (2013) had 33% to detect an effect of d = 0.48. This is the effect the authors of the replication study designed their study to detect. The original study had shown an effect of d = 0.81, and the authors performing the replication decided that an effect size of d = 0.48 would be the smallest effect size they will aim to detect with 80% power. So we can use this effect size as the equivalence bound. We can use R to perform an equivalence test:
install.packages(“TOSTER”)
library(“TOSTER”)
TOSTtwo(m1=5.25, m2=5.22, sd1=0.95, sd2=0.83, n1=95, n2=89, low_eqbound_d=-0.43, high_eqbound_d=0.43, alpha = 0.05)
Which gives us the following output:
Using alpha = 0.05 Student’s t-test was non-significant, t(182) = 0.2274761, p = 0.8203089
Using alpha = 0.05 the equivalence test based on Student’s t-test was significant, t(182) = -3.026311, p = 0.001417168
TOST results:
t-value 1 p-value 1 t-value 2 p-value 2 df
1 3.481263 0.0003123764 -3.026311 0.001417168 182
1 3.481263 0.0003123764 -3.026311 0.001417168 182
Equivalence bounds (Cohen’s d):
low bound d high bound d
1 -0.48 0.48
Equivalence bounds (raw scores):
low bound raw high bound raw
1 -0.4291159 0.4291159
TOST confidence interval:
Lower Limit 90% CI raw Upper Limit 90% CI raw
1 -0.1880364 0.2480364
You see, we are just using R like a fancy calculator, entering all the numbers in a single function. But I can understand if you are a bit intimidated by R. So, you can also fill in the same info in the spreadsheet (click picture to zoom):
Using a TOST equivalence procedure with alpha = 0.05, and without assuming equal variances (because when sample sizes are unequal, you should report Welch’s t-test by default), we can reject effects larger than d = 0.48: t(182) = -3.03, p = 0.001.
The R package also gives a graph, where you see the observed mean difference (in raw scale units), the equivalence bounds (also in raw scores), and the 90% and 95% CI. If the 90% CI does not include the equivalence bounds, we can declare equivalence.
Moery and Calin-Jageman concluded from this study: “We again found that food exposure has little to no effect on moral judgments” But what is ‘little to no”? The equivalence test tells us the authors successfully rejected effects of a size the original study had 33% power to reject. Instead of saying ‘little to no’ we can put a number on the effect size we have rejected by performing an equivalence test.
If you want to read more about equivalence tests, including how to perform them for one-sample t-tests, dependent t-tests, correlations, or meta-analyses, you can check out a practical primer on equivalence testing using the TOST procedure I’ve written. It’s available as a pre-print on PsyArXiv. The R code is available on GitHub.
To leave a comment for the author, please follow the link and comment on their blog: The 20% Statistician.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.