Coder Social home page Coder Social logo

tlamadon / blm-replicate Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 7.0 1.6 MB

Replication package for Bonhomme Lamadon and Manresa paper, A distributional framework for matched data

R 99.75% Dockerfile 0.25%
econometrics economics estimator labor paper replication

blm-replicate's Introduction

Thibaut Lamadon Github profile

Please see my personal page at lamadon.com.

I will update this page soon!

blm-replicate's People

Contributors

tlamadon avatar

Stargazers

 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

blm-replicate's Issues

I think the downloading of the package relys on a dependency (SDMTools) that is no longer available

Hi! I fail on installing the rblm package, and the console tells me the problem is packages ‘graph’, ‘SDMTools’ are not available.

This was my code:

Activate RTools

writeLines('PATH="${RTOOLS40_HOME}\usr\bin;${PATH}"', con = "~/.Renviron")
Sys.which("make")

Download BLM

require(devtools)
install_github("tlamadon/rblm")

And this is the message I get:
Installing package into ‘C:/Users/Bea/Dropbox/Mi PC (DESKTOP-9IIBU1N)/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
ERROR: dependency 'SDMTools' is not available for package 'rblm'

  • removing 'C:/Users/Bea/Dropbox/Mi PC (DESKTOP-9IIBU1N)/Documents/R/win-library/4.0/rblm'
    Warning messages:
    1: packages ‘graph’, ‘SDMTools’ are not available for this version of R

Thank you :)

Replication time

Dear Professor Lamadon,

I try to replicate this project on a server with 96 cores and 384g RAM but it seems that the function server.static.mixture.estimate.boostrap() will still take me roughly 4-5 days to get the results. Do you think it is normal?

I am not sure whether there will be even longer functions after this super long one. (like server.dynamic.mixture.d2003.boostrap() may also be time-consuming?) Could you please tell me that usually how long it will take to replicate the whole project?

Thanks a lot!!

Best,
Xinyu

packrat fails

sorry :-(

➜  git git clone [email protected]:tlamadon/blm-replicate.git
Cloning into 'blm-replicate'...
remote: Enumerating objects: 122, done.
remote: Counting objects: 100% (122/122), done.
remote: Compressing objects: 100% (84/84), done.
remote: Total 521 (delta 72), reused 82 (delta 38), pack-reused 399
Receiving objects: 100% (521/521), 1.59 MiB | 3.45 MiB/s, done.
Resolving deltas: 100% (311/311), done.
➜  git cd blm-replicate 

➜  blm-replicate git:(master) R

R version 3.5.1 (2018-07-02) -- "Feather Spray"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

Packrat is not installed in the local library -- attempting to bootstrap an installation...
> No source tarball of packrat available locally
> Using user-library packrat (0.4.9.3) to bootstrap this project
Packrat mode on. Using library in directory:
- "~/git/blm-replicate/packrat/lib"
> install.packages("packrat")
Installing package into ‘/Users/florian.oswald/git/blm-replicate/packrat/lib/x86_64-apple-darwin15.6.0/3.5.1’
(as ‘lib’ is unspecified)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  438k  100  438k    0     0   177k      0  0:00:02  0:00:02 --:--:--  177k

The downloaded binary packages are in
	/var/folders/d2/hbd_ncyd6rg7jj25j7d4ht3h0000gp/T//RtmpnnXRbW/downloaded_packages
> source("packrat/init.R") 
Error in !packrat::opts$symlink.system.packages() : invalid argument type
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS  10.14.3

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] C/UTF-8/C/C/C/C

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.5.1 tools_3.5.1    packrat_0.5.0 
> 

I get the same if I erase the repo, re-clone, first install.packages("packrat"), then starting R inside your package.

Dynamic estimation - utils not loaded

server.dynamic.rho.analysis()

INFO [2020-02-26 11:45:19] loading ./tmp/m4-mixt-d2003-groups.dat
Error in lm.wfitnn(XX, YY, weights) : could not find function "lm.wfitnn"
Called from: m4.mini.getvar.stayers.unc2(sdata, rhos[1], rhos[2], rhos[3], 
    as.numeric(weights), diff = diff)> server.dynamic.rho.analysis()

INFO [2020-02-26 11:45:19] loading ./tmp/m4-mixt-d2003-groups.dat
Error in lm.wfitnn(XX, YY, weights) : could not find function "lm.wfitnn"
Called from: m4.mini.getvar.stayers.unc2(sdata, rhos[1], rhos[2], rhos[3], 
    as.numeric(weights), diff = diff)

If I add

source("R/utils.R")

to main R it works fine.

Data Request- Research Student MS Operations Research

Dear Thibaut Lamadon, I am a current research student in MS Operations Research, and find your work extremely interesting. Because I am working on an Econometrics project which topic include many aspects similar to the work you did, I would love to have access to data, and be able to run your code on it. Would it be possible for you to provide me with the access to it, as I already sent a mail to IFAU to request data, but am still waiting a response from them?

Many thanks,

Error in utils.R

The function 'rdim' in utils.R returns an error .

Error in dim(A) <- dd : invalid second argument, must be vector or NULL

Upon quick inspection I think that the issue is that you are giving 'dd' as a list, whereas it might be a vector.

I know I am not the only one to have had the issue, even if it might be related to things changed from the earlier version of R (I guess? I am not an expert by any means).

Writing

dd <- c(...);

instead of

dd <- list(...);

does the trick for me :)

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.