{"id":16282948,"url":"https://github.com/hauselin/hausekeep","last_synced_at":"2025-10-27T22:12:53.174Z","repository":{"id":92236475,"uuid":"168783741","full_name":"hauselin/hausekeep","owner":"hauselin","description":"R package with functions to improve research workflow https://hauselin.github.io/hausekeep/","archived":false,"fork":false,"pushed_at":"2023-01-19T02:16:13.000Z","size":471,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T09:21:21.879Z","etag":null,"topics":["apa-results","diffusion-model","package","psychology","r","specification-curve","statistical-measures","statistics"],"latest_commit_sha":null,"homepage":"https://hauselin.github.io/hausekeep/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hauselin.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-02T02:00:49.000Z","updated_at":"2025-02-06T15:59:11.000Z","dependencies_parsed_at":"2023-06-08T05:15:53.823Z","dependency_job_id":null,"html_url":"https://github.com/hauselin/hausekeep","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/hauselin/hausekeep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hauselin%2Fhausekeep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hauselin%2Fhausekeep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hauselin%2Fhausekeep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hauselin%2Fhausekeep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hauselin","download_url":"https://codeload.github.com/hauselin/hausekeep/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hauselin%2Fhausekeep/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266572326,"owners_count":23950000,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apa-results","diffusion-model","package","psychology","r","specification-curve","statistical-measures","statistics"],"created_at":"2024-10-10T19:12:06.650Z","updated_at":"2025-10-27T22:12:53.088Z","avatar_url":"https://github.com/hauselin.png","language":"R","readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures\",\n  out.width = \"100%\"\n)\nlibrary(hausekeep) # load package\n```\n\n# hausekeep\n\n[![Travis build status](https://travis-ci.org/hauselin/hausekeep.svg?branch=master)](https://travis-ci.org/hauselin/hausekeep) [![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/hauselin/hausekeep?branch=master\u0026svg=true)](https://ci.appveyor.com/project/hauselin/hausekeep) [![Coverage status](https://codecov.io/gh/hauselin/hausekeep/branch/master/graph/badge.svg)](https://codecov.io/github/hauselin/hausekeep?branch=master) \n\n[![DOI](https://zenodo.org/badge/168783741.svg)](https://doi.org/10.5281/zenodo.2555874)\n\nFunctions to make it easier to analyse and summarise data and results in R. For documentation, see https://hauselin.github.io/hausekeep/ Also check out my R tutorials [here](https://hausetutorials.netlify.com/).\n\n## Installation\n\nTo install the package, type the following commands into the R console:\n\n```r\n# install.packages(\"devtools\")\ndevtools::install_github(\"hauselin/hausekeep\") # you might have to install devtools first (see above)\n```\n\n## Examples\n\n### `summaryh()` generates formatted results and effect sizes for manuscripts\n\nGenerate model summaries that can be copied and pasted straight into your manuscript (no more copy-paste frustrations and errors!). Summaries are formatted according to American Psychological Association (APA) guidelines (get in touch if you require other formats). Example APA summaries generated by `summaryh()`: \n\n* regression output: `b = 1.41, SE = 0.56, t(30) = 2.53, p = .017, r = 0.42`\n* ANOVA output: `F(1, 30) = 9.00, p = .005, r = 0.48`\n* t-test output: `t(23) = −4.67, p \u003c .001, r = 0.70`\n\nSee [documentation](https://hauselin.github.io/hausekeep/reference/summaryh.html) for optional parameters. \n\n```r\nmodel_lm \u003c- lm(mpg ~ cyl, mtcars) \nsummary(model_lm) # base R summary()\nsummaryh(model_lm) # returns APA-formatted output in a data.table\n\n# linear mixed effects regression\nlibrary(lme4); library(lmerTest) # load packages to fit mixed effects models\nmodel \u003c- lmer(weight ~ Time * Diet  + (1 + Time | Chick), data = ChickWeight)\nsummary(model) # standard summary\nsummaryh(model)\n\n# ANOVA\nsummaryh(aov(mpg ~ gear, mtcars))\n\n# correlation\ncor.test(mtcars$mpg, mtcars$cyl)\nsummaryh(cor.test(mtcars$mpg, mtcars$cyl))\n```\n\n### `es()` converts between effect size measures\n\nThe `es` function converts one effect size into other effect sizes (e.g., d, r, R\u003csup\u003e2\u003c/sup\u003e, f, odds ratio, log odds ratio, area-under-curve [AUC]). Also available at https://www.escal.site.\n\n```{r es example}\nes(d = 0.2)\n\nes(r = c(0.1, 0.4, 0.7))\n```\n\n### `outliers_mad()` identifies outliers using robust median absolute deviation approach\n\n```{r}\nexample \u003c- c(1, 3, 3, 6, 8, 10, 10, 1000) # 1000 is an outlier\noutliers_mad(example) # MAD approach\n```\n\n### `outliersZ()` identifies outliers using Z-score cut-off\n\n```{r}\nexample \u003c- c(1, 3, 3, 6, 8, 10, 10, 1000) # 1000 is an outlier\noutliersZ(example) # SD approach\n\n# compare with MAD approach from above\noutliersZ(example) # SD approach\n```\n\n### `fit_ezddm()` fits EZ-diffusion model for two-choice response time tasks\n\n```r\nlibrary(rtdists) # load package to help us simulate some data\ndata1 \u003c- rdiffusion(n = 100, a = 2, v = 0.3, t0 = 0.5, z = 0.5 * 2) # simulate data\ndata2 \u003c- rdiffusion(n = 100, a = 2, v = -0.3, t0 = 0.5, z = 0.5 * 2) # simulate data\ndataAll \u003c- rbind(data1, data2) # join data\ndataAll$response \u003c- ifelse(dataAll$response == \"upper\", 1, 0) # convert responses to 1 and 0\ndataAll$subject \u003c- rep(c(1, 2), each = 100) # assign subject id\ndataAll$cond1 \u003c- sample(c(\"a\", \"b\"), 200, replace = T) # randomly assign conditions a/b\ndataAll$cond2 \u003c- sample(c(\"y\", \"z\"), 200, replace = T) # randomly assign conditions y/z\n\n# fit model to just entire data set (assumes all data came from 1 subject)\nfit_ezddm(data = dataAll, rts = \"rt\", responses = \"response\")\n# fit model to each subject (no conditions)\nfit_ezddm(data = dataAll, rts = \"rt\", responses = \"response\", id = \"subject\") \n# fit model to each subject by cond1\nfit_ezddm(data = dataAll, rts = \"rt\", responses = \"response\", id = \"subject\", group = \"cond1\") \n# fit model to each subject by cond1,cond2\nfit_ezddm(data = dataAll, rts = \"rt\", responses = \"response\", id = \"subject\", group = c(\"cond1\", \"cond2\"))\n```\n\n### `sca_lm()` fits every possible linear regression model given a set of predictors and covariates\n\n`sca_lm()` is a basic implementation of [specification curve analysis](https://www.nature.com/articles/s41562-020-0912-z) for linear regression.\n\n```r\n# models to fit: mpg ~ cyl; mpg ~ carb; mpg ~ cyl + carb\nsca_lm(data = mtcars, dv = \"mpg\", ivs = c(\"cyl\", \"carb\")) # default no covariates \n\n# models to fit (with and without covariate vs): mpg ~ cyl; mpg ~ carb; mpg ~ cyl + carb\nsca_lm(data = mtcars, dv = \"mpg\", ivs = c(\"cyl\", \"carb\"), covariates = \"vs\")\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhauselin%2Fhausekeep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhauselin%2Fhausekeep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhauselin%2Fhausekeep/lists"}