Giter VIP home page Giter VIP logo

saudiwin / idealstan Goto Github PK

View Code? Open in Web Editor NEW
50.0 50.0 12.0 60.8 MB

idealstan offers item-response theory (IRT) ideal-point estimation for binary, ordinal, counts and continuous responses with time-varying and missing-data inference. Latent space model also included. Full and approximate Bayesian sampling with 'Stan' (www.mc-stan.org).

Home Page: https://cran.r-project.org/web/packages/idealstan/index.html

License: GNU General Public License v2.0

R 37.38% Stan 57.07% HTML 5.02% C++ 0.53%
bayesian irt rstats stan

idealstan's People

Contributors

bgoodri avatar michalovadek avatar samjfuller avatar saudiwin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

idealstan's Issues

Examples contain syntax errors

Hi,

I'm going through some examples and I noticed that the id_estimate() vignette is broken. Can you please fix various syntax errors in the vignettes? For example, senate_data should be changed to to_idealstan.

The help page for the function also states that additional arguments can be passed onto the Stan engines. Are they to Stan or to the optional Stan arguments? It's a little unclear...

Otherwise it's an awesome package!

Thanks,
Zoe

Multidimensions

Hi!
Any perspective about implementing models that allows estimations with more than one single dimension? Many packages in political science have this advantage (OC, IDEAL, MCMCPACK, NOMINATE). It would be great to have this possibility using your package too.
Thanks!

GRM summary error finding item parameters + multiple difficulty parameters?

Hello Robert Kubinec,

I'm using your package to run a dynamic ordinal ideal point model. Note that I'm using the development version of your package. I have two issues to discuss with you:

  1. While trying to access the item discrimination + difficulty parameters with the summary function, I get the error Can't find the following variable(s) in the output: steps_votes .
  2. Why is there only one difficulty parameter per item when graded response models should have multiple difficulty parameters for each item (usually equal to the number of response categories - 1)?

I'll first provide some background on my data and the idealstan code I'm using. Then I'll provide more details on the two aforementioned issues.

My data consists of ordinal likert-type items over four time periods (2011, 2015, 2019, and 2022). Items from the 2011 & 2015 periods have 5 response categories, while items from the 2019 & 2022 periods have 4 response categories. For all items, I'm using model_type = 5, the ordinal IRT (graded response) ideal point model with no missing-data inflation.

Here's my code:

idealstan_object <- id_make(
  score_data = Nat_DAN_IRT_Data_long_GALTAN,
  person_id = "person_id",
  item_id = "VAA_item_questions",
  time_id = "year",
  group_id = "party_abbr",
  model_id = "idealstan_model",
  unbounded = FALSE,
  outcome_disc = "VAA_item_answers",
  ordered_id = "n_responses"
)
DAN_GALTAN_idealstan_output_PREFIX <- id_estimate(
  idealdata = idealstan_object,
  model_type = 5,
  vary_ideal_pts = "random_walk",
  fixtype = "prefix",
  const_type = "items",
  restrict_ind_high = "Alt2022_Q3",
  restrict_ind_low = "Alt2019_Q26",
  ncores = parallel::detectCores(),
  grainsize = 1,
  nchains = 4,
  id_refresh = 10,
  time_var = 0.5, 
  restrict_var = F
)

I'll now provide more information about the aforementioned issues.

Issue 1: Unaccessible Item Parameters.

This is the code I use to access the item parameters:

summary(DAN_GALTAN_idealstan_output_PREFIX, pars = "items")

That code produces the following error: Error: Can't find the following variable(s) in the output: steps_votes

After looking through the code myself, I found that this line of code in the .item_plot_ord_grm function in the Helpers.R file is causing the error:

total_cat <- length(as_draws_df(object@stan_samples$draws('steps_votes')))

I tried to fix the issue myself by modifying that code line and an additional line with the following:

# figure out how many categories we need
## I still don't really know what this is doing. I'm currently interpeting it as the number of unique response categories in the dataframe. I changed it so that it obtains this number from the score_matrix
total_cat <- unique(object@score_data@score_matrix[object@score_data@score_matrix$item_id == param_name,]$ordered_id)

# Obtain the cuts. I modified this significantly despite not being sure if this is how it works. Notice that it subtracts 1 from total_cat. This is because it includes the 'missing' category
cuts <- as_draws_df(object@stan_samples$draws(paste0('steps_votes_grm', total_cat, '[', param_num, ',', 1:(total_cat - 1), ']')))

Did I identify the cause of the error? And do you think that my modifications adequately fixed the problem?

Issue 2: Too-Few Difficulty Parameters

Secondly, it seems like the command summary(DAN_GALTAN_idealstan_output_PREFIX, pars = "items") only produces estimates for one difficulty parameter per item. Yet graded response models have multiple difficulty parameters for each ordered response category in an item. Do you know why this is happening? How can I obtain the multiple unique difficulty parameters?

Covariates specific to one person

Thanks for making this great package. I am using it in my PhD thanks to its superior performance over methods like NOMINATE. I think the package was taken off CRAN for some reason but I hope you continue to develop it, because it's a fantastic contribution to the R ecosystem.

My question concerns the use of covariates in the estimation. In your working paper you show an example when covariates affect all legislators in the Congress. I was wondering whether you would have any advice for a situation where I need to include covariates just for one of the "persons" in the data (binary response). A set of independent variables - some binary, some continuous, including interactions - affects the "votes" of only this one person, while the rest are unaffected by any variables.

Would you recommend to add a dummy variable for the person of interest and interact it with every covariate? Or perhaps is it better to set the variables of all unaffected persons to the mean? I am new to Bayesian inference and am not 100% sure whether there is a recommended way of doing this. Additionally, can I still meaningfully use id_plot_cov when I only want to see the marginal effects on one person's ideal point (in which case the liberal/conservative distinction is irrelevant)?

Thanks again for all your great work on this package.

Ordinal IRT not running

Hi Robert,
As I said, I´m trying to write a replication code for me article. Now the issue is that Ordinal IRT is not running even with simulated data.
Here´s the code and result

library(idealstan)

fake_data <- id_sim_gen(20, 50, "ordinal_grm")
Warning message:
Unknown levels in `f`: Missing

