fixedeffects / fixedeffectjlr Goto Github PK
View Code? Open in Web Editor NEWR interface for Fixed Effect Models
License: Other
R interface for Fixed Effect Models
License: Other
Greetings:
Thank you for your work on IFE software. I mostly use Stata for analyses so my R skills are rather basic. I have no experience with Julia.
I am unable to run the FixedEffectInteract()
example and also had to modify the setup to get the FixedEffects()
example to work.
(1) For setup, I had to manually add the following before calling FixedEffect_setup()
to make it work
IFE_examples.txt
:
JuliaCall::julia_command('import Pkg; Pkg.add("StatsModels"); Pkg.add("DataFrames")')
JuliaCall::julia_command('Pkg.add("Distributions")')
(2) The function did not print out a table for me (please see https://github.com/FixedEffects/FixedEffectjlr#output)
(3) FixedEffectInteract()
fails like so:
ife <- FixedEffectInteract(df, "sales", "price", "state+year", 2, "state", vcov = "robust")
@time reg_res = try regife(df_julia, @model( sales ~ price, ife = ( state+year, 2 ), fe = state, vcov = robust, save = true ), maxiter = 10000 );catch; (augmentdf=0, coefnames=0) end;
IFE regression has failedife
$statistics
[1] NA$dt_augment
[1] NA
I have attached the R code file. Thanks again for your work on this package.
Sincerely,
Zia
Hi, thanks for creating this package! I was trying to call FixedEffectsModels.jl from R and got the following error:
"type RegressionResultFE has no field df_residual
Stacktrace:
[1] getproperty(::Any, ::Symbol) at ./sysimg.jl:18
[2] top-level scope at none:0
"
I think this may occur because FixedEffectsModels changed the interface. Here is a warning message FixedEffectModels.jl/src/RegressionResult.jl
I think replacing df_residual with dof_residual should work, but wanted to get your thoughts.
"
function df_residual(x::AbstractRegressionResult)
Base.depwarn("df_residual is deprecated. Use dof_residual", :Source)
dof_residual(x)
end
"
Possibly an upstream error, but I'm unable to run the example from the README because of an undefined (categorical) variable problem. Reprex below. Any ideas?
FWIW I'm running the latest version of FixedEffectModels.jl (v0.9.0) in Julia itself.
library(FixedEffectjlr)
#> Loading required package: JuliaCall
julia <- JuliaCall::julia_setup()
#> Julia version 1.2.0 at location /opt/julias/julia-1.2.0/bin will be used.
#> Loading setup script for JuliaCall...
#> Finish loading setup script for JuliaCall.
df <- Ecdat::Cigar
reg_res <- FixedEffect(df,
lhs = "sales", rhs = "ndi",
fe = "state + year",
weights = "pop",
vcov = "cluster(state)")
#> Error: Error happens in Julia.
#> UndefVarError: categorical not defined
#> Stacktrace:
#> [1] top-level scope at none:0
#> [2] eval(::Module, ::Any) at ./boot.jl:330
#> [3] eval_string(::String) at /usr/lib/R/library/JuliaCall/julia/setup.jl:195
#> [4] docall(::Ptr{Nothing}) at /usr/lib/R/library/JuliaCall/julia/setup.jl:168
Created on 2019-10-03 by the reprex package (v0.3.0)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.