Giter VIP home page Giter VIP logo

jme4's Introduction

Installation

remotes::install_github("conig/jme4")

Usage

Lmer

model <- jme4("Sepal.Width ~ 1 + (1|Species)", data = iris)
summary(model)
#> Linear mixed model fit by maximum likelihood  ['lmerMod']
#> Formula: Sepal_Width ~ 1 + (1 | Species)
#>    Data: jellyme4_data
#> Control: 
#> lme4::lmerControl(optimizer = "nloptwrap", optCtrl = list(maxeval = 1),  
#>     calc.derivs = FALSE, check.nobs.vs.nRE = "warning")
#> 
#>      AIC      BIC   logLik deviance df.resid 
#>    118.2    127.3    -56.1    112.2      147 
#> 
#> Scaled residuals: 
#>     Min      1Q  Median      3Q     Max 
#> -3.2874 -0.6379  0.0625  0.6513  2.8947 
#> 
#> Random effects:
#>  Groups   Name        Variance Std.Dev.
#>  Species  (Intercept) 0.07333  0.2708  
#>  Residual             0.11539  0.3397  
#> Number of obs: 150, groups:  Species, 3
#> 
#> Fixed effects:
#>             Estimate Std. Error t value
#> (Intercept)   3.0573     0.1588   19.25
#> optimizer (LN_BOBYQA) convergence code: 5 (fit with MixedModels.jl)

glmer

iris$long_petal = iris$Sepal.Length > 6
model <- jme4("long_petal ~ 1 + (1|Species)", data = iris, family = "binomial")
summary(model)
#> Generalized linear mixed model fit by maximum likelihood (Laplace
#>   Approximation) [glmerMod]
#>  Family: binomial  ( logit )
#> Formula: long_petal ~ 1 + (1 | Species)
#>    Data: jellyme4_data
#> Weights: jellyme4_weights
#> Control: 
#> lme4::glmerControl(optimizer = "nloptwrap", optCtrl = list(maxeval = 1),  
#>     calc.derivs = FALSE, check.nobs.vs.nRE = "warning")
#> 
#>      AIC      BIC   logLik deviance df.resid 
#>      132      138      -64      128      148 
#> 
#> Scaled residuals: 
#>      Min       1Q   Median       3Q      Max 
#> -2.09318 -0.81264 -0.08039  0.47774  1.23056 
#> 
#> Random effects:
#>  Groups  Name        Variance Std.Dev.
#>  Species (Intercept) 10.65    3.263   
#> Number of obs: 150, groups:  Species, 3
#> 
#> Fixed effects:
#>             Estimate Std. Error z value Pr(>|z|)
#> (Intercept)   -1.624      1.967  -0.826    0.409
#> optimizer (LN_BOBYQA) convergence code: 5 (fit with MixedModels.jl)

jme4's People

Contributors

conig avatar

Watchers

 avatar

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.