estimates <- id_estimate(fake_data,
                          model_type = 5, #6 is not working too
                          use_vb = T,
                          fixtype='vb_full',
                          vary_ideal_pts='random_walk',
                          seed=84520,
                          refresh=0,
                          restrict_var = F)

[1] "Compiling model. Will take some time as this is the first time package is used."
[1] "Have you thought about donating to relief for victims for Yemen's famine?"
[1] "Check out https://www.unicef.org/emergencies/yemen-crisis for more info."
Model executable is up to date!
Model executable is up to date!
[1] "(First Step): Estimating model with variational inference to identify modes to constrain."
Error: Duplicate names not allowed in 'data'.
In addition: Warning message:
In max(Y_cont) : no non-missing arguments to max; returning -Inf

I get the same error using simulated data or my own.

Thanks in advance

Installation problem - rlang?

Hi Robert,
Thanks for updating this excelent package!
I just had an article accepted for publication using your package. Preparing the code for replication, I updated the package and now I'm having problems. It looks like you use the "parse_quosure" function from the rlang package during the installation process, but in newer versions this function no longer exists. I tried installing version 0.4.12 of the rlang package, but some other package you use requires the latest version.

Here is the console output :

remotes::install_github('saudiwin/idealstan',build_vignette=TRUE)
Downloading GitHub repo saudiwin/idealstan@HEAD
√  checking for file 'C:\Users\rodri\AppData\Local\Temp\Rtmpkn1eWw\remotes3b644e227126\saudiwin-idealstan-c629bf9/DESCRIPTION' (1.1s)
-  preparing 'idealstan':
√  checking DESCRIPTION meta-information ... 
-  installing the package to build vignettes
         -----------------------------------
-  installing *source* package 'idealstan' ...
   ** using staged installation
   ** R
   ** data
   *** moving datasets to lazyload DB
   ** inst
   ** byte-compile and prepare package for lazy loading
   Warning: replacing previous import 'bayesplot::rhat' by 'posterior::rhat' when loading 'idealstan'
   Error: 'parse_quosure' is not an exported object from 'namespace:rlang'
   Execution halted
   ERROR: lazy loading failed for package 'idealstan'
-  removing 'C:/Users/rodri/AppData/Local/Temp/RtmpIRCHPJ/Rinst2be467361157/idealstan'
         -----------------------------------
   ERROR: package installation failed
Error: Failed to install 'idealstan' from GitHub:
  System command 'Rcmd.exe' failed, exit status: 1, stdout & stderr were printed

Thanks in advance!

Installing problem

Hi, I'm trying to install idealstan on R 4.0.0 64-bit Windows. I'm getting an error when trying to install it, though.

