GithubHelp home page GithubHelp logo

jacob-long / dpm Goto Github PK

View Code? Open in Web Editor NEW
15.0 3.0 8.0 319 KB

R package for fitting dynamic panel models with maximum likelihood

Home Page: https://dpm.jacob-long.com

License: Other

R 100.00%
r r-package social-science statistics

dpm's People

Contributors

jacob-long avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

dpm's Issues

dpm with list of multiply imputed dataframes

Hi (sorry but to preface I have not written a github issue before): I have some imputed dataframes in a list and I'd like to run dpm over them with:

dpm.pidideo.news.out <- lapply(a.out.list, function(x){ dpm(newsideoattn2 ~ lag(pidideo), data = x)})

But I get the error:
Error: Can't convert NULL to a string
Backtrace:

  1. base::lapply(...)
  2. global::FUN(X[[i]], ...)
  3. dpm::dpm(newsideoattn2 ~ lag(pidideo), data = x)
  4. rlang::as_name(enexpr(id))
  5. rlang::as_string(x)
  6. rlang:::abort_coercion(x, "a string")

Do you know why this might be or how I can use dpm with multiply imputed dataframes generally? This same setup works with plm.
Thank you for your time.

Sam

Edit:
Nevermind I figured out that making the dataframes into panel_data and assigning id and waves resolved the issue. I'm not sure how to delete this comment. Thank you for your time and work in producing such useful packages.

Pooling model results from multiply imputed dataframes

Hi Prof. Long,
I'm looking to pool dpm results from many multiply imputed datasets. I have created a list of type "S4(dpm;;dpm)" objects using the lapply function in conjunction with the dpm call. The issue is that I cannot use summary(pool("list of S4 objects")) like I normally can with a list of lavaan outputs. When I use mice::pool on the list of dpm model outputs, I receive the error:

"Error: $ operator not defined for this S4 class"

Do you know how I might go about pooling my results using Rubins rules with a list of dpm model outputs?
By the way, thanks again for this excellent package. It's saved me from many opportunities to introduce human errors using lavaan syntax.

Sam

testing for serial correlation in dpm output

Hi, thanks for creating the great package. I was wondering if there is any mechanism via dpm to do post-estimation tests for serial correlation, equivalent to the Arellano–Bond Test of Serial Correlation used in GMM products (e.g. mtest for plm::pgmm

Question About Wave Fixed Effects

Hi Jacob,
Thanks for this excellent package. I was wondering though if dmp allows for the inclusion of wave or time dummy variables, as in a typical two-way fixed effect specification. I tried including the time variable specified in the panel_data argument as an independent variable, but I got the error: 'Error in lav_data_full(data = data, group = group, cluster = cluster, : lavaan ERROR: some variables have no values (only missings) or no variance'.
Many thanks in advance,
Matias

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.