# NOT RUN {
# To demonstrate, we load the 114th Senate data and fit a time-varying model
data('senate114_fit')
# }
# NOT RUN {
senate_data <- id_make(senate114,outcome = 'cast_code',
person_id = 'bioname',
item_id = 'rollnumber',
group_id= 'party_code',
time_id='date',
miss_val='Absent')
senate114_time_fit <- id_estimate(senate_data,
model_type = 2,
use_vb = T,
fixtype='vb_partial',
vary_ideal_pts='random_walk',
restrict_ind_high = "WARREN, Elizabeth",
restrict_ind_low="BARRASSO, John A.",
seed=84520)
# We plot the variances for all the Senators
id_plot_legis_var(senate114_fit)
# }
Run the code above in your browser using DataLab