You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Enhance README with model inspection methods
Added methods to inspect results from the reg() model object and clarified the need for a dataframe in certain functions.
* Bump version from 1.12.0 to 1.12.1
* Fix formatting for code block in README
* Add additional StatsAPI functions to README
* Remove StatsAPI prefix from method calls in README
* Update explanation for predict and residuals functions
* Fix formatting and update notes in README.md
* Revise GPU support section in README
Updated GPU usage instructions in README.
- the vector of coefficients & the covariance matrix (use `coef`, `coefnames`, `vcov` on the output of `reg`)
88
-
- a boolean vector reporting rows used in the estimation
89
-
- a set of scalars (number of observations, the degree of freedoms, r2, etc)
90
-
91
-
Methods such as `predict`, `residuals` are still defined but require to specify a dataframe as a second argument. The problematic size of `lm` and `glm` models in R or Julia is discussed [here](http://www.r-bloggers.com/trimming-the-fat-from-glm-models-in-r/), [here](https://blogs.oracle.com/R/entry/is_the_size_of_your), [here](http://stackoverflow.com/questions/21896265/how-to-minimize-size-of-object-of-class-lm-without-compromising-it-being-passe)[here](http://stackoverflow.com/questions/15260429/is-there-a-way-to-compress-an-lm-class-for-later-prediction) (and for absurd consequences, [here](http://stackoverflow.com/questions/26010742/using-stargazer-with-memory-greedy-glm-objects) and [there](http://stackoverflow.com/questions/22577161/not-enough-ram-to-run-stargazer-the-normal-way)).
92
85
86
+
The model object returned by `reg()` is lightweight. The following methods from `StatsAPI`\ can be used to inspect the results
87
+
```julia
88
+
# Coefficients
89
+
coef(m::FixedEffectModel)
90
+
vcov(m::FixedEffectModel)
91
+
confint(m::FixedEffectModel)
92
+
coefnames(m::FixedEffectModel)
93
+
responsename(m::FixedEffectModel)
94
+
95
+
# Statistics
96
+
nobs(m::FixedEffectModel)
97
+
dof(m::FixedEffectModel)
98
+
dof_residual(m::FixedEffectModel)
99
+
r2(m::FixedEffectModel)
100
+
islinear(m::FixedEffectModel)
101
+
deviance(m::FixedEffectModel)
102
+
nulldeviance(m::FixedEffectModel)
103
+
rss(m::FixedEffectModel)
104
+
mss(m::FixedEffectModel)
105
+
loglikelihood(m::FixedEffectModel)
106
+
nullloglikelihood(m::FixedEffectModel)
107
+
adjr2(m::FixedEffectModel)
108
+
coeftable(m::FixedEffectModel)
109
+
formula(m::FixedEffectModel)
110
+
111
+
# Prediction and residuals
112
+
predict(m::FixedEffectModel, df)
113
+
residuals(m::FixedEffectModel, df)
114
+
```
115
+
Note that the functions `predict` and `residuals` require a table (`df`) as a second argument because the object returned by `reg` does not store the original dataset (to keep the model lightweight). For background on the tradeoff of storing the original data inside fitted model objects, see [1](http://www.r-bloggers.com/trimming-the-fat-from-glm-models-in-r/), [2](https://blogs.oracle.com/R/entry/is_the_size_of_your), [3](http://stackoverflow.com/questions/21896265/how-to-minimize-size-of-object-of-class-lm-without-compromising-it-being-passe), [4](http://stackoverflow.com/questions/15260429/is-there-a-way-to-compress-an-lm-class-for-later-prediction), [5](http://stackoverflow.com/questions/26010742/using-stargazer-with-memory-greedy-glm-objects), and [6](http://stackoverflow.com/questions/22577161/not-enough-ram-to-run-stargazer-the-normal-way).
93
116
94
-
You may use [RegressionTables.jl](https://github.com/jmboehm/RegressionTables.jl) to get publication-quality regression tables.
117
+
Finally, you can use [RegressionTables.jl](https://github.com/jmboehm/RegressionTables.jl) to get publication-quality regression tables.
95
118
96
119
97
120
## Performances
@@ -103,7 +126,6 @@ You may use [RegressionTables.jl](https://github.com/jmboehm/RegressionTables.jl
103
126
The package has an experimental support for GPUs. This can make the package an order of magnitude faster for complicated problems.
104
127
105
128
If you have a Nvidia GPU, run `using CUDA` before `using FixedEffectModels`. Then, estimate a model with `method = :CUDA`.
0 commit comments