Skip to contents

Fit a Julia regression model using jlmer specifications

Usage

jlmer(jlmer_spec, family = c("gaussian", "binomial"), ..., progress = FALSE)

Arguments

jlmer_spec

Data prepped for jlmer from make_jlmer_spec()

family

A GLM family. Currently supports "gaussian" and "binomial".

...

Optional arguments passed to Julia for model fitting.

progress

If TRUE, prints the timing of iterations.

Value

A jlmer_mod object.

Examples

# \donttest{

# Fitting a regression model with a specification object
spec <- make_jlmer_spec(weight ~ 1 + Diet, ChickWeight)
jlmer(spec)
#> <Julia object of type StatsModels.TableRegressionModel>
#> ────────────────────────────────────────────────────────────────────────
#>                 Coef.  Std. Error      z  Pr(>|z|)  Lower 95%  Upper 95%
#> ────────────────────────────────────────────────────────────────────────
#> (Intercept)  102.645      4.67395  21.96    <1e-99   93.4847    111.806
#> Diet2         19.9712     7.86744   2.54    0.0111    4.55132    35.3911
#> Diet3         40.3045     7.86744   5.12    <1e-06   24.8847     55.7244
#> Diet4         32.6173     7.91046   4.12    <1e-04   17.113      48.1215
#> ────────────────────────────────────────────────────────────────────────

# `lm()` equivalent
summary(lm(weight ~ 1 + Diet, ChickWeight))$coef
#>              Estimate Std. Error   t value     Pr(>|t|)
#> (Intercept) 102.64545   4.673954 21.961161 4.712762e-78
#> Diet2        19.97121   7.867437  2.538465 1.139708e-02
#> Diet3        40.30455   7.867437  5.122958 4.113938e-07
#> Diet4        32.61726   7.910461  4.123307 4.286352e-05

# }