Package clust.bin.pair

Similar documents
Package ega. March 21, 2017

Package pollen. October 7, 2018

Package CompareTests

Package inctools. January 3, 2018

Package nopaco. R topics documented: April 13, Type Package Title Non-Parametric Concordance Coefficient Version 1.0.

Package ICCbin. November 14, 2017

Package appnn. R topics documented: July 12, 2015

Package MSstatsTMT. February 26, Title Protein Significance Analysis in shotgun mass spectrometry-based

Package AbsFilterGSEA

Package wally. May 25, Type Package

Package hei. August 17, 2017

Package PELVIS. R topics documented: December 18, Type Package

Package preference. May 8, 2018

Package memapp. R topics documented: June 2, Version 2.10 Date

Package singlecase. April 19, 2009

Package medicalrisk. August 29, 2016

Package citccmst. February 19, 2015

Package ORIClust. February 19, 2015

Package inote. June 8, 2017

Package tumgr. February 4, 2016

Package propoverlap. R topics documented: February 20, Type Package

Package speff2trial. February 20, 2015

Package longroc. November 20, 2017

Package RNAsmc. December 11, 2018

Package sbpiper. April 20, 2018

Package p3state.msm. R topics documented: February 20, 2015

Package rvtdt. February 20, rvtdt... 1 rvtdt.example... 3 rvtdts... 3 TrendWeights Index 6. population control weighted rare-varaints TDT

Package mdsdt. March 12, 2016

Package asymptest. May 10, 2018

Package frailtyhl. February 19, 2015

Package xseq. R topics documented: September 11, 2015

Package ExactCIdiff. February 15, 2013

Package GANPAdata. February 19, 2015

Package QualInt. February 19, 2015

Package HAP.ROR. R topics documented: February 19, 2015

Package ncar. July 20, 2018

Package ordibreadth. R topics documented: December 4, Type Package Title Ordinated Diet Breadth Version 1.0 Date Author James Fordyce

Package labstats. December 5, 2016

Package AIMS. June 29, 2018

ivlewbel: Uses heteroscedasticity to estimate mismeasured and endogenous regressor models

Package SAMURAI. February 19, 2015

Package BCRA. April 25, 2018

Package MethPed. September 1, 2018

Package Actigraphy. R topics documented: January 15, Type Package Title Actigraphy Data Analysis Version 1.3.

Package bionetdata. R topics documented: February 19, Type Package Title Biological and chemical data networks Version 1.0.

Package StepReg. November 3, 2017

Package prognosticroc

Package TEQR. R topics documented: February 5, Version Date Title Target Equivalence Range Design Author M.

Naïve Bayes classification in R

Package ClusteredMutations

Package seqcombo. R topics documented: March 10, 2019

Binary Diagnostic Tests Two Independent Samples

Package TFEA.ChIP. R topics documented: January 28, 2018

Package bgafun. R topics documented: August 12, Type Package

Package influence.me

Identifying or Verifying the Number of Factors to Extract using Very Simple Structure.

Package cssam. February 19, 2015

Package xmeta. August 16, 2017

Intro to SPSS. Using SPSS through WebFAS

Package DeconRNASeq. November 19, 2017

Package CLL. April 19, 2018

The FunCluster Package

Binary Diagnostic Tests Paired Samples

Package Fahrmeir. May 31, 2016

Package CorMut. August 2, 2013

Contingency Tables Summer 2017 Summer Institutes 187

Package CorMut. January 21, 2019

Package Interpol. R topics documented: February 19, Type Package. Title Interpolation of amino acid sequences. Version

bivariate analysis: The statistical analysis of the relationship between two variables.

