{
  "_id": "6a1bef461d7bb097a0a21d62",
  "Package": "stm",
  "Title": "Estimation of the Structural Topic Model",
  "Version": "1.3.8",
  "Authors@R": "c(\nperson(\"Margaret\", \"Roberts\", email=\"meroberts@ucsd.edu\", role=\"aut\"),\nperson(\"Brandon\", \"Stewart\", email=\"bms4@princeton.edu\", role=c(\"aut\",\"cre\")),\nperson(\"Dustin\", \"Tingley\", email=\"dtingley@gov.harvard.edu\", role=\"aut\"),\nperson(\"Kenneth\",\"Benoit\", email=\"kbenoit@lse.ac.uk\", role=\"ctb\"))",
  "Description": "The Structural Topic Model (STM) allows researchers to\nestimate topic models with document-level covariates. The\npackage also includes tools for model selection, visualization,\nand estimation of topic-covariate regressions. Methods\ndeveloped in Roberts et. al. (2014) <doi:10.1111/ajps.12103>\nand Roberts et. al. (2016) <doi:10.1080/01621459.2016.1141684>.\nVignette is Roberts et. al. (2019) <doi:10.18637/jss.v091.i02>.",
  "Encoding": "UTF-8",
  "LazyData": "yes",
  "License": "MIT + file LICENSE",
  "URL": "http://www.structuraltopicmodel.com/",
  "BugReports": "https://github.com/bstewart/stm/issues",
  "RoxygenNote": "7.3.2",
  "Language": "en-US",
  "NeedsCompilation": "yes",
  "Packaged": {
    "Date": "2026-05-31 08:14:49 UTC",
    "User": "root"
  },
  "Author": "Margaret Roberts [aut], Brandon Stewart [aut, cre], Dustin\nTingley [aut], Kenneth Benoit [ctb]",
  "Maintainer": "Brandon Stewart <bms4@princeton.edu>",
  "Repository": "https://cran.r-universe.dev",
  "Date/Publication": "2025-09-03 22:32:52 UTC",
  "RemoteUrl": "https://github.com/cran/stm",
  "RemoteRef": "HEAD",
  "RemoteSha": "ff3efdeac577d114e75e812dc9a54cf18e603642",
  "MD5sum": "ffc678081908578a6be2f31a010ccb74",
  "_user": "cran",
  "_type": "src",
  "_file": "stm_1.3.8.tar.gz",
  "_fileid": "60cd9f75d8365753743422cf1f624cc80fe28c8b938ac34bafb7dc39bde413c1",
  "_filesize": 2780959,
  "_sha256": "60cd9f75d8365753743422cf1f624cc80fe28c8b938ac34bafb7dc39bde413c1",
  "_created": "2026-05-31T08:14:49.000Z",
  "_published": "2026-05-31T08:20:22.923Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 78711352824,
      "time": 227,
      "config": "linux-devel-arm64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7315164556"
    },
    {
      "job": 78711352828,
      "time": 246,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7315166602"
    },
    {
      "job": 78711352831,
      "time": 225,
      "config": "linux-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7315164434"
    },
    {
      "job": 78711352827,
      "time": 268,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7315169122"
    },
    {
      "job": 78711153995,
      "time": 221,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7315139532"
    },
    {
      "job": 78711352870,
      "time": 163,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7315157291"
    }
  ],
  "_buildurl": "https://github.com/r-universe/cran/actions/runs/26707306583",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/cran/stm",
  "_commit": {
    "id": "ff3efdeac577d114e75e812dc9a54cf18e603642",
    "author": "Brandon Stewart <bms4@princeton.edu>",
    "committer": "cran-robot <csardi.gabor+cran@gmail.com>",
    "message": "version 1.3.8\n",
    "time": 1756938772
  },
  "_maintainer": {
    "name": "Brandon Stewart",
    "email": "bms4@princeton.edu",
    "login": "bstewart",
    "description": "",
    "uuid": 577337
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.5.0",
      "role": "Depends"
    },
    {
      "package": "methods",
      "role": "Depends"
    },
    {
      "package": "Rcpp",
      "role": "LinkingTo"
    },
    {
      "package": "RcppArmadillo",
      "role": "LinkingTo"
    },
    {
      "package": "Rcpp",
      "version": ">= 0.11.3",
      "role": "Imports"
    },
    {
      "package": "data.table",
      "role": "Imports"
    },
    {
      "package": "glmnet",
      "role": "Imports"
    },
    {
      "package": "grDevices",
      "role": "Imports"
    },
    {
      "package": "graphics",
      "role": "Imports"
    },
    {
      "package": "lda",
      "role": "Imports"
    },
    {
      "package": "Matrix",
      "role": "Imports"
    },
    {
      "package": "matrixStats",
      "role": "Imports"
    },
    {
      "package": "parallel",
      "role": "Imports"
    },
    {
      "package": "quadprog",
      "role": "Imports"
    },
    {
      "package": "quanteda",
      "role": "Imports"
    },
    {
      "package": "slam",
      "role": "Imports"
    },
    {
      "package": "splines",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "stringr",
      "role": "Imports"
    },
    {
      "package": "utils",
      "role": "Imports"
    },
    {
      "package": "clue",
      "role": "Suggests"
    },
    {
      "package": "geometry",
      "role": "Suggests"
    },
    {
      "package": "huge",
      "role": "Suggests"
    },
    {
      "package": "hunspell",
      "role": "Suggests"
    },
    {
      "package": "igraph",
      "role": "Suggests"
    },
    {
      "package": "LDAvis",
      "role": "Suggests"
    },
    {
      "package": "KernSmooth",
      "role": "Suggests"
    },
    {
      "package": "NLP",
      "role": "Suggests"
    },
    {
      "package": "rsvd",
      "role": "Suggests"
    },
    {
      "package": "Rtsne",
      "role": "Suggests"
    },
    {
      "package": "SnowballC",
      "role": "Suggests"
    },
    {
      "package": "spelling",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "role": "Suggests"
    },
    {
      "package": "tm",
      "version": ">= 0.6",
      "role": "Suggests"
    },
    {
      "package": "wordcloud",
      "role": "Suggests"
    }
  ],
  "_owner": "cran",
  "_selfowned": false,
  "_usedby": 5,
  "_updates": [
    {
      "week": "2025-36",
      "n": 1
    }
  ],
  "_tags": [
    {
      "name": "1.3.8",
      "date": "2025-09-03"
    }
  ],
  "_stars": 1,
  "_contributors": [
    {
      "user": "bstewart",
      "count": 12,
      "uuid": 577337
    }
  ],
  "_userbio": {
    "uuid": 6899542,
    "type": "organization",
    "name": "cran",
    "description": "Unofficial read-only mirror of all CRAN R packages"
  },
  "_downloads": {
    "count": 5349,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/stm"
  },
  "_mentions": 12,
  "_devurl": "https://github.com/bstewart/stm",
  "_searchresults": 1664,
  "_topics": [
    "openblas",
    "cpp"
  ],
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/stm.html",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/bstewart/stm",
  "_realowner": "bstewart",
  "_cranurl": false,
  "_releases": [
    {
      "version": "0.6.1",
      "date": "2014-02-28"
    },
    {
      "version": "0.6.12",
      "date": "2014-05-14"
    },
    {
      "version": "0.6.16",
      "date": "2014-05-30"
    },
    {
      "version": "0.6.24",
      "date": "2014-06-30"
    },
    {
      "version": "1.0.0",
      "date": "2014-10-02"
    },
    {
      "version": "1.0.1",
      "date": "2014-10-04"
    },
    {
      "version": "1.0.8",
      "date": "2014-11-07"
    },
    {
      "version": "1.1.0",
      "date": "2015-07-27"
    },
    {
      "version": "1.1.3",
      "date": "2016-01-14"
    },
    {
      "version": "1.2.1",
      "date": "2017-03-07"
    },
    {
      "version": "1.2.2",
      "date": "2017-03-28"
    },
    {
      "version": "1.3.0",
      "date": "2017-09-09"
    },
    {
      "version": "1.3.3",
      "date": "2018-01-28"
    },
    {
      "version": "1.3.4",
      "date": "2019-10-30"
    },
    {
      "version": "1.3.5",
      "date": "2019-12-17"
    },
    {
      "version": "1.3.6",
      "date": "2020-09-18"
    },
    {
      "version": "1.3.6.1",
      "date": "2023-08-21"
    },
    {
      "version": "1.3.7",
      "date": "2023-12-02"
    },
    {
      "version": "1.3.8",
      "date": "2025-09-03"
    }
  ],
  "_exports": [
    "alignCorpus",
    "asSTMCorpus",
    "calcfrex",
    "calclift",
    "calcscore",
    "checkBeta",
    "checkResiduals",
    "cloud",
    "convertCorpus",
    "estimateEffect",
    "eval.heldout",
    "exclusivity",
    "findThoughts",
    "findTopic",
    "fitNewDocuments",
    "js.estimate",
    "labelTopics",
    "make.dt",
    "make.heldout",
    "makeDesignMatrix",
    "manyTopics",
    "multiSTM",
    "optimizeDocument",
    "permutationTest",
    "plot.estimateEffect",
    "plot.searchK",
    "plot.STM",
    "plot.topicCorr",
    "plotModels",
    "plotQuote",
    "plotRemoved",
    "plotTopicLoess",
    "prepDocuments",
    "readCorpus",
    "readLdac",
    "s",
    "sageLabels",
    "searchK",
    "selectModel",
    "semanticCoherence",
    "stm",
    "textProcessor",
    "thetaPosterior",
    "toLDAvis",
    "toLDAvisJson",
    "topicCorr",
    "topicLasso",
    "topicQuality",
    "writeLdac"
  ],
  "_datasets": [
    {
      "name": "gadarian",
      "title": "Gadarian and Albertson data",
      "object": "gadarian",
      "class": [
        "data.frame"
      ],
      "fields": [
        "MetaID",
        "treatment",
        "pid_rep",
        "open.ended.response"
      ],
      "rows": 341,
      "table": true,
      "tojson": true
    },
    {
      "name": "gadarianFit",
      "title": "Gadarian and Albertson data",
      "object": "gadarianFit",
      "class": [
        "STM"
      ],
      "fields": [],
      "table": false,
      "tojson": false
    },
    {
      "name": "poliblog5k.docs",
      "title": "CMU 2008 Political Blog Corpus",
      "object": "poliblog5k",
      "class": [
        "list"
      ],
      "fields": [],
      "table": false,
      "tojson": true
    },
    {
      "name": "poliblog5k.meta",
      "title": "CMU 2008 Political Blog Corpus",
      "object": "poliblog5k",
      "class": [
        "data.frame"
      ],
      "fields": [
        "rating",
        "day",
        "blog",
        "text"
      ],
      "rows": 5000,
      "table": true,
      "tojson": true
    },
    {
      "name": "poliblog5k.voc",
      "title": "CMU 2008 Political Blog Corpus",
      "object": "poliblog5k",
      "class": [
        "character"
      ],
      "fields": [],
      "table": false,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "stm-package",
      "title": "Structural Topic Model",
      "topics": [
        "stm-package"
      ]
    },
    {
      "page": "alignCorpus",
      "title": "Align the vocabulary of a new corpus to an old corpus",
      "topics": [
        "alignCorpus"
      ]
    },
    {
      "page": "asSTMCorpus",
      "title": "STM Corpus Coercion",
      "topics": [
        "asSTMCorpus"
      ]
    },
    {
      "page": "checkBeta",
      "title": "Looks for words that load exclusively onto a topic",
      "topics": [
        "checkBeta"
      ]
    },
    {
      "page": "checkResiduals",
      "title": "Residual dispersion test for topic number",
      "topics": [
        "checkResiduals"
      ]
    },
    {
      "page": "cloud",
      "title": "Plot a wordcloud",
      "topics": [
        "cloud"
      ]
    },
    {
      "page": "convertCorpus",
      "title": "Convert 'stm' formatted documents to another format",
      "topics": [
        "convertCorpus"
      ]
    },
    {
      "page": "estimateEffect",
      "title": "Estimates regressions using an STM object",
      "topics": [
        "estimateEffect"
      ]
    },
    {
      "page": "findThoughts",
      "title": "Find Thoughts",
      "topics": [
        "findThoughts",
        "plot.findThoughts",
        "print.findThoughts"
      ]
    },
    {
      "page": "findTopic",
      "title": "Find topics that contain user specified words.",
      "topics": [
        "findTopic"
      ]
    },
    {
      "page": "fitNewDocuments",
      "title": "Fit New Documents",
      "topics": [
        "fitNewDocuments"
      ]
    },
    {
      "page": "gadarian",
      "title": "Gadarian and Albertson data",
      "topics": [
        "gadarian",
        "gadarianFit"
      ]
    },
    {
      "page": "labelTopics",
      "title": "Label topics",
      "topics": [
        "labelTopics",
        "print.labelTopics"
      ]
    },
    {
      "page": "make.dt",
      "title": "Make a 'data.table' of topic proportions.",
      "topics": [
        "make.dt"
      ]
    },
    {
      "page": "make.heldout",
      "title": "Heldout Likelihood by Document Completion",
      "topics": [
        "eval.heldout",
        "make.heldout"
      ]
    },
    {
      "page": "manyTopics",
      "title": "Performs model selection across separate STM's that each assume different numbers of topics.",
      "topics": [
        "manyTopics"
      ]
    },
    {
      "page": "multiSTM",
      "title": "Analyze Stability of Local STM Mode",
      "topics": [
        "multiSTM",
        "print.MultimodDiagnostic"
      ]
    },
    {
      "page": "optimizeDocument",
      "title": "Optimize Document",
      "topics": [
        "optimizeDocument"
      ]
    },
    {
      "page": "permutationTest",
      "title": "Permutation test of a binary covariate.",
      "topics": [
        "permutationTest"
      ]
    },
    {
      "page": "plot.estimateEffect",
      "title": "Plot effect of covariates on topics",
      "topics": [
        "plot.estimateEffect"
      ]
    },
    {
      "page": "plot.MultimodDiagnostic",
      "title": "Plotting Method for Multimodality Diagnostic Objects",
      "topics": [
        "plot.MultimodDiagnostic"
      ]
    },
    {
      "page": "plot.searchK",
      "title": "Plots diagnostic values resulting from searchK",
      "topics": [
        "plot.searchK"
      ]
    },
    {
      "page": "plot.STM",
      "title": "Functions for plotting STM objects",
      "topics": [
        "plot.STM"
      ]
    },
    {
      "page": "plot.STMpermute",
      "title": "Plot an STM permutation test.",
      "topics": [
        "plot.STMpermute"
      ]
    },
    {
      "page": "plot.topicCorr",
      "title": "Plot a topic correlation graph",
      "topics": [
        "plot.topicCorr"
      ]
    },
    {
      "page": "plotModels",
      "title": "Plots semantic coherence and exclusivity for high likelihood models outputted from selectModel.",
      "topics": [
        "plotModels"
      ]
    },
    {
      "page": "plotQuote",
      "title": "Plots strings",
      "topics": [
        "plotQuote"
      ]
    },
    {
      "page": "plotRemoved",
      "title": "Plot documents, words and tokens removed at various word thresholds",
      "topics": [
        "plotRemoved"
      ]
    },
    {
      "page": "plotTopicLoess",
      "title": "Plot some effects with loess",
      "topics": [
        "plotTopicLoess"
      ]
    },
    {
      "page": "poliblog5k",
      "title": "CMU 2008 Political Blog Corpus",
      "topics": [
        "poliblog5k",
        "poliblog5k.docs",
        "poliblog5k.meta",
        "poliblog5k.voc"
      ]
    },
    {
      "page": "prepDocuments",
      "title": "Prepare documents for analysis with 'stm'",
      "topics": [
        "prepDocuments"
      ]
    },
    {
      "page": "readCorpus",
      "title": "Read in a corpus file.",
      "topics": [
        "readCorpus"
      ]
    },
    {
      "page": "readLdac",
      "title": "Read in a .ldac Formatted File",
      "topics": [
        "readLdac"
      ]
    },
    {
      "page": "s",
      "title": "Make a B-spline Basis Function",
      "topics": [
        "s"
      ]
    },
    {
      "page": "sageLabels",
      "title": "Displays verbose labels that describe topics and topic-covariate groups in depth.",
      "topics": [
        "print.sageLabels",
        "sageLabels"
      ]
    },
    {
      "page": "searchK",
      "title": "Computes diagnostic values for models with different values of K (number of topics).",
      "topics": [
        "searchK"
      ]
    },
    {
      "page": "selectModel",
      "title": "Assists the user in selecting the best STM model.",
      "topics": [
        "selectModel"
      ]
    },
    {
      "page": "stm",
      "title": "Variational EM for the Structural Topic Model",
      "topics": [
        "stm"
      ]
    },
    {
      "page": "summary.estimateEffect",
      "title": "Summary for estimateEffect",
      "topics": [
        "print.summary.estimateEffect",
        "summary.estimateEffect"
      ]
    },
    {
      "page": "summary.STM",
      "title": "Summary Function for the STM objects",
      "topics": [
        "print.STM",
        "summary.STM"
      ]
    },
    {
      "page": "textProcessor",
      "title": "Process a vector of raw texts",
      "topics": [
        "head.textProcessor",
        "print.textProcessor",
        "summary.textProcessor",
        "textProcessor"
      ]
    },
    {
      "page": "thetaPosterior",
      "title": "Draw from Theta Posterior",
      "topics": [
        "thetaPosterior"
      ]
    },
    {
      "page": "toLDAvis",
      "title": "Wrapper to launch LDAvis topic browser.",
      "topics": [
        "toLDAvis"
      ]
    },
    {
      "page": "toLDAvisJson",
      "title": "Wrapper to create Json mapping for LDAvis. This can be useful in indirect render e.g. Shiny Dashboards",
      "topics": [
        "toLDAvisJson"
      ]
    },
    {
      "page": "topicCorr",
      "title": "Estimate topic correlation",
      "topics": [
        "topicCorr"
      ]
    },
    {
      "page": "topicLasso",
      "title": "Plot predictions using topics",
      "topics": [
        "topicLasso"
      ]
    },
    {
      "page": "topicQuality",
      "title": "Plots semantic coherence and exclusivity for each topic.",
      "topics": [
        "topicQuality"
      ]
    },
    {
      "page": "writeLdac",
      "title": "Write a .ldac file",
      "topics": [
        "writeLdac"
      ]
    }
  ],
  "_rundeps": [
    "cli",
    "codetools",
    "data.table",
    "fastmatch",
    "foreach",
    "glmnet",
    "glue",
    "ISOcodes",
    "iterators",
    "jsonlite",
    "lattice",
    "lda",
    "lifecycle",
    "magrittr",
    "Matrix",
    "matrixStats",
    "quadprog",
    "quanteda",
    "Rcpp",
    "RcppArmadillo",
    "RcppEigen",
    "rlang",
    "shape",
    "slam",
    "SnowballC",
    "stopwords",
    "stringi",
    "stringr",
    "survival",
    "vctrs",
    "xml2",
    "yaml"
  ],
  "_sysdeps": [
    {
      "shlib": "liblapack",
      "package": "libopenblas0-pthread",
      "source": "openblas",
      "version": "0.3.26+ds-1ubuntu0.1",
      "name": "openblas",
      "homepage": "https://www.openblas.net/",
      "description": "Optimized BLAS (linear algebra) library (shared lib, pthread)"
    },
    {
      "shlib": "libblas",
      "package": "libopenblas0-pthread",
      "source": "openblas",
      "version": "0.3.26+ds-1ubuntu0.1",
      "name": "openblas",
      "homepage": "https://www.openblas.net/",
      "description": "Optimized BLAS (linear algebra) library (shared lib, pthread)"
    },
    {
      "shlib": "libstdc++",
      "package": "libstdc++6",
      "source": "gcc",
      "version": "14.2.0-4ubuntu2~24.04.1",
      "name": "c++",
      "homepage": "http://gcc.gnu.org/",
      "description": "GNU Standard C++ Library v3"
    }
  ],
  "_vignettes": [
    {
      "source": "stmVignette.Rnw",
      "filename": "stmVignette.pdf",
      "title": "Using stm",
      "engine": "utils::Sweave",
      "headings": [],
      "created": "2014-02-28 17:55:17",
      "modified": "2020-09-18 12:50:02",
      "commits": 12
    }
  ],
  "_score": 7.125517178905405,
  "_indexed": false,
  "_nocasepkg": "stm",
  "_universes": [
    "cran"
  ],
  "_indexurl": "https://bstewart.r-universe.dev/stm",
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.3.8",
      "date": "2026-05-31T08:17:48.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "ff3efdeac577d114e75e812dc9a54cf18e603642",
      "fileid": "88f0a9c971859d5de832c0be6e7d3d2064c0a7f1e7c85b2773f0c6075459eaab",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/26707306583"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.3.8",
      "date": "2026-05-31T08:17:59.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "ff3efdeac577d114e75e812dc9a54cf18e603642",
      "fileid": "23340bfedf1581307b86f1638b7362593358a94aa2b11f636cc4defff35288b9",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/26707306583"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.3.8",
      "date": "2026-05-31T08:17:46.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "ff3efdeac577d114e75e812dc9a54cf18e603642",
      "fileid": "fe5ec38f0c2ca02378cd9a871f7e18b9022135d3b31ee4e841f9b19f2455149a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/26707306583"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.3.8",
      "date": "2026-05-31T08:18:23.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "ff3efdeac577d114e75e812dc9a54cf18e603642",
      "fileid": "6992ceddbbd13b6c59f63b1b041f7fb1865b57daf9937bd281025a9830325129",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/26707306583"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.3.8",
      "date": "2026-05-31T08:17:59.000Z",
      "arch": "emscripten",
      "commit": "ff3efdeac577d114e75e812dc9a54cf18e603642",
      "fileid": "6348e741644cfd96f64b89b5580c54f5e89e9e55b167c18b009cc49cbe48766a",
      "status": "success",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/26707306583"
    }
  ]
}