Giter Club home page Giter Club logo

dgo's People

Contributors

cwarshaw avatar devincaughey avatar jamesdunham avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dgo's Issues

Error in !all.equal(dimnames(d_in$ZZ)[[2]], colnames(d_in$XX))

The issue is an unexpected error in shape():

shape(item_data = opinion,
  item_names = "affirmative_action",
  time_name = "year",
  geo_name = "state",
  group_names = c("female", "education"),
  modifier_data = states,
  modifier_names = 'prop_hispanic')

#> Error in !all.equal(dimnames(d_in$ZZ)[[2]], colnames(d_in$XX)) : invalid argument type

A change in PR #25 (v0.2.12) made the column order in model arrays XX and ZZ inconsistent when 1) at least two group_names are specified in an order other than alphabetic and 2) geographic modifier_data is used. Validation leads to a error. The solution is to revert the change.

Priors for DLM coefficients

At present, xi and gamma are drawn from a prior centered on their value in the previous period. This made sense when the DLM did not include theta_bar[t-1] because it implied a prior belief that the coefficients in the cross-sectional model predicting theta_bar[t] were stable over time. But now that theta_bar[t-1] is in there, xi and gamma serve a different purpose: xi[t] now captures CHANGES in average opinion from t-1, and the gammas how these changes differ across groups. Drawing these coefficients from a prior distribution centered at their previous value thus implies that we think that trends in opinion are likely to be stable over time (e.g., if everyone got more liberal last year, they probably did again this year). In some cases this may be reasonable, but in other cases it may impose too much stability. I have a suspicion that this may be related to the fact that our model sometimes estimates an oscillating pattern in opinion (i.e., a delta_tbar less than 0), which may be its way of compensating for the hierarchical model's overly rigid insistence on persistent trends. A comprehensive fix to this problem may involve a fundamental change to the structure of the DLM, but here are two more targeted solutions:
(1) Add an option to stipulate that xi and gamma should be drawn independently in each period even if separate_t = 0.
(2) Add an option to drop XX * gamma[t] entirely after the first period—i.e., no hierarchical model, just a DLM (though keeping xi).

applying multicores problem

When I have more cores (e.g. 8) than chains (e.g. 4), the program only uses 4 (equals to the number of chains) cores. Is it possible to make use of all cores to save time?

how to understand dichotomized issues

Hi there,

I'm doing some similar modeling for a project of mine, and I'm curious how you manage ordered items. It looks like the following function creates indicators from ordered variables

# For item response variables with K ordered levels, make K - 1 indicators for

but I'm just curious how to understand how this reacts with modeling of item parameters. Seems plausible that a set of K-1 indicators might have correlated item parameters between any two levels k and k', but it looks also like you have independent priors for all items. Am I understanding this correctly? I'm curious about how to deal with ordered multichotomous items in my own situation so just wondering how you view this in the broader picture. Thanks!

A way to handle survey weights?

I'm looking to use the dgo package to estimate latent immigration opinion at the state-level using (C)CES and I noticed that there's no straightforward way to incorporate survey weights, perhaps intentionally (as in, not including that ability is a purposeful exclusion). Does this mean that, if I want to include weights, I'll need run the model sans weights, get the Stan code out of resulting object, and then add the weights bit a la this post?

Thanks beforehand!

`poststratify()` should return posterior samples

The current behavior is to return poststratified means. In typical use, we want poststratified means and CIs. To make this straightforward, first allow returning poststratified posterior samples. Then summarize the poststratified posterior.

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.