Learn R Programming

smappR (version 0.5)

estimate.ideology: Estimates ideology for a given Twitter user

Description

estimate.ideology estimates ideology for a given user using the Metropolis algorithm developed in Barbera, 2013. It takes as argument of the function a list of user IDs indicating who a given user follows.

Usage

estimate.ideology(user, friends, verbose = TRUE, iters = 5000, n.warmup = 1000, thin = 20)

Arguments

user
screen name of user for which ideology is to be estimated.
friends
vector of user IDs that the user for which ideology wants to be estimated follows
verbose
logical, default is TRUE, which generates some output to the R console with information about progress of the sampler.
iters
number of iterations of the metropolis algorithm. Default is 5000
n.warmup
warmup period for the sampler. Default is 1000 iterations.
thin
thinning of the sampler. Default is 20.

Examples

Run this code
## Not run: 
# ## download list of friends for a given user
#  friends <- getFriends(screen_name = "p_barbera", oauth_folder="oauth")
# ## estimating ideology
#  results <- estimate.ideology(friends)
# ## End(Not run)

Run the code above in your browser using DataLab