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
throw(ArgumentError("variant must be one of :McFadden or :devianceratio"))
105
105
end
@@ -184,7 +184,7 @@ function StatsAPI.residuals(m::FixedEffectModel, data)
184
184
Tables.istable(data) ||
185
185
throw(ArgumentError("expected second argument to be a Table, got $(typeof(data))"))
186
186
has_fe(m) &&
187
-
throw("To access residuals for a model with high-dimensional fixed effects, run `m = reg(..., save = :residuals)` and then access residuals with `residuals(m)`.")
187
+
throw(ArgumentError("To access residuals for a model with high-dimensional fixed effects, run `m = reg(..., save = :residuals)` and then access residuals with `residuals(m)`."))
has_fe(m) &&throw("To access residuals in a fixed effect regression, run `reg` with the option save = :residuals, and then access residuals with `residuals()`")
205
-
!has_fe(m) &&throw("To access residuals, use residuals(m, data) where `m` is an estimated FixedEffectModel and `data` is a Table")
204
+
throw(ArgumentError(
205
+
has_fe(m) ?"To access residuals in a fixed effect regression, run `reg` with the option save = :residuals, and then access residuals with `residuals()`":
206
+
"To access residuals, use residuals(m, data) where `m` is an estimated FixedEffectModel and `data` is a Table"
207
+
))
206
208
end
207
209
m.residuals
208
210
end
@@ -214,11 +216,11 @@ Return a DataFrame with fixed effects estimates.
214
216
The output is aligned with the original DataFrame used in `reg`.
215
217
216
218
### Keyword arguments
217
-
* `keepkeys::Bool' : Should the returned DataFrame include the original variables used to defined groups? Default to false
219
+
* `keepkeys::Bool` : Should the returned DataFrame include the original variables used to defined groups? Default to false
218
220
"""
219
221
220
222
functionfe(m::FixedEffectModel; keepkeys =false)
221
-
!has_fe(m) &&throw("fe() is not defined for fixed effect models without fixed effects")
223
+
!has_fe(m) &&throw(ArgumentError("fe() is not defined for fixed effect models without fixed effects"))
0 commit comments