fitStan: Fit a Stan model with results from MTurk

View source: R/fitStan.R

fitStanR Documentation

Fit a Stan model with results from MTurk

Description

Fit a Stan model with results from MTurk

Usage

fitStan(data, chains = 3, iter = 2500, seed = 1234, n.cores = 3)

Arguments

data

A data set or a vector of batch numbers.

chains

The number of chains. (Default is 3)

iter

The number of iteration. (Default is 2500)

seed

Set seed. (Defalt is 1234)

n.cores

Number of cores to be used in stan fit. (Default is 3)

Details

fitStan() function estimates a non-hierarchical Stan model,

Fit a random utility model using Hamiltonian MCMC in Stan with data passed in.

Reference Paper: Carlson, David and Jacob M. Montgomery. Forthcoming. “A Pairwise Comparison Framework for Fast, Flexible, and Reliable Human Coding of Political Texts.” American Political Science Review.

Value

fit A list containing the following elements:

  • fit The Stan fit object for the model

  • alphaPosts A matrix with the full posteriors of the document estimates merged with the document IDs from the SentimentIt server

Author(s)

David Carlson


RydenButler/labelR documentation built on May 9, 2023, 5:52 a.m.