Package mem. R topics documented: October 23, Type Package Title The Moving Epidemic Method Version 2.11 Date Depends R (>= 3.4.

Package NarrowPeaks. August 3, Version Date Type Package

Package seqdesign. April 27, Version 1.1 Date

Package LipidMS. July 12, 2018

EVALUATION AND COMPUTATION OF DIAGNOSTIC TESTS: A SIMPLE ALTERNATIVE

Package mediation. September 18, 2009

Package msgbsr. January 17, 2019

(true) Disease Condition Test + Total + a. a + b True Positive False Positive c. c + d False Negative True Negative Total a + c b + d a + b + c + d

Package biocancer. August 29, 2018

Package CopulaREMADA

Package cancer. July 10, 2018

1 Version SP.A Investigate patterns of association in bivariate data

Linear Regression in SAS

Package noia. February 20, 2015

Unit 1 Exploring and Understanding Data

Bayes Factors for t tests and one way Analysis of Variance; in R

The Research Roadmap Checklist

Package CTT. February 4, 2018

Package metaseq. R topics documented: November 1, Type Package. Title Meta-analysis of RNA-Seq count data in multiple studies. Version 1.1.

TEST # 1. Before starting the test, please print your name and ID number at the top left-hand corner of this page only.

Appendix B. Nodulus Observer XT Instructional Guide. 1. Setting up your project p. 2. a. Observation p. 2. b. Subjects, behaviors and coding p.

Quantitative Analysis of the Elements of Interpersonal Trust of Poles

R documentation. of GSCA/man/GSCA-package.Rd etc. June 8, GSCA-package. LungCancer metadi... 3 plotmnw... 5 plotnw... 6 singledc...

Lecture 21. RNA-seq: Advanced analysis


Classification of Mammograms using Gray-level Co-occurrence Matrix and Support Vector Machine Classifier

Package CopulaREMADA

A review of statistical methods in the analysis of data arising from observer reliability studies (Part 11) *

BMI 541/699 Lecture 16

Lab 4: Alpha and Kappa. Today s Activities. Reliability. Consider Alpha Consider Kappa Homework and Media Write-Up

Transcription:

Package clust.bin.pair February 15, 2018 Title Statistical Methods for Analyzing Clustered Matched Pair Data Version 0.1.2 Tests, utilities, and case studies for analyzing significance in clustered binary matched-pair data. The central function clust.bin.pair uses one of several tests to calculate a Chi-square statistic. Implemented are the tests Eliasziw (1991) <doi:10.1002/sim.4780101211>, Obuchowski (1998) <doi:10.1002/(sici)1097-0258(19980715)17:13%3c1495::aid-sim863%3e3.0.co;2-i>, Durkalski (2003) <doi:10.1002/sim.1438>, and Yang (2010) <doi:10.1002/bimj.201000035> with McNemar (1947) <doi:10.1007/bf02295996> included for comparison. The utility functions nested.to.contingency and paired.to.contingency convert data between various useful formats. Thyroids and psychiatry are the canonical datasets from Obuchowski and Petryshen (1989) <doi:10.1016/0165-1781(89)90196-0> respectively. Depends R (>= 3.2.4) License MIT + file LICENSE Encoding UTF-8 LazyData true URL https://github.com/dgopstein/clust.bin.pair BugReports https://github.com/dgopstein/clust.bin.pair/issues Imports Suggests testthat RoxygenNote 5.0.1 NeedsCompilation no Author Dan Gopstein [aut, cre] Maintainer Dan Gopstein <dan@gopstein.com> Repository CRAN Date/Publication 2018-02-15 17:44:57 UTC 1

2 clust.bin.pair R topics documented: clust.bin.pair........................................ 2 nested.to.contingency.................................... 3 obfuscation......................................... 4 paired.to.contingency.................................... 5 psychiatry.......................................... 5 thyroids........................................... 6 Index 8 clust.bin.pair Statistical test for clustered binary matched pair data A single interface for several adjustments to the mcnemar test for marginal homogeneity that correct for clustered data. clust.bin.pair(ak, bk, ck, dk, method = "yang") Arguments ak bk ck dk method vector containing counts per group of Success/Success results. vector containing counts per group of Success/Failure results. vector containing counts per group of Failure/Success results. vector containing counts per group of Failure/Failure results. a character string specifying the method to calculate the statistic. Must be one of "yang" (default), "durkalski", "obuchowski", "eliasziw". A value of "mcnemar" can also be supplied for comparison. Value A list with class "htest" containing the following components: statistic p.value method data.name the value of the test statistic. the p-value for the test. the type of test applied. a character string giving the names of the data.

nested.to.contingency 3 References McNemar, Q. (1947). Note on the sampling error of the difference between correlated proportions or percentages. Psychometrika, 12(2), 153-157. Eliasziw, M., & Donner, A. (1991). Application of the McNemar test to non-independent matched pair data. Statistics in medicine, 10(12), 1981-1991. Obuchowski, N. A. (1998). On the comparison of correlated proportions for clustered data. Statistics in medicine, 17(13), 1495-1507. Durkalski, V. L., Palesch, Y. Y., Lipsitz, S. R., & Rust, P. F. (2003). Analysis of clustered matchedpair data. Statistics in medicine, 22(15), 2417-2428. Yang, Z., Sun, X., & Hardin, J. W. (2010). A note on the tests for clustered matched-pair binary data. Biometrical journal, 52(5), 638-652. with(psychiatry, clust.bin.pair(ah, bh, ch, dh, method="eliasziw")) tc <- nested.to.contingency(thyroids$x.pet, thyroids$x.spect) clust.bin.pair(tc$ak, tc$bk, tc$ck, tc$dk, method="obuchowski") oc <- with(obfuscation, paired.to.contingency(group = list(subject, atom), t1 = control, t2 = treatment)) clust.bin.pair(oc$ak, oc$bk, oc$ck, oc$dk, method="durkalski") nested.to.contingency Convert between nested results and the canonical contingency tables Sum all concordant and discordant pairs from each nested group into a contingency table. nested.to.contingency(t1, t2) Arguments t1 t2 lists of pre-treatment measures lists of post-treatment measures Value Contingency tables represented in the rows of a matrix

4 obfuscation nested.to.contingency(thyroids$x.pet, thyroids$x.spect) obfuscation Obfuscated C code misinterpretation data Data from Gopstein et. al. s experiment on the misinterpretation of C code. Subjects were asked to hand evaluate pairs of functionally equivalent code. Half of the questions were intentionally obfuscated to elicit confusion. data(obfuscation) Format A data frame with 57 rows and 4 variables: subject the ID of the study participant atom the type of obfuscation being evaluated control whether the subject answered the un-obfuscated question correctly treatment whether the subject answered the obfuscated question correctly Source Atoms of Confusion data(obfuscation) oc <- paired.to.contingency(group = obfuscation[,c("subject", "atom")], t1 = obfuscation$control, t2 = obfuscation$treatment) clust.bin.pair(oc$ak, oc$bk, oc$ck, oc$dk, method="durkalski")

paired.to.contingency 5 paired.to.contingency Convert between paired results and the canonical contingency tables Group results by common clustering then tally the concordant and discordant pairs. paired.to.contingency(group, t1, t2) Arguments group t1 t2 List of grouping values pre-treatment measures post-treatment measures Value Contingency tables represented in the rows of a matrix paired.to.contingency(list(obfuscation$subject, obfuscation$atom), obfuscation$control, obfuscation$treatment) psychiatry Psychiatrist and patient disagreement data Psychiatrists and their patients were surveyed in pairs regarding patient concerns and treatment. Each psychiatrist was asked whether each question item was relevant to their patient and each of their patients were asked the same. The data can be evaluated to answer the question of whether there was patient/doctor agreement in each item. The sample was 29 psychiatrists, each with 1-8 patients, for a total of N = 135 matched pairs. data(psychiatry)

6 thyroids Format A data frame with 29 rows and 7 variables: psychiatrist the ID of the psychiatrist Nh the number of the psychiatrist s patients participating in the experiment ah both participants answered 1 bh patient answered 1, psychiatrist answered 0 ch patient answered 0, psychiatrist answered 1 dh both participants answered 0 Wh Normalized difference: (bh - ch) / Nh Source Donner, A., & Petryshen, P. (1989). The statistical analysis of matched data in psychiatric research. Psychiatry research, 28(1), 41-46. References Eliasziw, M., & Donner, A. (1991). Application of the McNemar test to non-independent matched pair data. Statistics in medicine, 10(12), 1981-1991. data(psychiatry) psychiatry$wh == round((psychiatry$bh - psychiatry$ch) / psychiatry$nh, 2) clust.bin.pair(psychiatry$ah, psychiatry$bh, psychiatry$ch, psychiatry$dh, method="eliasziw") thyroids PET and SPECT data for diagnosing hyperparathyroidism Following surgery which confirmed the absence of hyperparathyroidism two diagnostic tests, PET and SPECT, were performed. Their measures of true negatives and false positives are reported. Data reported in Obuchowki 1998. data(thyroids)

thyroids 7 Format Source A data frame with 21 rows and 6 variables: patient ID of the patient n.glands number of glands tested from the patient n.pet number of true negatives from the PET test x.pet individual results per gland from the PET test n.spect number of true negatives from the SPECT test x.spect individual results per gland from the SPECT test Obuchowski, N. A. (1998). On the comparison of correlated proportions for clustered data. Statistics in medicine, 17(13), 1495-1507. data(thyroids) thyroids$n.glands == sapply(thyroids$x.pet, length) thyroids$n.glands == sapply(thyroids$x.spect, length) thyroids$n.pet == sapply(thyroids$x.pet, function(x) length(which(x == 1))) thyroids$n.spect == sapply(thyroids$x.spect, function(x) length(which(x == 1))) tc <- nested.to.contingency(thyroids$x.pet, thyroids$x.spect) clust.bin.pair(tc[,'ak'], tc[,'bk'], tc[,'ck'], tc[,'dk'], method="obuchowski") do.call(clust.bin.pair, data.frame(tc))

Index Topic datasets obfuscation, 4 psychiatry, 5 thyroids, 6 clust.bin.pair, 2 nested.to.contingency, 3 obfuscation, 4 paired.to.contingency, 5 psychiatry, 5 thyroids, 6 8