`> devtools::install_github('saudiwin/idealstan',local=F)
Downloading GitHub repo saudiwin/idealstan@master
√  checking for file 'C:\Users\Rodrigo\AppData\Local\Temp\RtmpSUhkfM\remotes55ac315873f6\saudiwin-idealstan-7bf90f3/DESCRIPTION' (777ms)
-  preparing 'idealstan':
√  checking DESCRIPTION meta-information ... 
-  cleaning src
-  excluding invalid files (1.8s)
   Subdirectory 'R' contains invalid file names:
     'Time_Series.html.asis'
-  checking for LF line-endings in source and make files and shell scripts
-  checking for empty or unneeded directories
-  building 'idealstan_0.7.2.tar.gz'
   
Installing package into ‘C:/Users/Rodrigo/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
* installing *source* package 'idealstan' ...
** using staged installation
** libs

*** arch - i386
"C:/PROGRA~1/R/R-40~1.0/bin/i386/Rscript" -e "source(file.path('..', 'tools', 'make_cc.R')); make_cc(commandArgs(TRUE))" stan_files/irt_standard.stan
DIAGNOSTIC(S) FROM PARSER:
Info: integer division implicitly rounds to integer. Found int division: i - 1 / 2
 Positive values rounded down, negative values rounded up or down in platform-dependent way.
Info:
Left-hand side of sampling statement (~) may contain a non-linear transform of a parameter or local variable.
If it does, you need to include a target += statement with the log absolute determinant of the Jacobian of the transform.
Left-hand-side of sampling statement:
    L_tp1[[restrict_mean_ind[1], restrict_mean_ind[2]]] - L_tp1[[restrict_mean_ind[5], restrict_mean_ind[6]]] ~ normal(...)
Info:
Left-hand side of sampling statement (~) may contain a non-linear transform of a parameter or local variable.
If it does, you need to include a target += statement with the log absolute determinant of the Jacobian of the transform.
Left-hand-side of sampling statement:
    L_tp1[[restrict_mean_ind[3], restrict_mean_ind[4]]] - L_tp1[[restrict_mean_ind[7], restrict_mean_ind[8]]] ~ normal(...)

Wrote C++ file "stan_files/irt_standard.cc"


C:/Rtools/mingw_32/bin/g++  -std=gnu++14 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I"../inst/include" -I"C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/BH/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/Rcpp/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/RcppEigen/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c stan_files/irt_standard.cc -o stan_files/irt_standard.o
In file included from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/prob/poisson_log_glm_log.hpp:5:0,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat.hpp:336,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/mat.hpp:12,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/log_prob_grad.hpp:4,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/test_gradients.hpp:7,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/services/diagnose/diagnose.hpp:10,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/stan_fit.hpp:35,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/rstaninc.hpp:3,
                 from stan_files/irt_standard.hpp:18,
                 from stan_files/irt_standard.cc:3:
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/prob/poisson_log_glm_lpmf.hpp: In function 'typename stan::return_type<T_x, T_alpha, T_beta>::type stan::math::poisson_log_glm_lpmf(const T_y&, const T_x&, const T_alpha&, const T_beta&)':
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/prob/poisson_log_glm_lpmf.hpp:64:59: warning: typedef 'T_alpha_val' locally defined but not used [-Wunused-local-typedefs]
       typename partials_return_type<T_alpha>::type>::type T_alpha_val;
                                                           ^
In file included from stan_files/irt_standard.cc:3:0:
stan_files/irt_standard.hpp: In member function 'void model_irt_standard_namespace::model_irt_standard::transform_inits(const stan::io::var_context&, std::vector<int>&, std::vector<double>&, std::ostream*) const':
stan_files/irt_standard.hpp:1376:24: warning: typedef 'local_scalar_t__' locally defined but not used [-Wunused-local-typedefs]
         typedef double local_scalar_t__;
                        ^
In file included from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/core.hpp:45:0,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/mat.hpp:4,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/log_prob_grad.hpp:4,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/test_gradients.hpp:7,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/services/diagnose/diagnose.hpp:10,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/stan_fit.hpp:35,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/rstaninc.hpp:3,
                 from stan_files/irt_standard.hpp:18,
                 from stan_files/irt_standard.cc:3:
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/core/set_zero_all_adjoints.hpp: At global scope:
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/core/set_zero_all_adjoints.hpp:14:13: warning: 'void stan::math::set_zero_all_adjoints()' defined but not used [-Wunused-function]
 static void set_zero_all_adjoints() {
             ^
"C:/PROGRA~1/R/R-40~1.0/bin/i386/Rscript" -e "source(file.path('..', 'tools', 'make_cc.R')); make_cc(commandArgs(TRUE))" stan_files/irt_standard_noid.stan
DIAGNOSTIC(S) FROM PARSER:
Info: integer division implicitly rounds to integer. Found int division: i - 1 / 2
 Positive values rounded down, negative values rounded up or down in platform-dependent way.

Wrote C++ file "stan_files/irt_standard_noid.cc"


C:/Rtools/mingw_32/bin/g++  -std=gnu++14 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I"../inst/include" -I"C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/BH/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/Rcpp/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/RcppEigen/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c stan_files/irt_standard_noid.cc -o stan_files/irt_standard_noid.o
In file included from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/prob/poisson_log_glm_log.hpp:5:0,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat.hpp:336,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/mat.hpp:12,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/log_prob_grad.hpp:4,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/test_gradients.hpp:7,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/services/diagnose/diagnose.hpp:10,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/stan_fit.hpp:35,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/rstaninc.hpp:3,
                 from stan_files/irt_standard_noid.hpp:18,
                 from stan_files/irt_standard_noid.cc:3:
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/prob/poisson_log_glm_lpmf.hpp: In function 'typename stan::return_type<T_x, T_alpha, T_beta>::type stan::math::poisson_log_glm_lpmf(const T_y&, const T_x&, const T_alpha&, const T_beta&)':
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/prob/poisson_log_glm_lpmf.hpp:64:59: warning: typedef 'T_alpha_val' locally defined but not used [-Wunused-local-typedefs]
       typename partials_return_type<T_alpha>::type>::type T_alpha_val;
                                                           ^
In file included from stan_files/irt_standard_noid.cc:3:0:
stan_files/irt_standard_noid.hpp: In member function 'void model_irt_standard_noid_namespace::model_irt_standard_noid::transform_inits(const stan::io::var_context&, std::vector<int>&, std::vector<double>&, std::ostream*) const':
stan_files/irt_standard_noid.hpp:1202:24: warning: typedef 'local_scalar_t__' locally defined but not used [-Wunused-local-typedefs]
         typedef double local_scalar_t__;
                        ^
In file included from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/core.hpp:45:0,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/mat.hpp:4,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/log_prob_grad.hpp:4,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/test_gradients.hpp:7,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/services/diagnose/diagnose.hpp:10,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/stan_fit.hpp:35,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/rstaninc.hpp:3,
                 from stan_files/irt_standard_noid.hpp:18,
                 from stan_files/irt_standard_noid.cc:3:
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/core/set_zero_all_adjoints.hpp: At global scope:
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/core/set_zero_all_adjoints.hpp:14:13: warning: 'void stan::math::set_zero_all_adjoints()' defined but not used [-Wunused-function]
 static void set_zero_all_adjoints() {
             ^
"C:/PROGRA~1/R/R-40~1.0/bin/i386/Rscript" -e "source(file.path('..', 'tools', 'make_cc.R')); make_cc(commandArgs(TRUE))" stan_files/sim_gp.stan
Wrote C++ file "stan_files/sim_gp.cc"


C:/Rtools/mingw_32/bin/g++  -std=gnu++14 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I"../inst/include" -I"C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/BH/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/Rcpp/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/RcppEigen/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c stan_files/sim_gp.cc -o stan_files/sim_gp.o
In file included from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/prob/poisson_log_glm_log.hpp:5:0,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat.hpp:336,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/mat.hpp:12,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/log_prob_grad.hpp:4,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/test_gradients.hpp:7,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/services/diagnose/diagnose.hpp:10,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/stan_fit.hpp:35,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/rstaninc.hpp:3,
                 from stan_files/sim_gp.hpp:18,
                 from stan_files/sim_gp.cc:3:
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/prob/poisson_log_glm_lpmf.hpp: In function 'typename stan::return_type<T_x, T_alpha, T_beta>::type stan::math::poisson_log_glm_lpmf(const T_y&, const T_x&, const T_alpha&, const T_beta&)':
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/prob/poisson_log_glm_lpmf.hpp:64:59: warning: typedef 'T_alpha_val' locally defined but not used [-Wunused-local-typedefs]
       typename partials_return_type<T_alpha>::type>::type T_alpha_val;
                                                           ^
In file included from stan_files/sim_gp.cc:3:0:
stan_files/sim_gp.hpp: In member function 'void model_sim_gp_namespace::model_sim_gp::transform_inits(const stan::io::var_context&, std::vector<int>&, std::vector<double>&, std::ostream*) const':
stan_files/sim_gp.hpp:199:24: warning: typedef 'local_scalar_t__' locally defined but not used [-Wunused-local-typedefs]
         typedef double local_scalar_t__;
                        ^
In file included from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/core.hpp:45:0,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/mat.hpp:4,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/log_prob_grad.hpp:4,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/test_gradients.hpp:7,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/services/diagnose/diagnose.hpp:10,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/stan_fit.hpp:35,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/rstaninc.hpp:3,
                 from stan_files/sim_gp.hpp:18,
                 from stan_files/sim_gp.cc:3:
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/core/set_zero_all_adjoints.hpp: At global scope:
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/core/set_zero_all_adjoints.hpp:14:13: warning: 'void stan::math::set_zero_all_adjoints()' defined but not used [-Wunused-function]
 static void set_zero_all_adjoints() {
             ^


C:/Rtools/mingw_32/bin/g++  -std=gnu++14 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I"../inst/include" -I"C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/BH/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/Rcpp/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/RcppEigen/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c init.cpp -o init.o
C:/Rtools/mingw_32/bin/g++ -shared -s -static-libgcc -o idealstan.dll tmp.def stan_files/irt_standard.o stan_files/irt_standard_noid.o stan_files/sim_gp.o init.o -LC:/PROGRA~1/R/R-40~1.0/bin/i386 -lR
rm stan_files/irt_standard_noid.cc stan_files/sim_gp.cc stan_files/irt_standard.cc
installing to C:/Users/Rodrigo/Documents/R/win-library/4.0/00LOCK-idealstan/00new/idealstan/libs/i386

*** arch - x64
"C:/PROGRA~1/R/R-40~1.0/bin/x64/Rscript" -e "source(file.path('..', 'tools', 'make_cc.R')); make_cc(commandArgs(TRUE))" stan_files/irt_standard.stan
DIAGNOSTIC(S) FROM PARSER:
Info: integer division implicitly rounds to integer. Found int division: i - 1 / 2
 Positive values rounded down, negative values rounded up or down in platform-dependent way.
Info:
Left-hand side of sampling statement (~) may contain a non-linear transform of a parameter or local variable.
If it does, you need to include a target += statement with the log absolute determinant of the Jacobian of the transform.
Left-hand-side of sampling statement:
    L_tp1[[restrict_mean_ind[1], restrict_mean_ind[2]]] - L_tp1[[restrict_mean_ind[5], restrict_mean_ind[6]]] ~ normal(...)
Info:
Left-hand side of sampling statement (~) may contain a non-linear transform of a parameter or local variable.
If it does, you need to include a target += statement with the log absolute determinant of the Jacobian of the transform.
Left-hand-side of sampling statement:
    L_tp1[[restrict_mean_ind[3], restrict_mean_ind[4]]] - L_tp1[[restrict_mean_ind[7], restrict_mean_ind[8]]] ~ normal(...)

Wrote C++ file "stan_files/irt_standard.cc"


C:/Rtools/mingw_64/bin/g++  -std=gnu++14 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I"../inst/include" -I"C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/BH/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/Rcpp/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/RcppEigen/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c stan_files/irt_standard.cc -o stan_files/irt_standard.o
In file included from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/prob/poisson_log_glm_log.hpp:5:0,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat.hpp:336,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/mat.hpp:12,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/log_prob_grad.hpp:4,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/test_gradients.hpp:7,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/services/diagnose/diagnose.hpp:10,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/stan_fit.hpp:35,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/rstaninc.hpp:3,
                 from stan_files/irt_standard.hpp:18,
                 from stan_files/irt_standard.cc:3:
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/prob/poisson_log_glm_lpmf.hpp: In function 'typename stan::return_type<T_x, T_alpha, T_beta>::type stan::math::poisson_log_glm_lpmf(const T_y&, const T_x&, const T_alpha&, const T_beta&)':
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/prob/poisson_log_glm_lpmf.hpp:64:59: warning: typedef 'T_alpha_val' locally defined but not used [-Wunused-local-typedefs]
       typename partials_return_type<T_alpha>::type>::type T_alpha_val;
                                                           ^
In file included from stan_files/irt_standard.cc:3:0:
stan_files/irt_standard.hpp: In member function 'void model_irt_standard_namespace::model_irt_standard::transform_inits(const stan::io::var_context&, std::vector<int>&, std::vector<double>&, std::ostream*) const':
stan_files/irt_standard.hpp:1376:24: warning: typedef 'local_scalar_t__' locally defined but not used [-Wunused-local-typedefs]
         typedef double local_scalar_t__;
                        ^
In file included from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/core.hpp:45:0,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/mat.hpp:4,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/log_prob_grad.hpp:4,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/test_gradients.hpp:7,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/services/diagnose/diagnose.hpp:10,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/stan_fit.hpp:35,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/rstaninc.hpp:3,
                 from stan_files/irt_standard.hpp:18,
                 from stan_files/irt_standard.cc:3:
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/core/set_zero_all_adjoints.hpp: At global scope:
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/core/set_zero_all_adjoints.hpp:14:13: warning: 'void stan::math::set_zero_all_adjoints()' defined but not used [-Wunused-function]
 static void set_zero_all_adjoints() {
             ^
"C:/PROGRA~1/R/R-40~1.0/bin/x64/Rscript" -e "source(file.path('..', 'tools', 'make_cc.R')); make_cc(commandArgs(TRUE))" stan_files/irt_standard_noid.stan
DIAGNOSTIC(S) FROM PARSER:
Info: integer division implicitly rounds to integer. Found int division: i - 1 / 2
 Positive values rounded down, negative values rounded up or down in platform-dependent way.

Wrote C++ file "stan_files/irt_standard_noid.cc"


C:/Rtools/mingw_64/bin/g++  -std=gnu++14 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I"../inst/include" -I"C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/BH/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/Rcpp/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/RcppEigen/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c stan_files/irt_standard_noid.cc -o stan_files/irt_standard_noid.o
In file included from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/prob/poisson_log_glm_log.hpp:5:0,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat.hpp:336,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/mat.hpp:12,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/log_prob_grad.hpp:4,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/test_gradients.hpp:7,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/services/diagnose/diagnose.hpp:10,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/stan_fit.hpp:35,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/rstaninc.hpp:3,
                 from stan_files/irt_standard_noid.hpp:18,
                 from stan_files/irt_standard_noid.cc:3:
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/prob/poisson_log_glm_lpmf.hpp: In function 'typename stan::return_type<T_x, T_alpha, T_beta>::type stan::math::poisson_log_glm_lpmf(const T_y&, const T_x&, const T_alpha&, const T_beta&)':
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/prob/poisson_log_glm_lpmf.hpp:64:59: warning: typedef 'T_alpha_val' locally defined but not used [-Wunused-local-typedefs]
       typename partials_return_type<T_alpha>::type>::type T_alpha_val;
                                                           ^
In file included from stan_files/irt_standard_noid.cc:3:0:
stan_files/irt_standard_noid.hpp: In member function 'void model_irt_standard_noid_namespace::model_irt_standard_noid::transform_inits(const stan::io::var_context&, std::vector<int>&, std::vector<double>&, std::ostream*) const':
stan_files/irt_standard_noid.hpp:1202:24: warning: typedef 'local_scalar_t__' locally defined but not used [-Wunused-local-typedefs]
         typedef double local_scalar_t__;
                        ^
In file included from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/core.hpp:45:0,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/mat.hpp:4,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/log_prob_grad.hpp:4,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/test_gradients.hpp:7,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/services/diagnose/diagnose.hpp:10,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/stan_fit.hpp:35,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/rstaninc.hpp:3,
                 from stan_files/irt_standard_noid.hpp:18,
                 from stan_files/irt_standard_noid.cc:3:
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/core/set_zero_all_adjoints.hpp: At global scope:
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/core/set_zero_all_adjoints.hpp:14:13: warning: 'void stan::math::set_zero_all_adjoints()' defined but not used [-Wunused-function]
 static void set_zero_all_adjoints() {
             ^
"C:/PROGRA~1/R/R-40~1.0/bin/x64/Rscript" -e "source(file.path('..', 'tools', 'make_cc.R')); make_cc(commandArgs(TRUE))" stan_files/sim_gp.stan
Wrote C++ file "stan_files/sim_gp.cc"


C:/Rtools/mingw_64/bin/g++  -std=gnu++14 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I"../inst/include" -I"C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/BH/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/Rcpp/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/RcppEigen/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c stan_files/sim_gp.cc -o stan_files/sim_gp.o
In file included from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/prob/poisson_log_glm_log.hpp:5:0,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat.hpp:336,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/mat.hpp:12,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/log_prob_grad.hpp:4,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/test_gradients.hpp:7,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/services/diagnose/diagnose.hpp:10,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/stan_fit.hpp:35,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/rstaninc.hpp:3,
                 from stan_files/sim_gp.hpp:18,
                 from stan_files/sim_gp.cc:3:
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/prob/poisson_log_glm_lpmf.hpp: In function 'typename stan::return_type<T_x, T_alpha, T_beta>::type stan::math::poisson_log_glm_lpmf(const T_y&, const T_x&, const T_alpha&, const T_beta&)':
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/prob/poisson_log_glm_lpmf.hpp:64:59: warning: typedef 'T_alpha_val' locally defined but not used [-Wunused-local-typedefs]
       typename partials_return_type<T_alpha>::type>::type T_alpha_val;
                                                           ^
In file included from stan_files/sim_gp.cc:3:0:
stan_files/sim_gp.hpp: In member function 'void model_sim_gp_namespace::model_sim_gp::transform_inits(const stan::io::var_context&, std::vector<int>&, std::vector<double>&, std::ostream*) const':
stan_files/sim_gp.hpp:199:24: warning: typedef 'local_scalar_t__' locally defined but not used [-Wunused-local-typedefs]
         typedef double local_scalar_t__;
                        ^
In file included from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/core.hpp:45:0,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/mat.hpp:4,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/log_prob_grad.hpp:4,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/model/test_gradients.hpp:7,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src/stan/services/diagnose/diagnose.hpp:10,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/stan_fit.hpp:35,
                 from C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include/rstan/rstaninc.hpp:3,
                 from stan_files/sim_gp.hpp:18,
                 from stan_files/sim_gp.cc:3:
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/core/set_zero_all_adjoints.hpp: At global scope:
C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/stan/math/rev/core/set_zero_all_adjoints.hpp:14:13: warning: 'void stan::math::set_zero_all_adjoints()' defined but not used [-Wunused-function]
 static void set_zero_all_adjoints() {
             ^


C:/Rtools/mingw_64/bin/g++  -std=gnu++14 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I"../inst/include" -I"C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/StanHeaders/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/rstan/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/BH/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/Rcpp/include' -I'C:/Users/Rodrigo/Documents/R/win-library/4.0/RcppEigen/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c init.cpp -o init.o
C:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o idealstan.dll tmp.def stan_files/irt_standard.o stan_files/irt_standard_noid.o stan_files/sim_gp.o init.o -LC:/PROGRA~1/R/R-40~1.0/bin/x64 -lR
rm stan_files/irt_standard_noid.cc stan_files/sim_gp.cc stan_files/irt_standard.cc
installing to C:/Users/Rodrigo/Documents/R/win-library/4.0/00LOCK-idealstan/00new/idealstan/libs/x64
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Creating a new generic function for 'stan_trace' in package 'idealstan'
DIAGNOSTIC(S) FROM PARSER:
Info: integer division implicitly rounds to integer. Found int division: i - 1 / 2
 Positive values rounded down, negative values rounded up or down in platform-dependent way.
Info:
Left-hand side of sampling statement (~) may contain a non-linear transform of a parameter or local variable.
If it does, you need to include a target += statement with the log absolute determinant of the Jacobian of the transform.
Left-hand-side of sampling statement:
    L_tp1[[restrict_mean_ind[1], restrict_mean_ind[2]]] - L_tp1[[restrict_mean_ind[5], restrict_mean_ind[6]]] ~ normal(...)
Info:
Left-hand side of sampling statement (~) may contain a non-linear transform of a parameter or local variable.
If it does, you need to include a target += statement with the log absolute determinant of the Jacobian of the transform.
Left-hand-side of sampling statement:
    L_tp1[[restrict_mean_ind[3], restrict_mean_ind[4]]] - L_tp1[[restrict_mean_ind[7], restrict_mean_ind[8]]] ~ normal(...)

DIAGNOSTIC(S) FROM PARSER:
Info: integer division implicitly rounds to integer. Found int division: i - 1 / 2
 Positive values rounded down, negative values rounded up or down in platform-dependent way.

** help
*** installing help indices
  converting help for package 'idealstan'
    finding HTML links ... done
    delaware                                html  
    derive_chain                            html  
    id_estimate                             html  
    finding level-2 HTML links ... done

Rd warning: C:/Users/Rodrigo/AppData/Local/Temp/RtmpKCWScu/R.INSTALL72c5ea81f6b/idealstan/man/id_estimate.Rd:58: file link 'vb' in package 'rstan' does not exist and so has been treated as a topic
    id_extract-idealstan-method             html  
Rd warning: C:/Users/Rodrigo/AppData/Local/Temp/RtmpKCWScu/R.INSTALL72c5ea81f6b/idealstan/man/id_extract-idealstan-method.Rd:23: file link 'extract' in package 'rstan' does not exist and so has been treated as a topic
Rd warning: C:/Users/Rodrigo/AppData/Local/Temp/RtmpKCWScu/R.INSTALL72c5ea81f6b/idealstan/man/id_extract-idealstan-method.Rd:19: file link 'extract' in package 'rstan' does not exist and so has been treated as a topic
    id_extract                              html  
    id_make                                 html  
    id_plot-idealstan-method                html  
    id_plot                                 html  
    id_plot_all_hist                        html  
    id_plot_compare                         html  
    id_plot_cov                             html  
    id_plot_irf                             html  
    id_plot_legis                           html  
    id_plot_legis_dyn                       html  
    id_plot_legis_var                       html  
    id_plot_ppc-idealstan-method            html  
Rd warning: C:/Users/Rodrigo/AppData/Local/Temp/RtmpKCWScu/R.INSTALL72c5ea81f6b/idealstan/man/id_plot_ppc-idealstan-method.Rd:21: file link 'ppc_bars' in package 'bayesplot' does not exist and so has been treated as a topic
    id_plot_ppc                             html  
Rd warning: C:/Users/Rodrigo/AppData/Local/Temp/RtmpKCWScu/R.INSTALL72c5ea81f6b/idealstan/man/id_plot_ppc.Rd:12: file link 'ppc_bars' in package 'bayesplot' does not exist and so has been treated as a topic
    id_plot_rhats                           html  
    id_plot_sims                            html  
    id_post_pred-idealstan-method           html  
    id_post_pred                            html  
Rd warning: C:/Users/Rodrigo/AppData/Local/Temp/RtmpKCWScu/R.INSTALL72c5ea81f6b/idealstan/man/id_post_pred.Rd:21: file link 'ppc_bars' in package 'bayesplot' does not exist and so has been treated as a topic
    id_sim_coverage                         html  
    id_sim_gen                              html  
    id_sim_resid                            html  
    id_sim_rmse                             html  
    idealdata-class                         html  
    idealstan-class                         html  
    idealstan                               html  
    launch_shinystan-idealstan-method       html  
Rd warning: C:/Users/Rodrigo/AppData/Local/Temp/RtmpKCWScu/R.INSTALL72c5ea81f6b/idealstan/man/launch_shinystan-idealstan-method.Rd:17: file link 'shinystan' in package 'shinystan' does not exist and so has been treated as a topic
Rd warning: C:/Users/Rodrigo/AppData/Local/Temp/RtmpKCWScu/R.INSTALL72c5ea81f6b/idealstan/man/launch_shinystan-idealstan-method.Rd:25: file link 'shinystan' in package 'shinystan' does not exist and so has been treated as a topic
    launch_shinystan                        html  
    release_questions                       html  
    senate114                               html  
    stan_trace-idealstan-method             html  
Rd warning: C:/Users/Rodrigo/AppData/Local/Temp/RtmpKCWScu/R.INSTALL72c5ea81f6b/idealstan/man/stan_trace-idealstan-method.Rd:15: file link 'stan_trace' in package 'rstan' does not exist and so has been treated as a topic
Rd warning: C:/Users/Rodrigo/AppData/Local/Temp/RtmpKCWScu/R.INSTALL72c5ea81f6b/idealstan/man/stan_trace-idealstan-method.Rd:29: file link 'stan_trace' in package 'rstan' does not exist and so has been treated as a topic
    stan_trace                              html  
Rd warning: C:/Users/Rodrigo/AppData/Local/Temp/RtmpKCWScu/R.INSTALL72c5ea81f6b/idealstan/man/stan_trace.Rd:12: file link 'stan_trace' in package 'rstan' does not exist and so has been treated as a topic
Rd warning: C:/Users/Rodrigo/AppData/Local/Temp/RtmpKCWScu/R.INSTALL72c5ea81f6b/idealstan/man/stan_trace.Rd:26: file link 'stan_trace' in package 'rstan' does not exist and so has been treated as a topic
    summary-idealstan-method                html  
Rd warning: C:/Users/Rodrigo/AppData/Local/Temp/RtmpKCWScu/R.INSTALL72c5ea81f6b/idealstan/man/summary-idealstan-method.Rd:28: file link 'tibble' in package 'dplyr' does not exist and so has been treated as a topic
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
ERROR: loading failed for 'i386', 'x64'
* removing 'C:/Users/Rodrigo/Documents/R/win-library/4.0/idealstan'
Error: Failed to install 'idealstan' from GitHub:
  (converted from warning) installation of package ‘C:/Users/Rodrigo/AppData/Local/Temp/RtmpSUhkfM/file55ac3fb730d2/idealstan_0.7.2.tar.gz’ had non-zero exit status
Warning message:
1 components of `...` were not used.

We detected these problematic arguments:
* `local`

Did you misspecify an argument? `

