articleID <- "EXT_19-1-2016" # insert the article ID code here e.g., "10-3-2015_PS"
reportType <- 'pilot' # specify whether this is the 'pilot' report or 'final' report
pilotNames <- "Sakaria Auelua-Toomey" # insert the pilot's name here e.g., "Tom Hardwicke". If there are multiple cpilots enter both names in a character string e.g., "Tom Hardwicke, Bob Dylan"
copilotNames <- NA # # insert the co-pilot's name here e.g., "Michael Frank". If there are multiple co-pilots enter both names in a character string e.g., "Tom Hardwicke, Bob Dylan"
pilotTTC <- '120' # insert the pilot's estimated time to complete (in minutes, fine to approximate) e.g., 120
copilotTTC <- NA # insert the co-pilot's estimated time to complete (in minutes, fine to approximate) e.g., 120
pilotStartDate <- as.Date("11/03/18", format = "%m/%d/%y") # insert the pilot's start date in US format e.g., as.Date("01/25/18", format = "%m/%d/%y")
copilotStartDate <- NA # insert the co-pilot's start date in US format e.g., as.Date("01/25/18", format = "%m/%d/%y")
completionDate <- as.Date("11/04/18", format = "%m/%d/%y") # copilot insert the date of final report completion (after any necessary rounds of author assistance) in US format e.g., as.Date("01/25/18", format = "%m/%d/%y")
84 participants were recruited through MTurk and paid $1 each for their participation. (44 Women, 40 men; mean age = 33.23 years, SD = 12.17)
Participants had to be 18 or older, had to reside in the US, and had to be native English speakers.
Participants were given a hypothetical resource-distribution negoation situation adapted from Kuhlman and Marshello (1975) with a hypothetical other person.
Participants were asked to either choose “Option A/Agreement” or “OptionB/Impasse”
Framed Conditions framed the reposnses as Agreement and Impasse.
Control Condition framed the responses as Option A and Option B.
Response frequencies for OptionA/Agreement and OptionB/Impasse were measured.
EXT_19-1-2016
For this article you should focus on the findings reported in the results section for Study 1a.
Specifically, you should attempt to reproduce all descriptive and inferential analyses reported in the text below and associated tables/figures:
We calculated the average response score for the allocation decisions for each participant and found that those in the control condition selected the personally disadvantageous option (i.e., “Option A”) 33.88% of the time (SD = 31%), while those in the framed condition selected this option (i.e., “Agreement”) 47.90% of the time (SD = 33%). This difference was statistically significant, t(82) = 2.00, p = .049.3 As predicted, we found that the lower individual point allocation was selected more often when it was labeled “Agreement” rather than “Option A” (see Fig. 1).
Note Make sure to use the original article for additional context and information about any necessary pre-processing steps. Also check for additional supplementary materials that may provide supporting documentation for analysis procedures.
# load packages
library(tidyverse) # for data munging
library(knitr) # for kable table formating
library(haven) # import and export 'SPSS', 'Stata' and 'SAS' Files
library(readxl) # import excel files
library(CARPSreports) # custom report functions
# Prepare report object. This will be updated automatically by the reproCheck function each time values are compared
reportObject <- data.frame(dummyRow = TRUE, reportedValue = NA, obtainedValue = NA, valueType = NA, percentageError = NA, comparisonOutcome = NA, eyeballCheck = NA)
setwd("C:/Users/sakar/Desktop/CARPS_EXT_19-1-2016/data")
study1a_raw_df <- read_spss("Study\ 1a\ Fixed\ Pie.sav")
View(study1a_raw_df)
#no tidying was required
#one participant had a missing response in cq5 column. But this dataset was not used for the reproduced analysis.
clean_df <- study1a_raw_df %>%
filter(!is.na(cq5))
control_df <- study1a_raw_df %>%
filter(condition == "Control")
#subtracting by 1 to get the reported option A means
controlMean <- 1 -mean(control_df$cqmean_A)
controlSD <- sd(control_df$cqmean_A)
experiment_df <- study1a_raw_df %>%
filter(condition == "Agreement")
experimentMean <- 1 - mean(experiment_df$cqmean_A)
experimentSD <- sd(experiment_df$cqmean_A)
print(controlMean)
## [1] 0.3387534
print(controlSD)
## [1] 0.308272
print(experimentMean)
## [1] 0.4790052
print(experimentSD)
## [1] 0.3325521
reportObject <- reproCheck(reportedValue = '.3388', obtainedValue = controlMean, valueType = 'mean')
## [1] "MATCH for mean. The reported value (0.3388) and the obtained value (0.3388) differed by 0%. Note that the obtained value was rounded to 4 decimal places to match the reported value."
reportObject <- reproCheck(reportedValue = '.31', obtainedValue = controlSD, valueType = 'sd')
## [1] "MATCH for sd. The reported value (0.31) and the obtained value (0.31) differed by 0%. Note that the obtained value was rounded to 2 decimal places to match the reported value."
reportObject <- reproCheck(reportedValue = '.479', obtainedValue = experimentMean, valueType = 'mean')
## [1] "MATCH for mean. The reported value (0.479) and the obtained value (0.479) differed by 0%. Note that the obtained value was rounded to 3 decimal places to match the reported value."
reportObject <- reproCheck(reportedValue = '.33', obtainedValue = experimentSD, valueType = 'sd')
## [1] "MATCH for sd. The reported value (0.33) and the obtained value (0.33) differed by 0%. Note that the obtained value was rounded to 2 decimal places to match the reported value."
t.test(control_df$cqmean_A, experiment_df$cqmean_A)
##
## Welch Two Sample t-test
##
## data: control_df$cqmean_A and experiment_df$cqmean_A
## t = 2.0057, df = 81.938, p-value = 0.04819
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 0.001143956 0.279359597
## sample estimates:
## mean of x mean of y
## 0.6612466 0.5209948
obtainedt <- 2.0057
obtainedp <- 0.04819
reportObject <- reproCheck(reportedValue = '2', obtainedValue = obtainedt, valueType = 't')
## [1] "MATCH for t. The reported value (2) and the obtained value (2) differed by 0%. Note that the obtained value was rounded to 0 decimal places to match the reported value."
reportObject <- reproCheck(reportedValue = '.049', obtainedValue = obtainedp, valueType = 'p')
## [1] "MINOR_ERROR for p. The reported value (0.049) and the obtained value (0.048) differed by 2.04%. Note that the obtained value was rounded to 3 decimal places to match the reported value."
There was only a minor rounding error in the reported p value of the t-test. There was also 1 NA response that was included in the analysis in column cq5.
Author_Assistance = FALSE # was author assistance provided? (if so, enter TRUE)
Insufficient_Information_Errors <- 0 # how many discrete insufficient information issues did you encounter?
# Assess the causal locus (discrete reproducibility issues) of any reproducibility errors. Note that there doesn't necessarily have to be a one-to-one correspondance between discrete reproducibility issues and reproducibility errors. For example, it could be that the original article neglects to mention that a Greenhouse-Geisser correct was applied to ANOVA outcomes. This might result in multiple reproducibility errors, but there is a single causal locus (discrete reproducibility issue).
locus_typo <- NA # how many discrete issues did you encounter that related to typographical errors?
locus_specification <- NA # how many discrete issues did you encounter that related to incomplete, incorrect, or unclear specification of the original analyses?
locus_analysis <- NA # how many discrete issues did you encounter that related to errors in the authors' original analyses?
locus_data <- NA # how many discrete issues did you encounter that related to errors in the data files shared by the authors?
locus_unidentified <- NA # how many discrete issues were there for which you could not identify the cause
# How many of the above issues were resolved through author assistance?
locus_typo_resolved <- NA # how many discrete issues did you encounter that related to typographical errors?
locus_specification_resolved <- NA # how many discrete issues did you encounter that related to incomplete, incorrect, or unclear specification of the original analyses?
locus_analysis_resolved <- NA # how many discrete issues did you encounter that related to errors in the authors' original analyses?
locus_data_resolved <- NA # how many discrete issues did you encounter that related to errors in the data files shared by the authors?
locus_unidentified_resolved <- NA # how many discrete issues were there for which you could not identify the cause
Affects_Conclusion <- NA # Do any reproducibility issues encounter appear to affect the conclusions made in the original article? TRUE, FALSE, or NA. This is a subjective judgement, but you should taking into account multiple factors, such as the presence/absence of decision errors, the number of target outcomes that could not be reproduced, the type of outcomes that could or could not be reproduced, the difference in magnitude of effect sizes, and the predictions of the specific hypothesis under scrutiny.
reportObject <- reportObject %>%
filter(dummyRow == FALSE) %>% # remove the dummy row
select(-dummyRow) %>% # remove dummy row designation
mutate(articleID = articleID) %>% # add variables to report
select(articleID, everything()) # make articleID first column
# decide on final outcome
if(any(reportObject$comparisonOutcome %in% c("MAJOR_ERROR", "DECISION_ERROR")) | Insufficient_Information_Errors > 0){
finalOutcome <- "Failure without author assistance"
if(Author_Assistance == T){
finalOutcome <- "Failure despite author assistance"
}
}else{
finalOutcome <- "Success without author assistance"
if(Author_Assistance == T){
finalOutcome <- "Success with author assistance"
}
}
# collate report extra details
reportExtras <- data.frame(articleID, pilotNames, copilotNames, pilotTTC, copilotTTC, pilotStartDate, copilotStartDate, completionDate, Author_Assistance, finalOutcome, Insufficient_Information_Errors, locus_typo, locus_specification, locus_analysis, locus_data, locus_unidentified, locus_typo_resolved, locus_specification_resolved, locus_analysis_resolved, locus_data_resolved, locus_unidentified_resolved)
# save report objects
if(reportType == "pilot"){
write_csv(reportObject, "pilotReportDetailed.csv")
write_csv(reportExtras, "pilotReportExtras.csv")
}
if(reportType == "final"){
write_csv(reportObject, "finalReportDetailed.csv")
write_csv(reportExtras, "finalReportExtras.csv")
}
devtools::session_info()
## - Session info ----------------------------------------------------------
## setting value
## version R version 3.4.1 (2017-06-30)
## os Windows 10 x64
## system x86_64, mingw32
## ui RTerm
## language (EN)
## collate English_United States.1252
## ctype English_United States.1252
## tz America/Los_Angeles
## date 2018-11-05
##
## - Packages --------------------------------------------------------------
## package * version date lib
## assertthat 0.2.0 2017-04-11 [1]
## backports 1.1.2 2017-12-13 [1]
## base64enc 0.1-3 2015-07-28 [1]
## bindr 0.1.1 2018-03-13 [1]
## bindrcpp * 0.2.2 2018-03-29 [1]
## broom 0.5.0 2018-07-17 [1]
## callr 3.0.0 2018-08-24 [1]
## CARPSreports * 0.1 2018-11-05 [1]
## cellranger 1.1.0 2016-07-27 [1]
## cli 1.0.1 2018-09-25 [1]
## colorspace 1.3-2 2016-12-14 [1]
## crayon 1.3.4 2017-09-16 [1]
## desc 1.2.0 2018-05-01 [1]
## devtools 2.0.1 2018-10-26 [1]
## digest 0.6.18 2018-10-10 [1]
## dplyr * 0.7.6 2018-06-29 [1]
## evaluate 0.11 2018-07-17 [1]
## forcats * 0.3.0 2018-02-19 [1]
## fs 1.2.6 2018-08-23 [1]
## ggplot2 * 3.0.0 2018-07-03 [1]
## glue 1.3.0 2018-07-17 [1]
## gtable 0.2.0 2016-02-26 [1]
## haven * 1.1.2 2018-06-27 [1]
## hms 0.4.2 2018-03-10 [1]
## htmltools 0.3.6 2017-04-28 [1]
## httr 1.3.1 2017-08-20 [1]
## jsonlite 1.5 2017-06-01 [1]
## knitr * 1.20 2018-02-20 [1]
## lattice 0.20-35 2017-03-25 [2]
## lazyeval 0.2.1 2017-10-29 [1]
## lubridate 1.7.4 2018-04-11 [1]
## magrittr 1.5 2014-11-22 [1]
## memoise 1.1.0 2017-04-21 [1]
## modelr 0.1.2 2018-05-11 [1]
## munsell 0.5.0 2018-06-12 [1]
## nlme 3.1-131 2017-02-06 [2]
## pillar 1.3.0 2018-07-14 [1]
## pkgbuild 1.0.2 2018-10-16 [1]
## pkgconfig 2.0.2 2018-08-16 [1]
## pkgload 1.0.2 2018-10-29 [1]
## plyr 1.8.4 2016-06-08 [1]
## prettyunits 1.0.2 2015-07-13 [1]
## processx 3.2.0 2018-08-16 [1]
## ps 1.1.0 2018-08-10 [1]
## purrr * 0.2.5 2018-05-29 [1]
## R6 2.2.2 2017-06-17 [1]
## Rcpp 0.12.18 2018-07-23 [1]
## readr * 1.1.1 2017-05-16 [1]
## readxl * 1.1.0 2018-04-20 [1]
## remotes 2.0.2 2018-10-30 [1]
## rlang 0.2.2 2018-08-16 [1]
## rmarkdown 1.10 2018-06-11 [1]
## rprojroot 1.3-2 2018-01-03 [1]
## rstudioapi 0.7 2017-09-07 [1]
## rvest 0.3.2 2016-06-17 [1]
## scales 1.0.0 2018-08-09 [1]
## sessioninfo 1.1.0 2018-09-25 [1]
## stringi 1.1.7 2018-03-12 [1]
## stringr * 1.3.1 2018-05-10 [1]
## tibble * 1.4.2 2018-01-22 [1]
## tidyr * 0.8.1 2018-05-18 [1]
## tidyselect 0.2.4 2018-02-26 [1]
## tidyverse * 1.2.1 2017-11-14 [1]
## usethis 1.4.0 2018-08-14 [1]
## withr 2.1.2 2018-03-15 [1]
## xml2 1.2.0 2018-01-24 [1]
## yaml 2.2.0 2018-07-25 [1]
## source
## CRAN (R 3.4.4)
## CRAN (R 3.4.3)
## CRAN (R 3.4.1)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## Github (METRICS-CARPS/CARPSreports@89db4a9)
## CRAN (R 3.4.4)
## CRAN (R 3.4.1)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.1)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.1)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
## CRAN (R 3.4.4)
##
## [1] C:/Users/sakar/Documents/R/win-library/3.4
## [2] C:/Program Files/R/R-3.4.1/library