Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 2 DOI reference(s) in README -
○Academic publication links
-
✓Committers with academic emails
1 of 4 committers (25.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (18.6%) to scientific vocabulary
Last synced: 11 months ago
·
JSON representation
Repository
Text Mining for Psychological Research
Basic Info
Statistics
- Stars: 8
- Watchers: 4
- Forks: 1
- Open Issues: 18
- Releases: 0
Created over 7 years ago
· Last pushed over 3 years ago
Metadata Files
Readme
License
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
set.seed(1)
```
# psychtm: A package for text mining in psychological research
[](https://www.repostatus.org/#active)
[](https://github.com/ktw5691/psychtm/actions)
[](https://CRAN.R-project.org/package=psychtm)
[](https://app.codecov.io/gh/ktw5691/psychtm?branch=main)
The goal of `psychtm` is to make text mining models and methods accessible for social science researchers, particularly within psychology. This package allows users to
- Estimate the SLDAX topic model and popular models subsumed by SLDAX, including SLDA, LDA, and regression models;
- Obtain posterior inferences;
- Assess model fit using coherence and exclusivity metrics.
## Installation
Once on CRAN, install the package as usual:
``` r
install.packages("psychtm")
```
Alternatively, you can install the most current development version:
- If necessary, first install the `devtools` R package,
``` r
install.packages("devtools")
```
### Option 1: Install the latest stable version from Github
``` r
devtools::install_github("ktw5691/psychtm")
```
### Option 2: Install the latest development snapshot
``` r
devtools::install_github("ktw5691/psychtm@devel")
```
## Example
This is a basic example which shows you how to (1) prepare text documents stored in a data frame; (2) fit a supervised topic model with covariates (SLDAX); and (3) summarize the regression relationships from the estimated SLDAX model.
```{r example}
library(psychtm)
library(lda) # Required if using `prep_docs()`
data(teacher_rate) # Synthetic student ratings of instructors
docs_vocab <- prep_docs(teacher_rate, "doc")
vocab_len <- length(docs_vocab$vocab)
fit_sldax <- gibbs_sldax(rating ~ I(grade - 1),
data = teacher_rate,
docs = docs_vocab$documents,
V = vocab_len,
K = 2,
model = "sldax")
eta_post <- post_regression(fit_sldax)
```
```{r reg_summary}
summary(eta_post)
```
For a more detailed example of the key functionality of this package, explore the vignette(s) for a good starting point:
``` r
browseVignettes("psychtm")
```
## How to Cite the Package
Wilcox, K. T., Jacobucci, R., Zhang, Z., Ammerman, B. A. (2021). Supervised latent Dirichlet allocation with covariates: A Bayesian structural and measurement model of text and covariates. *PsyArXiv*.
## Common Troubleshooting
Ensure that appropriate `C++` compilers are installed on your computer:
- Mac users will have to download [Xcode](https://apps.apple.com/ca/app/xcode/id497799835?mt=12) and its related Command Line Tools (found within Xcode's Preference Pane under Downloads/Components).
- Windows users may need to install [Rtools](https://CRAN.R-project.org/bin/windows/Rtools/). For easier command line use, be sure to select the option to install Rtools to their path.
- Most Linux distributions should already have up-to-date compilers.
## Limitations
- This package uses a Gibbs sampling algorithm that can be memory-intensive for a large corpus.
## Getting Help
If you think you have found a bug, please [open an issue](https://github.com/ktw5691/psychtm/issues) and provide a [minimal complete verifiable example](https://stackoverflow.com/help/mcve).
Owner
- Name: Kenneth Tyler Wilcox
- Login: ktw5691
- Kind: user
- Location: Ithaca, NY
- Website: https://ktylerwilcox.me
- Twitter: KTylerWilcox
- Repositories: 4
- Profile: https://github.com/ktw5691
Postdoctoral Associate at Cornell University. PhD Quantitative Psychology, University of Notre Dame. MS Applied Statistics, Rochester Institute of Technology.
GitHub Events
Total
Last Year
Committers
Last synced: over 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Kenneth Wilcox | k****3@n****u | 124 |
| ktw5691 | k****x@g****m | 92 |
| Kenneth Wilcox | k****1@g****m | 83 |
| ktw5691 | k****1 | 81 |
Committer Domains (Top 20 + Academic)
github.com: 1
nd.edu: 1
Issues and Pull Requests
Last synced: almost 3 years ago
All Time
- Total issues: 50
- Total pull requests: 9
- Average time to close issues: 4 months
- Average time to close pull requests: about 9 hours
- Total issue authors: 2
- Total pull request authors: 1
- Average comments per issue: 0.32
- Average comments per pull request: 0.11
- Merged pull requests: 9
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- ktw5691 (44)
- Derek-Jones (6)
Pull Request Authors
- ktw5691 (9)
Top Labels
Issue Labels
feature (12)
upkeep (4)
bug (1)
documentation (1)
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 179 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
cran.r-project.org: psychtm
Text Mining Methods for Psychological Research
- Homepage: https://github.com/ktw5691/psychtm/
- Documentation: http://cran.r-project.org/web/packages/psychtm/psychtm.pdf
- License: LGPL (≥ 3)
- Status: removed
-
Latest release: 2021.1.0
published over 4 years ago
Rankings
Stargazers count: 18.7%
Forks count: 28.8%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Average: 37.6%
Downloads: 75.0%
Maintainers (1)
Last synced:
almost 3 years ago
Dependencies
DESCRIPTION
cran
- R >= 3.3.0 depends
- Rcpp >= 0.11.0 imports
- coda >= 0.4 imports
- label.switching * imports
- methods * imports
- rlang >= 0.4.10 imports
- tibble >= 2.1.3 imports
- covr * suggests
- dplyr * suggests
- ggplot2 * suggests
- knitr >= 1.22 suggests
- lda * suggests
- rmarkdown * suggests
- spelling * suggests
- testthat >= 3.0.2 suggests
.github/workflows/check-standard.yaml
actions
- actions/checkout v2 composite
- actions/upload-artifact main composite
- r-lib/actions/check-r-package v1 composite
- r-lib/actions/setup-pandoc v1 composite
- r-lib/actions/setup-r v1 composite
- r-lib/actions/setup-r-dependencies v1 composite
.github/workflows/render-rmarkdown.yaml
actions
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc v1 composite
- r-lib/actions/setup-r v1 composite
- r-lib/actions/setup-renv v1 composite
.github/workflows/test-coverage.yaml
actions
- actions/checkout v2 composite
- r-lib/actions/setup-r v1 composite
- r-lib/actions/setup-r-dependencies v1 composite