Installation errors

Hi, I'm trying to install idealstan on R 3.6.0 64-bit Windows. I'm getting an error when trying to install it, though. RStudio is being run with administrative privileges.

> devtools::install_github('saudiwin/idealstan',local=F)
Downloading GitHub repo saudiwin/idealstan@master
Installing 1 packages: gghighlight
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/gghighlight_0.1.0.zip'
Content type 'application/zip' length 643482 bytes (628 KB)
downloaded 628 KB

package ‘gghighlight’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\boris\AppData\Local\Temp\RtmpoLz7Mg\downloaded_packages
√  checking for file 'C:\Users\boris\AppData\Local\Temp\RtmpoLz7Mg\remotes1eb0643f52f7\saudiwin-idealstan-1e10b26/DESCRIPTION' ...
-  preparing 'idealstan': (569ms)
√  checking DESCRIPTION meta-information ... 
-  cleaning src
-  excluding invalid files (446ms)
   Subdirectory 'R' contains invalid file names:
     'Time_Series.html.asis'
-  checking for LF line-endings in source and make files and shell scripts
-  checking for empty or unneeded directories
-  looking to see if a 'data/datalist' file should be added
-  building 'idealstan_0.7.1.tar.gz'
   
* installing *source* package 'idealstan' ...
** using staged installation
** libs
Error in .shlib_internal(args) : 
  C++14 standard requested but CXX14 is not defined
