Code Monkey home page Code Monkey logo

conley-se's Introduction

conley-se's People

Contributors

darinchristensen avatar

Stargazers

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

conley-se's Issues

Error encountered when running ConleySEs function

Hi there, I am working with a very large panel dataset and would like to use the ConleySEs function that you've written. However, I'm not sure why I keep getting this error message:

Error in XeeXhC_Lg(cbind(lat, lon), cutoff, X, e, n1, k, kernel, dist_fn) :
matrix multiplication: incompatible matrix dimensions: 1x7 and 1x1085973

Here is the traceback:
6. | stop(structure(list(message = "matrix multiplication: incompatible matrix dimensions: 1x7 and 1x1085973", call = XeeXhC_Lg(cbind(lat, lon), cutoff, X, e, n1, k, kernel, dist_fn), cppstack = NULL), class = c("std::logic_error", "C++Error", "error", "condition")))
5. | XeeXhC_Lg(cbind(lat, lon), cutoff, X, e, n1, k, kernel, dist_fn) at iterate-obs-function.R#29
4. | iterateObs(sub_index = t, type = "spatial", cutoff = dist_cutoff)
3. FUN(X[[i]], ...)
2. | lapply(timeUnique, function(t) iterateObs(sub_index = t, type = "spatial", cutoff = dist_cutoff))

  1. | ConleySEs(reg = m, unit = "stdyrID", time = "year", lat = "lat", lon = "lon", dist_cutoff = 0.05, lag_cutoff = 2, cores = 1, verbose = FALSE)
    -- | --

How to do cross-sectional errors in R?

I'm having trouble using the R code to produce standard errors in a cross section and more generally in cases where one does not include a unit fixed effect.

There's a workaround for the hard-coded requirement of two fixed by simply including a constant as one fixed effect. However, the

" # Renaming variables:
orig_names <- c(unit, time, lat, lon)
new_names <- c("unit", "time", "lat", "lon")
setnames(dt, orig_names, new_names)"

lines produce an error as the "unit" variable is not in the model. Can you recommend a workaround? thanks!

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.