* removing 'C:/Programs/R/R-3.6.0/library/idealstan'
Error in i.p(...) : 
  (converted from warning) installation of package ‘C:/Users/boris/AppData/Local/Temp/RtmpoLz7Mg/file1eb046787d07/idealstan_0.7.1.tar.gz’ had non-zero exit status

I think this might be related to some Stan compilation changes I vaguely read about with idealstan.

Thanks for any suggestions!

could not find function "run_id"

Any idea what's going on here?

ideal_votes <- id_make(score_data = votes_long,
        outcome = "Rank",
        person_id = "voterID",
        item_id = "Candidate",
        high_val = 1,
        low_val = 26,
        miss_val = ""
        )
 
 
 
votes_model <- id_estimate(idealdata= ideal_votes,
                            model_type=3,
                            fixtype='vb',
                            auto_id = F,
                            use_vb=T)

Error in run_id(object = object, this_data = this_data, nfix = nfix, restrict_ind_high = restrict_ind_high, :
could not find function "run_id"

Generalized Graded Unfolding Model

Good evening,

Any perspective on implementing generalized graded unfolding model (GGUM; Roberts, Donoghue, & Laughlin, 2000)? Many response data in political science can benefit from fitting that. It would be great to have this model in your package too.

Thanks!

Error running id_estimate()

Hi,

Running id_estimate() consistently returns the following error message:
mingw32-make.exe: *** [make/program:14: src/cmdstan/main_threads_opencl.o] Error 1

Any suggestions for how to solve this error?

Can't install because of deprecated function "rlang::parse_quosure"

Hi there,

I'm trying to install the package and it keeps failing due to this error "Error: object 'parse_quosure' is not exported by 'namespace:rlang'" I think this is because 'parse_quosure' was deprecated and now the function 'parse_quo' should be used (see https://www.rdocumentation.org/packages/rlang/versions/0.2.2/topics/parse_quosure). I imagine this should be a relatively easy fix.

Update: I just checked the R files for the package, and I think in idealstan/R/Plot.R on line 47 and 341 is where the import is incorrect. I'm forking the repository now to test to see if the change fixes the problem.

Thanks!

Multivariate mixed response feature?

First, thank you taking the time and effort into making this package. This is going to be an amazing addition to the survey analysis my company performs.

Second, our data is often composed of many different response types, is it on the roadmap to combine different response types into one model? (For example, say there was another outcome variable for the senate data where there were a number of Likert scale questions the senators answered regarding how import a number of issues are. Will it be possible, in the future, to include this into one model as:

senate_data <- id_make(senate114,
                       outcome = c('cast_code', 'some_ordinal_response'),
                       person_id = 'bioname',
                       item_id = 'rollnumber',
                       group_id= 'party_code',
                       time_id='date',
                       miss_val='Absent')
id_estimate(senate_data,
                model_type = c(1, 3),
                 use_vb = T,
                fixtype='vb_partial',
                 restrict_ind_high = "WARREN, Elizabeth",
                 restrict_ind_low="BARRASSO, John A.",
            seed=84520)

Also, please let me know if this would be better posted on Stan discourse.

Function for extracting parameters

I think a low-hanging feature would be to include a simple(r) function for extracting the estimated parameters (and/or improve documentation). For example, it took me a while to figure out how to access the discrimination parameters (perhaps an oversight on my part), which I do in this rather inelegant way (for a basic logistic model):

summary(object, pars = "items") %>% filter(Predicted Outcome!="Missing", str_detect(Parameter,"reg"))

I don't know if you are currently overhauling how the internal data frames are set up but if not, then at least a simple wrapper around this code would be helpful. I would suggest just one function, something like id_extract_param with argument param one of alpha, beta or gamma, because these are the primary quantities of interest for anyone using the model. I would also bring in line the notation in the code with the paper, because it's quite difficult to navigate right now. Perhaps just more documentation overall would help.

How to use 2PL & GRM on different items in same model?

Hi Robert Kubinec,

My apologies for all the questions. I'm very excited to use your idealstan package, though I'm having some issues and the package's current documentation doesn't offer a solution. Note again that I'm using the development version of your package.

I'm trying to run another dynamic ideal point model with random-walk priors on a dataset with both binary and ordinal items. I've used two modeling configurations so far, though both didn't run correctly through the package.

Here is example data that you can use to replicate the issues:
idealstan_GithubExampleData_FIN_subset.csv

Attempt 1: using both 2PL and GRM

First, I tried to assign different models to different items:

  • Binary items: IRT 2-PL (binary response) ideal point model + no missing-data inflation (model_type == 1).
  • Ordinal items: ordinal IRT (graded response ) ideal point model + no missing-data inflation (model_type == 5).

I passed this model information to idealstan through the id_make function's model_id argument. Here's the model_id and id_estimate functions I ran to get these results:

idealstan_object <- id_make(
  score_data = idealstan_GithubExampleData_FIN_subset,
  person_id = "person_id",
  item_id = "item_id",
  time_id = "time_id",
  group_id = "group_id",
  model_id = "model_id_2PL_GRM",
  unbounded = FALSE,
  outcome_disc = "outcome_disc",
  ordered_id = "ordered_id"
)

#Specify `idealstan` model with random-walk prior and PRE-FIXED CONSTANTS:
idealstan_output_PREFIX <- id_estimate(
  idealdata = idealstan_object,
  vary_ideal_pts = "random_walk",
  fixtype = "prefix",
  const_type = "items",
  restrict_ind_high = "104",
  restrict_ind_low = "108",
  ncores = parallel::detectCores(),
  grainsize = 1,
  nchains = 4,
  id_refresh = 10,
  time_var = 1, #Default=10. Lower values = LESS conservative prior.
  restrict_var = F
)

#Estimate item parameters:
items_summary <- summary(idealstan_output_PREFIX, pars = "items")

Unfortunately, this model produced the following error:

Warning: Chain 4 finished unexpectedly!
Warning: All chains finished unexpectedly! Use the $output(chain_id) method for more information.
Warning: Use read_cmdstan_csv() to read the results of the failed chains.
Warning: No chains finished successfully. Unable to retrieve the fit.
Error: No chains finished successfully. Unable to retrieve the draws.

I could not produce a different outcome if I tried to use more than one model.

Attempt 2: using GRM only.

Second, I tried to estimate all items---both binary and ordinal items---using the same IRT model: the graded response model (model_type == 5). I did this because, for binary items, the graded response model is mathematically equivalent to the 2PL model.

The model ran without issue. However, when I tried to estimate the item's IRT parameters, I got the following error: Error: Can't find the following variable(s) in the output: steps_votes_grm2[2,1]. I don't think your package currently allows binary items to be estimated using GRM.

Here's the code I used to run that model:

idealstan_object <- id_make(
  score_data = idealstan_GithubExampleData_FIN_subset,
  person_id = "person_id",
  item_id = "item_id",
  time_id = "time_id",
  group_id = "group_id",
  model_id = "model_id_GRM",
  unbounded = FALSE,
  outcome_disc = "outcome_disc",
  ordered_id = "ordered_id"
)

#Specify idealstan model with random-walk prior and PRE-FIXED CONSTANTS:
idealstan_output_PREFIX <- id_estimate(
  idealdata = idealstan_object,
  model_type = 5,
  vary_ideal_pts = "random_walk",
  fixtype = "prefix",
  const_type = "items",
  restrict_ind_high = "104",
  restrict_ind_low = "108",
  ncores = parallel::detectCores(),
  grainsize = 1,
  nchains = 4,
  id_refresh = 10,
  time_var = 1, #Default=10. Lower values = LESS conservative prior.
  restrict_var = F
)

#Estimate item parameters:
items_summary <- summary(idealstan_output_PREFIX, pars = "items")

Again, this produced the error:

Error: Can't find the following variable(s) in the output: steps_votes_grm2[2,1]

Duplicate names error with example in vignette

Hi, I'm having a bit of trouble getting the first example in the vignette to work for me. Specifically, I get a "Duplicate names not allowed in 'data'." error. I'm using cmdstan-2.31.0, if that helps. I also get
I've attached the code and error output below.

library(idealstan) 
ord_ideal_sim <- id_sim_gen(model='ordinal_grm', inflate = T) 

 
true_legis <- ord_ideal_sim@simul_data$true_person 
high_leg <- sort(true_legis,decreasing = TRUE,index.return=TRUE) 
low_leg <- sort(true_legis,index.return=TRUE) 
 
ord_ideal_est <- id_estimate(idealdata=ord_ideal_sim, 
                             model_type=6, 
                             fixtype='prefix', 
                             restrict_ind_high = as.character(high_leg$ix[1]), 
                             restrict_ind_low=as.character(low_leg$ix[1]), 
                             id_refresh=500, 
                             ncores=1, 
                             nchains=2)                                                                          
[1] "Compiling model. Will take some time as this is the first time package is used."
[1] "Have you thought about donating to relief for victims for Yemen's famine?"
[1] "Check out https://www.unicef.org/emergencies/yemen-crisis for more info."
Model executable is up to date!
[1] "Estimating model with full Stan MCMC sampler."
Error: Duplicate names not allowed in 'data'.
In addition: Warning messages:
1: In max(Y_cont) : no non-missing arguments to max; returning -Inf
2: In max(Y_cont) : no non-missing arguments to max; returning -Inf

Outdated Syntax Error

Hello,

I get an error after running the following code:

# Specify `idealstan` model with random-walk prior:
idealstan_output2 <- id_estimate(
  idealdata = idealstan_object,
  vary_ideal_pts = "random_walk",
  fixtype = "prefix",
  use_vb = F,
  const_type = "items",
  restrict_ind_high = "Alt2022_Q3",
  restrict_ind_low = "Alt2019_Q26",
  ncores = 8,
  grainsize = 1,
  nchains = 3,
  niters = 5000,
  id_refresh = 5000,
  warmup = 5000,
  time_fix_sd = 0.1
)

This is the error text:

[1] "Compiling model. Will take some time as this is the first time package is used."
[1] "Have you thought about donating to relief for victims for Yemen's famine?"
[1] "Check out https://www.unicef.org/emergencies/yemen-crisis for more info."
Compiling Stan program...
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 625, column 4: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 624, column 4: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 568, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 559, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 558, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 557, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/
Rtmp4myCHc/model-32b0700b5bf4.stan', line 556, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 555, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 554, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 553, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 552, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 535, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 43
7, column 1: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 420, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 413, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 411, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyw
ord before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 390, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 389, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 388, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 387, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 380, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 379, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    change
d automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 378, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 377, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 363, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 362, column 2: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 293, column 10: Declaration
    of arrays by placing brackets after a variable name was removed in Stan
    2.33.0. Instead use the array keyword before the type. This can be
    changed automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 109, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc

Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 106, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 101, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 98, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 97, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 96, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 95, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 94, column 8: D
eclaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 93, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 92, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 91, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 75, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 46, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 45, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use 
the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 44, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 41, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 40, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 39, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 38, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 37, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to 
stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 36, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 29, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 28, column 8: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 22, column 17: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 10, column 17: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/R/win-library/4.3/idealstan/stan_files//chunks/calc_rlnorm_gp.stan', line 6, column 23, included from
'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 7, column 0: Declaration
    of arrays by placing brackets after a type was removed in Stan 2.33.0.
    Instead use the array keyword before the type. This can be changed
    automatically 
using the auto-format flag to stanc
Error in 'C:/Users/edwar/AppData/Local/R/win-library/4.3/idealstan/stan_files//chunks/calc_rlnorm_gp.stan', line 13, column 25, included from
'C:/Users/edwar/AppData/Local/Temp/Rtmp4myCHc/model-32b0700b5bf4.stan', line 7, column 0: fabs
    was removed in Stan 2.33. Use abs instead. This can be automatically
    changed using the canonicalize flag for stanc
mingw32-make: *** [make/program:50: C:\Users\edwar\AppData\Local\Temp\Rtmp4myCHc\model-32b0700b5bf4.hpp] Error 65

Error: An error occured during compilation! See the message above for more information. 
To fix deprecated or removed syntax please see ?cmdstanr::format for an example.

I'm using the master branch version of idealstan. I'm also using the most up-to-date packages:

  • cmdstanr, version 0.6.1.9000.
  • idealstan, version 0.99.
  • StanHeaders, version 2.32.2.
  • rstan, version 2.32.3.

Any idea what's going on?

Seed and ensuring replicability

In my experience re-running identical models can yield slightly different results even when seed is specified in id_estimate (as well as an overall set.seed). Has anyone else experienced this as well? Is the behaviour inherent in the Stan code?

Even though the differences are not dramatic, some journals might take issue with results that are not 100% replicable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.