diff --git a/apple-touch-icon-120x120.png b/apple-touch-icon-120x120.png index 85dad247d..34b2bbaa3 100644 Binary files a/apple-touch-icon-120x120.png and b/apple-touch-icon-120x120.png differ diff --git a/apple-touch-icon-152x152.png b/apple-touch-icon-152x152.png index b5a0227ba..8300c56e0 100644 Binary files a/apple-touch-icon-152x152.png and b/apple-touch-icon-152x152.png differ diff --git a/apple-touch-icon-180x180.png b/apple-touch-icon-180x180.png index ed343fc43..02e01df4f 100644 Binary files a/apple-touch-icon-180x180.png and b/apple-touch-icon-180x180.png differ diff --git a/apple-touch-icon-60x60.png b/apple-touch-icon-60x60.png index f1a267fca..71606c1e4 100644 Binary files a/apple-touch-icon-60x60.png and b/apple-touch-icon-60x60.png differ diff --git a/apple-touch-icon-76x76.png b/apple-touch-icon-76x76.png index f6be47bbd..3ca713b7d 100644 Binary files a/apple-touch-icon-76x76.png and b/apple-touch-icon-76x76.png differ diff --git a/apple-touch-icon.png b/apple-touch-icon.png index ed343fc43..9fb8e479e 100644 Binary files a/apple-touch-icon.png and b/apple-touch-icon.png differ diff --git a/favicon-16x16.png b/favicon-16x16.png index 0f951067f..a6a9b2b60 100644 Binary files a/favicon-16x16.png and b/favicon-16x16.png differ diff --git a/favicon-32x32.png b/favicon-32x32.png index 264b64c4c..1e9c51306 100644 Binary files a/favicon-32x32.png and b/favicon-32x32.png differ diff --git a/pkgdown.yml b/pkgdown.yml index 10a5a9381..16ea21fb5 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -5,7 +5,7 @@ articles: display: display.html export: export.html insight: insight.html -last_built: 2024-04-30T07:47Z +last_built: 2024-04-30T11:53Z urls: reference: https://easystats.github.io/insight/reference article: https://easystats.github.io/insight/articles diff --git a/reference/find_formula.html b/reference/find_formula.html index 6573cd539..07f83785b 100644 --- a/reference/find_formula.html +++ b/reference/find_formula.html @@ -183,7 +183,7 @@

Examplesfind_formula(m) #> $conditional #> mpg ~ wt + cyl + vs -#> <environment: 0x563b95387b48> +#> <environment: 0x562f205307c8> #> #> attr(,"class") #> [1] "insight_formula" "list" @@ -193,11 +193,11 @@

Examplesf #> $conditional #> Sepal.Length ~ Sepal.Width -#> <environment: 0x563b95387b48> +#> <environment: 0x562f205307c8> #> #> $random #> ~1 | Species -#> <environment: 0x563b95c52658> +#> <environment: 0x562f20ce58c8> #> #> attr(,"class") #> [1] "insight_formula" "list" diff --git a/reference/get_priors.html b/reference/get_priors.html index f989943c8..1e785a35b 100644 --- a/reference/get_priors.html +++ b/reference/get_priors.html @@ -148,15 +148,15 @@

Examples#> Chain 1: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 1: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 1: -#> Chain 1: Elapsed Time: 0.441 seconds (Warm-up) -#> Chain 1: 0.492 seconds (Sampling) -#> Chain 1: 0.933 seconds (Total) +#> Chain 1: Elapsed Time: 0.438 seconds (Warm-up) +#> Chain 1: 0.499 seconds (Sampling) +#> Chain 1: 0.937 seconds (Total) #> Chain 1: #> #> SAMPLING FOR MODEL 'continuous' NOW (CHAIN 2). #> Chain 2: -#> Chain 2: Gradient evaluation took 1.1e-05 seconds -#> Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 0.11 seconds. +#> Chain 2: Gradient evaluation took 1.4e-05 seconds +#> Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 0.14 seconds. #> Chain 2: Adjust your expectations accordingly! #> Chain 2: #> Chain 2: @@ -173,9 +173,9 @@

Examples#> Chain 2: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 2: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 2: -#> Chain 2: Elapsed Time: 0.454 seconds (Warm-up) -#> Chain 2: 0.495 seconds (Sampling) -#> Chain 2: 0.949 seconds (Total) +#> Chain 2: Elapsed Time: 0.453 seconds (Warm-up) +#> Chain 2: 0.503 seconds (Sampling) +#> Chain 2: 0.956 seconds (Total) #> Chain 2: #> #> SAMPLING FOR MODEL 'continuous' NOW (CHAIN 3). @@ -198,15 +198,15 @@

Examples#> Chain 3: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 3: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 3: -#> Chain 3: Elapsed Time: 0.442 seconds (Warm-up) -#> Chain 3: 0.523 seconds (Sampling) -#> Chain 3: 0.965 seconds (Total) +#> Chain 3: Elapsed Time: 0.443 seconds (Warm-up) +#> Chain 3: 0.541 seconds (Sampling) +#> Chain 3: 0.984 seconds (Total) #> Chain 3: #> #> SAMPLING FOR MODEL 'continuous' NOW (CHAIN 4). #> Chain 4: -#> Chain 4: Gradient evaluation took 1.3e-05 seconds -#> Chain 4: 1000 transitions using 10 leapfrog steps per transition would take 0.13 seconds. +#> Chain 4: Gradient evaluation took 1.1e-05 seconds +#> Chain 4: 1000 transitions using 10 leapfrog steps per transition would take 0.11 seconds. #> Chain 4: Adjust your expectations accordingly! #> Chain 4: #> Chain 4: @@ -224,8 +224,8 @@

Examples#> Chain 4: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 4: #> Chain 4: Elapsed Time: 0.408 seconds (Warm-up) -#> Chain 4: 0.479 seconds (Sampling) -#> Chain 4: 0.887 seconds (Total) +#> Chain 4: 0.487 seconds (Sampling) +#> Chain 4: 0.895 seconds (Total) #> Chain 4: get_priors(model) #> Parameter Distribution Location Scale Adjusted_Scale diff --git a/reference/get_transformation.html b/reference/get_transformation.html index a9523c629..1ad38f6b1 100644 --- a/reference/get_transformation.html +++ b/reference/get_transformation.html @@ -129,14 +129,14 @@

Examples#> $transformation #> function (x) #> x -#> <bytecode: 0x563b97cfaa50> -#> <environment: 0x563b97cf9f98> +#> <bytecode: 0x562f2b39a3b0> +#> <environment: 0x562f2b399930> #> #> $inverse #> function (x) #> x -#> <bytecode: 0x563b97cfaa50> -#> <environment: 0x563b97cf9f98> +#> <bytecode: 0x562f2b39a3b0> +#> <environment: 0x562f2b399930> #> # log-transformation diff --git a/search.json b/search.json index 7653bca3a..83a68063d 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement d.luedecke@uke.de. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://easystats.github.io/insight/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to insight","title":"Contributing to insight","text":"outlines propose change insight.","code":""},{"path":"https://easystats.github.io/insight/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"","what":"Fixing typos","title":"Contributing to insight","text":"Small typos grammatical errors documentation may edited directly using GitHub web interface, long changes made source file. want fix typos documentation, please edit related .R file R/ folder. edit .Rd file man/.","code":""},{"path":"https://easystats.github.io/insight/CONTRIBUTING.html","id":"filing-an-issue","dir":"","previous_headings":"","what":"Filing an issue","title":"Contributing to insight","text":"easiest way propose change new feature file issue. ’ve found bug, may also create associated issue. possible, try illustrate proposal bug minimal reproducible example.","code":""},{"path":"https://easystats.github.io/insight/CONTRIBUTING.html","id":"pull-requests","dir":"","previous_headings":"","what":"Pull requests","title":"Contributing to insight","text":"Please create Git branch pull request (PR). contributed code roughly follow R style guide, particular easystats convention code-style. insight uses roxygen2, Markdown syntax, documentation. insight uses testthat. Adding tests PR makes easier merge PR code base. PR user-visible change, may add bullet top NEWS.md describing changes made. may optionally add GitHub username, links relevant issue(s)/PR(s).","code":""},{"path":"https://easystats.github.io/insight/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to insight","text":"Please note project released Contributor Code Conduct. participating project agree abide terms.","code":""},{"path":"https://easystats.github.io/insight/SUPPORT.html","id":null,"dir":"","previous_headings":"","what":"Getting help with {insight}","title":"Getting help with {insight}","text":"Thanks using insight. filing issue, places explore pieces put together make process smooth possible. Start making minimal reproducible example using reprex package. haven’t heard used reprex , ’re treat! Seriously, reprex make R-question-asking endeavors easier (pretty insane ROI five ten minutes ’ll take learn ’s ). additional reprex pointers, check Get help! resource used tidyverse team. Armed reprex, next step figure ask: ’s question: start StackOverflow. people answer questions. ’s bug: ’re right place, file issue. ’re sure: let’s discuss try figure ! problem bug feature request, can easily return report . opening new issue, sure search issues pull requests make sure bug hasn’t reported /already fixed development version. default, search pre-populated :issue :open. can edit qualifiers (e.g. :pr, :closed) needed. example, ’d simply remove :open search issues repo, open closed. Thanks help!","code":""},{"path":"https://easystats.github.io/insight/articles/display.html","id":"the-difference-between-a-dataframe-and-its-render","dir":"Articles","previous_headings":"","what":"The difference between a dataframe and its render","title":"Formatting, printing and exporting tables","text":"objects encountered throughout {easystats} packages “tables”, .e., 2D matrix columns rows. R, objects often, core, data frames. Let’s create one use example: display console (calling object - e.g. df - actually equivalent calling print(df)), output looks alright, improved. packages, {knitr}, functions create nicer output. instance, markdown, can nicely rendered markdown documents copied: HTML, makes look great HTML files (webpage ’re reading):","code":"library(insight) df <- data.frame( Variable = c(1, 3, 5, 3, 1), Group = c(\"A\", \"A\", \"A\", \"B\", \"B\"), CI = c(0.95, 0.95, 0.95, 0.95, 0.95), CI_low = c(3.35, 2.425, 6.213, 12.1, 1.23), CI_high = c(4.23, 5.31, 7.123, 13.5, 3.61), p = c(0.001, 0.0456, 0.45, 0.0042, 0.34) ) df #> Variable Group CI CI_low CI_high p #> 1 1 A 0.95 3.350 4.230 0.0010 #> 2 3 A 0.95 2.425 5.310 0.0456 #> 3 5 A 0.95 6.213 7.123 0.4500 #> 4 3 B 0.95 12.100 13.500 0.0042 #> 5 1 B 0.95 1.230 3.610 0.3400 knitr::kable(df, format = \"markdown\") | Variable|Group | CI| CI_low| CI_high| p| |--------:|:-----|----:|------:|-------:|------:| | 1|A | 0.95| 3.350| 4.230| 0.0010| | 3|A | 0.95| 2.425| 5.310| 0.0456| | 5|A | 0.95| 6.213| 7.123| 0.4500| | 3|B | 0.95| 12.100| 13.500| 0.0042| | 1|B | 0.95| 1.230| 3.610| 0.3400| knitr::kable(df, format = \"html\")"},{"path":"https://easystats.github.io/insight/articles/display.html","id":"the-insight-workflow","dir":"Articles","previous_headings":"","what":"The insight workflow","title":"Formatting, printing and exporting tables","text":"{insight} package also contains function improve “printing”, rendering, tables. design dissociates two separate independent steps: formatting exporting.","code":""},{"path":"https://easystats.github.io/insight/articles/display.html","id":"formatting","dir":"Articles","previous_headings":"The insight workflow","what":"Formatting","title":"Formatting, printing and exporting tables","text":"purpose formatting improve given table, still keeping regular R data frame, can instance modified user. can see, format_table() modifies columns, turning number characters (amount digits), detecting confidence intervals. usually combined column-specific formatting functions, like format_p():","code":"format_table(df) #> Variable Group 95% CI p #> 1 1.00 A [ 3.35, 4.23] 0.001 #> 2 3.00 A [ 2.42, 5.31] 0.046 #> 3 5.00 A [ 6.21, 7.12] 0.450 #> 4 3.00 B [12.10, 13.50] 0.004 #> 5 1.00 B [ 1.23, 3.61] 0.340 df %>% mutate(p = format_p(p, stars = TRUE)) %>% format_table() #> Variable Group 95% CI p #> 1 1.00 A [ 3.35, 4.23] p = 0.001** #> 2 3.00 A [ 2.42, 5.31] p = 0.046* #> 3 5.00 A [ 6.21, 7.12] p = 0.450 #> 4 3.00 B [12.10, 13.50] p = 0.004** #> 5 1.00 B [ 1.23, 3.61] p = 0.340"},{"path":"https://easystats.github.io/insight/articles/display.html","id":"using-unicode-symbols-as-effect-size-names","dir":"Articles","previous_headings":"","what":"Using unicode symbols as effect size names","title":"Formatting, printing and exporting tables","text":"use_symbols = TRUE, possible render certain effect size names symbols, used column names. Note works OS X Linux, Windows R 4.2 higher. combination export_table() (see next section), give nicely formatted tables.","code":"x <- data.frame( phi_adjusted = 0.3, Glass_delta = 0.4, Epsilon2 = 0.7, R2 = 0.4 ) # standard output format_table(x) # column names of effect sizes as symbols format_table(x, use_symbols = TRUE) export_table(format_table(x, use_symbols = TRUE))"},{"path":"https://easystats.github.io/insight/articles/display.html","id":"exporting","dir":"Articles","previous_headings":"Using unicode symbols as effect size names","what":"Exporting","title":"Formatting, printing and exporting tables","text":"next step exporting, takes data frame renders given format, looks good console, markdown, HTML latex. markdown HTML, simply change format argument markdown (“md”)… …HTML format. can combined format_table(). TODO: display?","code":"export_table(df) #> Variable | Group | CI | CI_low | CI_high | p #> ----------------------------------------------------- #> 1 | A | 0.95 | 3.35 | 4.23 | 1.00e-03 #> 3 | A | 0.95 | 2.42 | 5.31 | 0.05 #> 5 | A | 0.95 | 6.21 | 7.12 | 0.45 #> 3 | B | 0.95 | 12.10 | 13.50 | 4.20e-03 #> 1 | B | 0.95 | 1.23 | 3.61 | 0.34 export_table(df, format = \"md\") export_table(df, format = \"html\") df %>% format_table(ci_brackets = c(\"(\", \")\")) %>% export_table(format = \"html\")"},{"path":"https://easystats.github.io/insight/articles/export.html","id":"exporting-data-frames-into-nice-tables","dir":"Articles","previous_headings":"","what":"Exporting data frames into nice tables","title":"Exporting tables with captions and footers","text":"export_table() functions creates nicely formatted tables text, markdown HTML format. can add (coloured) captions footer lines table well, can even create multiple tables list data frames. vignette shows examples (focusing text output). Note export_table() returns formatted string, prints nicely (essentially just uses cat()). Note: vignettes includes example coloured text output. coloured text rendered vignette. Rather, try examples look results console!","code":"library(insight) x <- iris[1:3, c(1, 2, 5)] # the table as \"readable\" output export_table(x) #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa # see the underlying string unclass(export_table(x)) #> [1] \"Sepal.Length | Sepal.Width | Species\\n------------------------------------\\n 5.10 | 3.50 | setosa\\n 4.90 | 3.00 | setosa\\n 4.70 | 3.20 | setosa\\n\""},{"path":"https://easystats.github.io/insight/articles/export.html","id":"adding-coloured-titles","dir":"Articles","previous_headings":"","what":"Adding (coloured) titles","title":"Exporting tables with captions and footers","text":"title can added either using caption argument, adding string table_caption attribute. caption can also character vector length 2, first element caption, second name colour (see ?print_colour available options). helpful printing coloured table captions. Since coloured text rendered, provide screenshot example :","code":"# a simple caption export_table(x, caption = \"Title\") #> Title #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa # we use a new object, so \"x\" has no attributes yet out <- x attr(out, \"table_caption\") <- \"Another title\" export_table(out) #> Another title #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa # A red caption export_table(x, caption = c(\"# Title\", \"red\")) #> # Title #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa # same for attribute out <- x attr(out, \"table_caption\") <- c(\"*A green title*\", \"green\") export_table(out) #> *A green title* #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa"},{"path":"https://easystats.github.io/insight/articles/export.html","id":"adding-coloured-table-footers","dir":"Articles","previous_headings":"","what":"Adding (coloured) table footers","title":"Exporting tables with captions and footers","text":"Use footer argument add footer line table. also possible add string table_footer attribute. Coloured footers can added way captions.","code":"# colored caption, simple footer export_table( x, caption = c(\"# Title\", \"red\"), footer = \"Footer line\" ) #> # Title #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> Footer line # as attribute out <- x attr(out, \"table_caption\") <- c(\"*A green title*\", \"green\") attr(out, \"table_footer\") <- \"A simple footer\" export_table(out) #> *A green title* #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> A simple footer # colored caption and footer export_table( x, caption = c(\"# Title\", \"red\"), footer = c(\"Footer line in blue\", \"blue\") ) #> # Title #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> Footer line in blue # as attribute out <- x attr(out, \"table_caption\") <- c(\"*A green title*\", \"green\") attr(out, \"table_footer\") <- c(\"Footer line in blue\", \"blue\") export_table(out) #> *A green title* #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> Footer line in blue"},{"path":"https://easystats.github.io/insight/articles/export.html","id":"adding-subtitles","dir":"Articles","previous_headings":"","what":"Adding subtitles","title":"Exporting tables with captions and footers","text":"Subtitles can added using subtitle argument, table_subtitle attribute. Note must take care adding new-line characters.","code":"# colored caption, subtitle and footer export_table( x, caption = c(\"# Title\", \"red\"), subtitle = c(\"\\n A subtitle in yellow\", \"yellow\"), footer = c(\"Footer line in blue\", \"blue\") ) #> # Title #> A subtitle in yellow #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> Footer line in blue # as attribute out <- x attr(out, \"table_caption\") <- c(\"*A green title*\", \"green\") attr(out, \"table_subtitle\") <- c(\"\\nA yellow subtitle\", \"yellow\") attr(out, \"table_footer\") <- c(\"Footer line in blue\", \"blue\") export_table(out) #> *A green title* #> A yellow subtitle #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> Footer line in blue"},{"path":"https://easystats.github.io/insight/articles/export.html","id":"exporting-multiple-data-frames-into-multiple-tables","dir":"Articles","previous_headings":"","what":"Exporting multiple data frames into multiple tables","title":"Exporting tables with captions and footers","text":"Multiple data frames saved list() can used create multiple tables .","code":"x <- list( data.frame(iris[1:3, c(1, 2, 5)]), data.frame(iris[51:53, c(1, 3, 5)]), data.frame(iris[111:113, c(1, 4, 5)]) ) # three different tables export_table(x) #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> #> Sepal.Length | Petal.Length | Species #> ---------------------------------------- #> 7.00 | 4.70 | versicolor #> 6.40 | 4.50 | versicolor #> 6.90 | 4.90 | versicolor #> #> Sepal.Length | Petal.Width | Species #> -------------------------------------- #> 6.50 | 2.00 | virginica #> 6.40 | 1.90 | virginica #> 6.80 | 2.10 | virginica"},{"path":"https://easystats.github.io/insight/articles/export.html","id":"adding-table-captions-and-footers","dir":"Articles","previous_headings":"","what":"Adding table captions and footers","title":"Exporting tables with captions and footers","text":"multiple tables, also possible add caption table. Simply use list() strings caption argument, add table_caption attribute. data frame list. way can add multiple footers. Note, however, take care adding new-line characters. Finally, can even add multiple footer lines table, giving different color. case, list element character vector length 2 (first element caption, second name colour).","code":"# one caption for each table export_table(x, caption = list(\"Table 1\", \"Table 2\", \"Table 3\")) #> Table 1 #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> #> Table 2 #> #> Sepal.Length | Petal.Length | Species #> ---------------------------------------- #> 7.00 | 4.70 | versicolor #> 6.40 | 4.50 | versicolor #> 6.90 | 4.90 | versicolor #> #> Table 3 #> #> Sepal.Length | Petal.Width | Species #> -------------------------------------- #> 6.50 | 2.00 | virginica #> 6.40 | 1.90 | virginica #> 6.80 | 2.10 | virginica # add attribute to *each* data frame out <- x for (i in seq_along(out)) { attr(out[[i]], \"table_caption\") <- paste(\"Table\", i) } export_table(out) #> Table 1 #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> #> Table 2 #> #> Sepal.Length | Petal.Length | Species #> ---------------------------------------- #> 7.00 | 4.70 | versicolor #> 6.40 | 4.50 | versicolor #> 6.90 | 4.90 | versicolor #> #> Table 3 #> #> Sepal.Length | Petal.Width | Species #> -------------------------------------- #> 6.50 | 2.00 | virginica #> 6.40 | 1.90 | virginica #> 6.80 | 2.10 | virginica # add captions and footers for each table export_table( x, caption = list(\"Table 1\", \"Table 2\", \"Table 3\"), footer = list(\"Footer 1\\n\\n\", \"Footer 2\\n\\n\", \"Footer 3\\n\\n\") ) #> Table 1 #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> Footer 1 #> #> #> Table 2 #> #> Sepal.Length | Petal.Length | Species #> ---------------------------------------- #> 7.00 | 4.70 | versicolor #> 6.40 | 4.50 | versicolor #> 6.90 | 4.90 | versicolor #> Footer 2 #> #> #> Table 3 #> #> Sepal.Length | Petal.Width | Species #> -------------------------------------- #> 6.50 | 2.00 | virginica #> 6.40 | 1.90 | virginica #> 6.80 | 2.10 | virginica #> Footer 3 out <- x for (i in seq_along(out)) { attr(out[[i]], \"table_caption\") <- paste(\"Table\", i) attr(out[[i]], \"table_footer\") <- paste(\"Footer\", i, \"\\n\\n\") } export_table(out) #> Table 1 #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> Footer 1 #> #> #> Table 2 #> #> Sepal.Length | Petal.Length | Species #> ---------------------------------------- #> 7.00 | 4.70 | versicolor #> 6.40 | 4.50 | versicolor #> 6.90 | 4.90 | versicolor #> Footer 2 #> #> #> Table 3 #> #> Sepal.Length | Petal.Width | Species #> -------------------------------------- #> 6.50 | 2.00 | virginica #> 6.40 | 1.90 | virginica #> 6.80 | 2.10 | virginica #> Footer 3 # Colored table captions and multiple footers per table export_table( x, caption = list( c(\"Red Table 1\", \"red\"), c(\"Blue Table 2\", \"bue\"), c(\"Green Table 3\", \"green\") ), footer = list( list(c(\"Footer line 1\\n\", \"green\"), c(\"Second line\\n\\n\", \"red\")), list(c(\"Footer line A\\n\", \"blue\"), c(\"Second line\\n\\n\", \"green\")), list(c(\"Footer line I\\n\", \"yellow\"), c(\"Second line\\n\\n\", \"blue\")) ) ) #> Red Table 1 #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> Footer line 1 #> Second line #> #> #> Blue Table 2 #> #> Sepal.Length | Petal.Length | Species #> ---------------------------------------- #> 7.00 | 4.70 | versicolor #> 6.40 | 4.50 | versicolor #> 6.90 | 4.90 | versicolor #> Footer line A #> Second line #> #> #> Green Table 3 #> #> Sepal.Length | Petal.Width | Species #> -------------------------------------- #> 6.50 | 2.00 | virginica #> 6.40 | 1.90 | virginica #> 6.80 | 2.10 | virginica #> Footer line I #> Second line"},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"overview-of-core-functions","dir":"Articles","previous_headings":"","what":"Overview of Core Functions","title":"Getting Started with Accessing Model Information","text":"statistical model object describing relationship variables. Although lot different types models, specificities, also share common components. goal {insight} help retrieve components. get_* prefix extracts values (data) associated model-specific objects (e.g., parameters variables), find_* prefix lists model-specific objects (e.g., priors predictors). powerful families functions allowing great flexibility use, whether high, descriptive level (find_*) narrower level statistical inspection reporting (get_*). point users package documentation complementary package website, https://easystats.github.io/insight/, detailed list arguments associated function well returned values function.","code":""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"definition-of-model-components","dir":"Articles","previous_headings":"","what":"Definition of Model Components","title":"Getting Started with Accessing Model Information","text":"functions {insight} address different components model. effort avoid confusion specific “targets” function, section provide short explanation {insight}’s definitions regression model components.","code":""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"data","dir":"Articles","previous_headings":"Definition of Model Components","what":"Data","title":"Getting Started with Accessing Model Information","text":"dataset used fit model.","code":""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"parameters","dir":"Articles","previous_headings":"Definition of Model Components","what":"Parameters","title":"Getting Started with Accessing Model Information","text":"Values estimated learned data capture relationship variables. regression models, usually referred coefficients.","code":""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"response-and-predictors","dir":"Articles","previous_headings":"Definition of Model Components","what":"Response and Predictors","title":"Getting Started with Accessing Model Information","text":"response: outcome response variable (dependent variable) regression model. predictor: independent variables (fixed part ) regression model. mixed models, variables random effects part (.e. grouping factors) model returned predictors default. However, can included using additional arguments function call, treating predictors “unique”. , variable appears fixed effect random slope, treated one () predictor.","code":""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"variables","dir":"Articles","previous_headings":"Definition of Model Components","what":"Variables","title":"Getting Started with Accessing Model Information","text":"unique variable names appear regression model, e.g., response variable, predictors random effects. “variable” relates unique occurrence term, term name. instance, expression x + poly(x, 2) variable x.","code":""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"terms","dir":"Articles","previous_headings":"Definition of Model Components","what":"Terms","title":"Getting Started with Accessing Model Information","text":"Terms consist variable factor names separated operators, involve arithmetic expressions. instance, expression x + poly(x, 2) one variable x, two terms x poly(x, 2).","code":""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"random-effects","dir":"Articles","previous_headings":"Definition of Model Components","what":"Random Effects","title":"Getting Started with Accessing Model Information","text":"random slopes: variables specified random slopes mixed effects model. random grouping factors: variables specified grouping variables mixed effects model.","code":""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"examples","dir":"Articles","previous_headings":"","what":"Examples","title":"Getting Started with Accessing Model Information","text":"Aren’t predictors, terms, parameters thing? cases, yes. cases, sometimes useful “bare” variable names (terms), sometimes also useful information possible transformation variables. main reason functions cover similar aspects model object (like find_terms() find_predictors() find_variables()). examples demonstrate differences function: Finally, find_parameters(). Parameters also known coefficients, find_parameters() exactly : returns model coefficients.","code":"library(insight) library(lme4) data(sleepstudy) sleepstudy$mygrp <- sample(1:5, size = 180, replace = TRUE) sleepstudy$mysubgrp <- NA sleepstudy$Weeks <- sleepstudy$Days / 7 sleepstudy$cat <- as.factor(sample(letters[1:4], nrow(sleepstudy), replace = TRUE)) for (i in 1:5) { filter_group <- sleepstudy$mygrp == i sleepstudy$mysubgrp[filter_group] <- sample(1:30, size = sum(filter_group), replace = TRUE) } model <- suppressWarnings(lmer( Reaction ~ Days + I(Days^2) + log1p(Weeks) + cat + (1 | mygrp / mysubgrp) + (1 + Days | Subject), data = sleepstudy )) # find the response variable find_response(model) #> [1] \"Reaction\" # find all predictors, fixed part by default find_predictors(model) #> $conditional #> [1] \"Days\" \"Weeks\" \"cat\" # find random effects, grouping factors only find_random(model) #> $random #> [1] \"mysubgrp:mygrp\" \"mygrp\" \"Subject\" # find random slopes find_random_slopes(model) #> $random #> [1] \"Days\" # find all predictors, including random effects find_predictors(model, effects = \"all\", component = \"all\") #> $conditional #> [1] \"Days\" \"Weeks\" \"cat\" #> #> $random #> [1] \"mysubgrp\" \"mygrp\" \"Subject\" # find all terms, including response and random effects # this is essentially the same as the previous example plus response find_terms(model) #> $response #> [1] \"Reaction\" #> #> $conditional #> [1] \"Days\" \"I(Days^2)\" \"log1p(Weeks)\" \"cat\" #> #> $random #> [1] \"mysubgrp\" \"mygrp\" \"Days\" \"Subject\" # find all variables, i.e. also quadratic or log-transformed predictors find_variables(model) #> $response #> [1] \"Reaction\" #> #> $conditional #> [1] \"Days\" \"Weeks\" \"cat\" #> #> $random #> [1] \"mysubgrp\" \"mygrp\" \"Subject\" # find model parameters, i.e. coefficients find_parameters(model) #> $conditional #> [1] \"(Intercept)\" \"Days\" \"I(Days^2)\" \"log1p(Weeks)\" \"catb\" #> [6] \"catc\" \"catd\" #> #> $random #> $random$`mysubgrp:mygrp` #> [1] \"(Intercept)\" #> #> $random$Subject #> [1] \"(Intercept)\" \"Days\" #> #> $random$mygrp #> [1] \"(Intercept)\""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"examples-of-use-cases-in-r","dir":"Articles","previous_headings":"","what":"Examples of Use Cases in R","title":"Getting Started with Accessing Model Information","text":"now like provide examples use cases {insight} package. examples probably cover typical real-world problems, serve illustration core idea package: unified interface access model information. {insight} help users package developers order reduce hassle many exceptions various modelling packages accessing model information.","code":""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"making-predictions-at-specific-values-of-a-term-of-interest","dir":"Articles","previous_headings":"Examples of Use Cases in R","what":"Making Predictions at Specific Values of a Term of Interest","title":"Getting Started with Accessing Model Information","text":"Say, goal make predictions certain term, holding remaining co-variates constant. achieved calling predict() feeding newdata-argument values term interest well “constant” values remaining co-variates. functions get_data() find_predictors() used get information, can used call predict(). example, fit simple linear model, replaced (m)models, approach “universal” applies many different model objects.","code":"library(insight) m <- lm( Sepal.Length ~ Species + Petal.Width + Sepal.Width, data = iris ) dat <- get_data(m) pred <- find_predictors(m, flatten = TRUE) l <- lapply(pred, function(x) { if (is.numeric(dat[[x]])) mean(dat[[x]]) else unique(dat[[x]]) }) names(l) <- pred l <- as.data.frame(l) cbind(l, predictions = predict(m, newdata = l)) #> Species Petal.Width Sepal.Width predictions #> 1 setosa 1.199333 3.057333 5.101427 #> 2 versicolor 1.199333 3.057333 6.089557 #> 3 virginica 1.199333 3.057333 6.339015"},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"printing-model-coefficients","dir":"Articles","previous_headings":"Examples of Use Cases in R","what":"Printing Model Coefficients","title":"Getting Started with Accessing Model Information","text":"next example emphasize possibilities generalize functions many different model objects using {insight}. aim simply print coefficients complete, human readable sentence. first approach uses functions available , obviously models, access information model coefficients. can see, function fails gam-models. access models depends type model R ecosystem, need create specific functions models types. {insight}, users can write function without worry model type.","code":"print_params <- function(model){ paste0( \"My parameters are \", paste0(row.names(summary(model)$coefficients), collapse = \", \"), \", thank you for your attention!\" ) } m1 <- lm(Sepal.Length ~ Petal.Width, data = iris) print_params(m1) #> [1] \"My parameters are (Intercept), Petal.Width, thank you for your attention!\" # obviously, something is missing in the output m2 <- mgcv::gam(Sepal.Length ~ Petal.Width + s(Petal.Length), data = iris) print_params(m2) #> [1] \"My parameters are , thank you for your attention!\" print_params <- function(model){ paste0( \"My parameters are \", paste0(insight::find_parameters(model, flatten = TRUE), collapse = \", \"), \", thank you for your attention!\" ) } m1 <- lm(Sepal.Length ~ Petal.Width, data = iris) print_params(m1) #> [1] \"My parameters are (Intercept), Petal.Width, thank you for your attention!\" m2 <- mgcv::gam(Sepal.Length ~ Petal.Width + s(Petal.Length), data = iris) print_params(m2) #> [1] \"My parameters are (Intercept), Petal.Width, s(Petal.Length), thank you for your attention!\""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"examples-of-use-cases-in-r-packages","dir":"Articles","previous_headings":"","what":"Examples of Use Cases in R packages","title":"Getting Started with Accessing Model Information","text":"{insight} already used different packages solve problems typically occur users’ inputs different model objects varying complexity. example, {ggeffects}, package computes visualizes marginal effects regression models, requires extraction data (get_data()) used fit models, also retrieval model predictors (find_predictors()) decide covariates held constant computing marginal effects. information required order create data frame predict(newdata=). Furthermore, models’ link-functions (link_function()) resp. link-inverse-functions (link_inverse()) required obtain predictors model’s response scale. {sjPlot}-package creates plots summary tables regression models, uses {insight}-functions get model-information (model_info() find_response()), used build components final plot table. information helps, example, labeling table columns providing information effect type (odds ratio, incidence rate ratio, etc.) different model components, split plots tables “conditional” “zero-inflated” parts model, cases models zero-inflation. {bayestestR} mainly relies get_priors() get_parameters() retrieve necessary information compute various indices statistics Bayesian models (like HDI, Credible Interval, MCSE, effective sample size, Bayes factors, etc.). advantage get_parameters() context regardless number parameters posterior distribution , necessary data can easily accessed model objects. need write original, complicated code regular expressions. last example {performance}-package, provides functions computing measures assess model quality. Many indices (e.g. check overdispersion zero-inflation, predictive accuracy, logloss, RMSE, etc.) require number observations (n_obs()) data response-variable (get_response()). , context, functions {insight} helpful, offer unified access information.","code":""},{"path":"https://easystats.github.io/insight/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Daniel Lüdecke. Author, maintainer. @strengejacke Dominique Makowski. Author, contributor. @Dom_Makowski Indrajeet Patil. Author, contributor. @patilindrajeets Philip Waggoner. Author, contributor. Mattan S. Ben-Shachar. Author, contributor. Brenton M. Wiernik. Author, contributor. @bmwiernik Vincent Arel-Bundock. Author, contributor. Etienne Bacher. Author, contributor. Alex Hayes. Reviewer. Grant McDermott. Contributor. Rémi Thériault. Contributor. @rempsyc Alex Reinhart. Contributor.","code":""},{"path":"https://easystats.github.io/insight/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Lüdecke D, Waggoner P, Makowski D (2019). “insight: Unified Interface Access Information Model Objects R.” Journal Open Source Software, 4(38), 1412. doi:10.21105/joss.01412.","code":"@Article{, title = {{insight}: A Unified Interface to Access Information from Model Objects in {R}.}, volume = {4}, doi = {10.21105/joss.01412}, number = {38}, journal = {Journal of Open Source Software}, author = {Daniel Lüdecke and Philip Waggoner and Dominique Makowski}, year = {2019}, pages = {1412}, }"},{"path":"https://easystats.github.io/insight/index.html","id":"insight-","dir":"","previous_headings":"","what":"Easy Access to Model Information for Various Model Objects","title":"Easy Access to Model Information for Various Model Objects","text":"Gain insight models! fitting statistical model, many useful pieces information simultaneously calculated stored beyond coefficient estimates general model fit statistics. Although exist generic functions obtain model information data, many package-specific modelling functions provide methods allow users access valuable information. insight R-package fills important gap providing suite functions support almost model (see list many models supported List Supported Packages Models section). goal insight, , provide tools provide easy, intuitive, consistent access information contained model objects. tools aid applied research virtually field fit, diagnose, present statistical models streamlining access every aspect many model objects via consistent syntax output.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Easy Access to Model Information for Various Model Objects","text":"insight package available CRAN, latest development version available R-universe (rOpenSci) GitHub. downloaded package, can load using: Tip Instead library(insight), use library(easystats). make features easystats-ecosystem available. stay updated, use easystats::install_latest().","code":"library(\"insight\")"},{"path":"https://easystats.github.io/insight/index.html","id":"documentation","dir":"","previous_headings":"","what":"Documentation","title":"Easy Access to Model Information for Various Model Objects","text":"Built non-programmers mind, insight offers broad toolbox making model data information easily accessible. insight offers many useful functions working understanding model objects (discussed ), suggest users start model_info(), function provides clean consistent overview model objects (e.g., functional form model, model family, link function, number observations, variables included specification, etc.). clear understanding model introduced, users able adapt functions nuanced exploration interaction virtually model object.Please visit https://easystats.github.io/insight/ documentation.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"definition-of-model-components","dir":"","previous_headings":"Documentation","what":"Definition of Model Components","title":"Easy Access to Model Information for Various Model Objects","text":"functions insight address different components model. effort avoid confusion specific “targets” function, section provide short explanation insight’s definitions regression model components.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"data","dir":"","previous_headings":"Documentation > Definition of Model Components","what":"Data","title":"Easy Access to Model Information for Various Model Objects","text":"dataset used fit model.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"parameters","dir":"","previous_headings":"Documentation > Definition of Model Components","what":"Parameters","title":"Easy Access to Model Information for Various Model Objects","text":"Values estimated learned data capture relationship variables. regression models, usually referred coefficients.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"response-and-predictors","dir":"","previous_headings":"Documentation > Definition of Model Components","what":"Response and Predictors","title":"Easy Access to Model Information for Various Model Objects","text":"response: outcome response variable (dependent variable) regression model. predictor: independent variables (fixed part ) regression model. mixed models, variables random effects part (.e. grouping factors) model returned predictors default. However, can included using additional arguments function call, treating predictors “unique”. , variable appears fixed effect random slope, treated one () predictor.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"variables","dir":"","previous_headings":"Documentation > Definition of Model Components","what":"Variables","title":"Easy Access to Model Information for Various Model Objects","text":"unique variable names appear regression model, e.g., response variable, predictors random effects. “variable” relates unique occurence term, term name. instance, expression x + poly(x, 2) variable x.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"terms","dir":"","previous_headings":"Documentation > Definition of Model Components","what":"Terms","title":"Easy Access to Model Information for Various Model Objects","text":"Terms consist variable factor names separated operators, involve arithmetic expressions. instance, expression x + poly(x, 2) one variable x, two terms x poly(x, 2).","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"random-effects","dir":"","previous_headings":"Documentation > Definition of Model Components","what":"Random Effects","title":"Easy Access to Model Information for Various Model Objects","text":"random slopes: variables specified random slopes mixed effects model. random grouping factors: variables specified grouping variables mixed effects model. Aren’t predictors, terms parameters thing? cases, yes. cases. Find clicking access documentation.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"functions","dir":"","previous_headings":"Documentation","what":"Functions","title":"Easy Access to Model Information for Various Model Objects","text":"package revolves around two key prefixes: get_* find_*. get_* prefix extracts values (data) associated model-specific objects (e.g., parameters variables), find_* prefix lists model-specific objects (e.g., priors predictors). powerful families functions allowing great flexibility use, whether high, descriptive level (find_*) narrower level statistical inspection reporting (get_*). total, insight package includes 16 core functions: get_data(), get_priors(), get_variance(), get_parameters(), get_predictors(), get_random(), get_response(), find_algorithm(), find_formula(), find_variables(), find_terms(), find_parameters(), find_predictors(), find_random(), find_response(), model_info(). cases, users must supply minimum, name model fit object. several functions, additional arguments allow targeted returns model information. example, find_terms() function’s effects argument allows extraction “fixed effects” terms, “random effects” terms, default, “” terms model object. point users package documentation complementary package website, https://easystats.github.io/insight/, detailed list arguments associated function well returned values function.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"examples-of-use-cases-in-r","dir":"","previous_headings":"Documentation","what":"Examples of Use Cases in R","title":"Easy Access to Model Information for Various Model Objects","text":"now like provide examples use cases insight package. examples probably cover typical real-world problems, serve illustration core idea package: unified interface access model information. insight help users package developers order reduce hassle many exceptions various modelling packages accessing model information.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"making-predictions-at-specific-values-of-a-term-of-interest","dir":"","previous_headings":"Documentation > Examples of Use Cases in R","what":"Making Predictions at Specific Values of a Term of Interest","title":"Easy Access to Model Information for Various Model Objects","text":"Say, goal make predictions certain term, holding remaining co-variates constant. achieved calling predict() feeding newdata-argument values term interest well “constant” values remaining co-variates. functions get_data() find_predictors() used get information, can used call predict(). example, fit simple linear model, replaced (m)models, approach “universal” applies many different model objects.","code":"library(insight) m <- lm( Sepal.Length ~ Species + Petal.Width + Sepal.Width, data = iris ) dat <- get_data(m) pred <- find_predictors(m, flatten = TRUE) l <- lapply(pred, function(x) { if (is.numeric(dat[[x]])) { mean(dat[[x]]) } else { unique(dat[[x]]) } }) names(l) <- pred l <- as.data.frame(l) cbind(l, predictions = predict(m, newdata = l)) #> Species Petal.Width Sepal.Width predictions #> 1 setosa 1.2 3.1 5.1 #> 2 versicolor 1.2 3.1 6.1 #> 3 virginica 1.2 3.1 6.3"},{"path":"https://easystats.github.io/insight/index.html","id":"printing-model-coefficients","dir":"","previous_headings":"Documentation > Examples of Use Cases in R","what":"Printing Model Coefficients","title":"Easy Access to Model Information for Various Model Objects","text":"next example emphasize possibilities generalize functions many different model objects using insight. aim simply print coefficients complete, human readable sentence. first approach uses functions available , obviously models, access information model coefficients. can see, function fails gam-models. access models depends type model R ecosystem, need create specific functions models types. insight, users can write function without worry model type.","code":"print_params <- function(model) { paste0( \"My parameters are \", toString(row.names(summary(model)$coefficients)), \", thank you for your attention!\" ) } m1 <- lm(Sepal.Length ~ Petal.Width, data = iris) print_params(m1) #> [1] \"My parameters are (Intercept), Petal.Width, thank you for your attention!\" # obviously, something is missing in the output m2 <- mgcv::gam(Sepal.Length ~ Petal.Width + s(Petal.Length), data = iris) print_params(m2) #> [1] \"My parameters are , thank you for your attention!\" print_params <- function(model) { paste0( \"My parameters are \", toString(insight::find_parameters(model, flatten = TRUE)), \", thank you for your attention!\" ) } m1 <- lm(Sepal.Length ~ Petal.Width, data = iris) print_params(m1) #> [1] \"My parameters are (Intercept), Petal.Width, thank you for your attention!\" m2 <- mgcv::gam(Sepal.Length ~ Petal.Width + s(Petal.Length), data = iris) print_params(m2) #> [1] \"My parameters are (Intercept), Petal.Width, s(Petal.Length), thank you for your attention!\""},{"path":"https://easystats.github.io/insight/index.html","id":"contributing-and-support","dir":"","previous_headings":"","what":"Contributing and Support","title":"Easy Access to Model Information for Various Model Objects","text":"case want file issue contribute another way package, please follow guide. questions functionality, may either contact us via email also file issue.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"list-of-supported-models-by-class","dir":"","previous_headings":"","what":"List of Supported Models by Class","title":"Easy Access to Model Information for Various Model Objects","text":"Currently, 226 model classes supported. Didn’t find model? File issue request additional model-support insight!","code":"supported_models() #> [1] \"aareg\" \"afex_aov\" #> [3] \"AKP\" \"Anova.mlm\" #> [5] \"anova.rms\" \"aov\" #> [7] \"aovlist\" \"Arima\" #> [9] \"averaging\" \"bamlss\" #> [11] \"bamlss.frame\" \"bayesQR\" #> [13] \"bayesx\" \"BBmm\" #> [15] \"BBreg\" \"bcplm\" #> [17] \"betamfx\" \"betaor\" #> [19] \"betareg\" \"BFBayesFactor\" #> [21] \"bfsl\" \"BGGM\" #> [23] \"bife\" \"bifeAPEs\" #> [25] \"bigglm\" \"biglm\" #> [27] \"blavaan\" \"blrm\" #> [29] \"bracl\" \"brglm\" #> [31] \"brmsfit\" \"brmultinom\" #> [33] \"btergm\" \"censReg\" #> [35] \"cgam\" \"cgamm\" #> [37] \"cglm\" \"clm\" #> [39] \"clm2\" \"clmm\" #> [41] \"clmm2\" \"clogit\" #> [43] \"coeftest\" \"complmrob\" #> [45] \"confusionMatrix\" \"coxme\" #> [47] \"coxph\" \"coxph.penal\" #> [49] \"coxr\" \"cpglm\" #> [51] \"cpglmm\" \"crch\" #> [53] \"crq\" \"crqs\" #> [55] \"crr\" \"dep.effect\" #> [57] \"DirichletRegModel\" \"draws\" #> [59] \"drc\" \"eglm\" #> [61] \"elm\" \"epi.2by2\" #> [63] \"ergm\" \"feglm\" #> [65] \"feis\" \"felm\" #> [67] \"fitdistr\" \"fixest\" #> [69] \"flac\" \"flexsurvreg\" #> [71] \"flic\" \"gam\" #> [73] \"Gam\" \"gamlss\" #> [75] \"gamm\" \"gamm4\" #> [77] \"garch\" \"gbm\" #> [79] \"gee\" \"geeglm\" #> [81] \"glht\" \"glimML\" #> [83] \"glm\" \"Glm\" #> [85] \"glmm\" \"glmmadmb\" #> [87] \"glmmPQL\" \"glmmTMB\" #> [89] \"glmrob\" \"glmRob\" #> [91] \"glmx\" \"gls\" #> [93] \"gmnl\" \"hglm\" #> [95] \"HLfit\" \"htest\" #> [97] \"hurdle\" \"iv_robust\" #> [99] \"ivFixed\" \"ivprobit\" #> [101] \"ivreg\" \"lavaan\" #> [103] \"lm\" \"lm_robust\" #> [105] \"lme\" \"lmerMod\" #> [107] \"lmerModLmerTest\" \"lmodel2\" #> [109] \"lmrob\" \"lmRob\" #> [111] \"logistf\" \"logitmfx\" #> [113] \"logitor\" \"logitr\" #> [115] \"LORgee\" \"lqm\" #> [117] \"lqmm\" \"lrm\" #> [119] \"manova\" \"MANOVA\" #> [121] \"marginaleffects\" \"marginaleffects.summary\" #> [123] \"margins\" \"maxLik\" #> [125] \"mblogit\" \"mclogit\" #> [127] \"mcmc\" \"mcmc.list\" #> [129] \"MCMCglmm\" \"mcp1\" #> [131] \"mcp12\" \"mcp2\" #> [133] \"med1way\" \"mediate\" #> [135] \"merMod\" \"merModList\" #> [137] \"meta_bma\" \"meta_fixed\" #> [139] \"meta_random\" \"metaplus\" #> [141] \"mhurdle\" \"mipo\" #> [143] \"mira\" \"mixed\" #> [145] \"MixMod\" \"mixor\" #> [147] \"mjoint\" \"mle\" #> [149] \"mle2\" \"mlm\" #> [151] \"mlogit\" \"mmclogit\" #> [153] \"mmlogit\" \"mmrm\" #> [155] \"mmrm_fit\" \"mmrm_tmb\" #> [157] \"model_fit\" \"multinom\" #> [159] \"mvord\" \"negbinirr\" #> [161] \"negbinmfx\" \"nestedLogit\" #> [163] \"ols\" \"onesampb\" #> [165] \"orm\" \"pgmm\" #> [167] \"phyloglm\" \"phylolm\" #> [169] \"plm\" \"PMCMR\" #> [171] \"poissonirr\" \"poissonmfx\" #> [173] \"polr\" \"probitmfx\" #> [175] \"psm\" \"Rchoice\" #> [177] \"ridgelm\" \"riskRegression\" #> [179] \"rjags\" \"rlm\" #> [181] \"rlmerMod\" \"RM\" #> [183] \"rma\" \"rma.uni\" #> [185] \"robmixglm\" \"robtab\" #> [187] \"rq\" \"rqs\" #> [189] \"rqss\" \"rvar\" #> [191] \"Sarlm\" \"scam\" #> [193] \"selection\" \"sem\" #> [195] \"SemiParBIV\" \"semLm\" #> [197] \"semLme\" \"serp\" #> [199] \"slm\" \"speedglm\" #> [201] \"speedlm\" \"stanfit\" #> [203] \"stanmvreg\" \"stanreg\" #> [205] \"summary.lm\" \"survfit\" #> [207] \"survreg\" \"svy_vglm\" #> [209] \"svychisq\" \"svyglm\" #> [211] \"svyolr\" \"t1way\" #> [213] \"tobit\" \"trimcibt\" #> [215] \"truncreg\" \"vgam\" #> [217] \"vglm\" \"wbgee\" #> [219] \"wblm\" \"wbm\" #> [221] \"wmcpAKP\" \"yuen\" #> [223] \"yuend\" \"zcpglm\" #> [225] \"zeroinfl\" \"zerotrunc\""},{"path":"https://easystats.github.io/insight/index.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Easy Access to Model Information for Various Model Objects","text":"package helped , please consider citing follows: Lüdecke D, Waggoner P, Makowski D. insight: Unified Interface Access Information Model Objects R. Journal Open Source Software 2019;4:1412. doi: 10.21105/joss.01412","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Easy Access to Model Information for Various Model Objects","text":"Please note insight project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://easystats.github.io/insight/reference/all_models_equal.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks if all objects are models of same class — all_models_equal","title":"Checks if all objects are models of same class — all_models_equal","text":"Small helper checks objects supported (regression) model objects class.","code":""},{"path":"https://easystats.github.io/insight/reference/all_models_equal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks if all objects are models of same class — all_models_equal","text":"","code":"all_models_equal(..., verbose = FALSE) all_models_same_class(..., verbose = FALSE)"},{"path":"https://easystats.github.io/insight/reference/all_models_equal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks if all objects are models of same class — all_models_equal","text":"... list objects. verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/all_models_equal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks if all objects are models of same class — all_models_equal","text":"logical, TRUE x supported model objects class.","code":""},{"path":"https://easystats.github.io/insight/reference/all_models_equal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks if all objects are models of same class — all_models_equal","text":"","code":"data(mtcars) data(sleepstudy, package = \"lme4\") m1 <- lm(mpg ~ wt + cyl + vs, data = mtcars) m2 <- lm(mpg ~ wt + cyl, data = mtcars) m3 <- lme4::lmer(Reaction ~ Days + (1 | Subject), data = sleepstudy) m4 <- glm(formula = vs ~ wt, family = binomial(), data = mtcars) all_models_same_class(m1, m2) #> [1] TRUE all_models_same_class(m1, m2, m3) #> [1] FALSE all_models_same_class(m1, m4, m2, m3, verbose = TRUE) #> Following objects are not identical with m1 (of class \"lm\"): m4 (\"glm\"), #> m3 (\"lmerMod\") #> [1] FALSE all_models_same_class(m1, m4, mtcars, m2, m3, verbose = TRUE) #> Following objects are no (supported) models: mtcars #> Following objects are not identical with m1 (of class \"lm\"): m4 (\"glm\"), #> mtcars (\"data.frame\"), m3 (\"lmerMod\") #> [1] FALSE"},{"path":"https://easystats.github.io/insight/reference/check_if_installed.html","id":null,"dir":"Reference","previous_headings":"","what":"Checking if needed package is installed — check_if_installed","title":"Checking if needed package is installed — check_if_installed","text":"Checking needed package installed","code":""},{"path":"https://easystats.github.io/insight/reference/check_if_installed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checking if needed package is installed — check_if_installed","text":"","code":"check_if_installed( package, reason = \"for this function to work\", stop = TRUE, minimum_version = NULL, quietly = FALSE, prompt = interactive(), ... )"},{"path":"https://easystats.github.io/insight/reference/check_if_installed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checking if needed package is installed — check_if_installed","text":"package character vector naming package(s), whose installation needs checked libraries. reason phrase describing package needed. default generic description. stop Logical decides whether function stop needed package installed. minimum_version character vector, representing minimum package version required package. length package. NULL, automatically check DESCRIPTION file correct minimum version. using minimum_version one package, NA used instead NULL packages specific version necessary. quietly Logical, TRUE, invisibly returns vector logicals (TRUE installed package, FALSE otherwise), stop throw warning. quietly = TRUE, arguments stop prompt ignored. Use argument internally check package dependencies without stopping warnings. prompt TRUE, prompt user install needed package(s). Ignored quietly = TRUE. ... Currently ignored","code":""},{"path":"https://easystats.github.io/insight/reference/check_if_installed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checking if needed package is installed — check_if_installed","text":"stop = TRUE, package yet installed, function stops throws error. Else, named logical vector returned, indicating packages installed, .","code":""},{"path":"https://easystats.github.io/insight/reference/check_if_installed.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checking if needed package is installed — check_if_installed","text":"","code":"# \\donttest{ check_if_installed(\"insight\") try(check_if_installed(\"datawizard\", stop = FALSE)) try(check_if_installed(\"rstanarm\", stop = FALSE)) try(check_if_installed(\"nonexistent_package\", stop = FALSE)) #> Warning: Package `nonexistent_package` required for this function to work. #> Please install it by running `install.packages(\"nonexistent_package\")`. try(check_if_installed(\"insight\", minimum_version = \"99.8.7\")) #> Error : Package `insight` is installed, but package version `99.8.7` is #> required. #> Please update it by running `install.packages(\"insight\")`. try(check_if_installed(c(\"nonexistent\", \"also_not_here\"), stop = FALSE)) #> Warning: Packages `nonexistent` and `also_not_here` required for this function to #> work. #> Please install them by running `install.packages(\"nonexistent\", #> \"also_not_here\")`. try(check_if_installed(c(\"datawizard\", \"rstanarm\"), stop = FALSE)) try(check_if_installed(c(\"datawizard\", \"rstanarm\"), minimum_version = c(NA, \"2.21.1\"), stop = FALSE )) # }"},{"path":"https://easystats.github.io/insight/reference/clean_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Get clean names of model terms — clean_names","title":"Get clean names of model terms — clean_names","text":"function \"cleans\" names model terms (character vector names) removing patterns like log() .factor() etc.","code":""},{"path":"https://easystats.github.io/insight/reference/clean_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get clean names of model terms — clean_names","text":"","code":"clean_names(x, ...) # S3 method for class 'character' clean_names(x, include_names = FALSE, ...)"},{"path":"https://easystats.github.io/insight/reference/clean_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get clean names of model terms — clean_names","text":"x fitted model, character vector. ... Currently used. include_names Logical, TRUE, returns named vector names original values x.","code":""},{"path":"https://easystats.github.io/insight/reference/clean_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get clean names of model terms — clean_names","text":"\"cleaned\" variable names character vector, .e. pattern like s() splines log() removed model terms.","code":""},{"path":"https://easystats.github.io/insight/reference/clean_names.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Get clean names of model terms — clean_names","text":"Typically, method intended work character vectors, order remove patterns obscure variable names. convenience reasons also possible call clean_names() also model object. x regression model, function (almost) equal calling find_variables(). main difference clean_names() always returns character vector, find_variables() returns list character vectors, unless flatten = TRUE. See 'Examples'.","code":""},{"path":"https://easystats.github.io/insight/reference/clean_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get clean names of model terms — clean_names","text":"","code":"# example from ?stats::glm counts <- c(18, 17, 15, 20, 10, 20, 25, 13, 12) outcome <- as.numeric(gl(3, 1, 9)) treatment <- gl(3, 3) m <- glm(counts ~ log(outcome) + as.factor(treatment), family = poisson()) clean_names(m) #> [1] \"counts\" \"outcome\" \"treatment\" # difference \"clean_names()\" and \"find_variables()\" data(cbpp, package = \"lme4\") m <- lme4::glmer( cbind(incidence, size - incidence) ~ period + (1 | herd), data = cbpp, family = binomial ) clean_names(m) #> [1] \"incidence\" \"size\" \"period\" \"herd\" find_variables(m) #> $response #> [1] \"incidence\" \"size\" #> #> $conditional #> [1] \"period\" #> #> $random #> [1] \"herd\" #> find_variables(m, flatten = TRUE) #> [1] \"incidence\" \"size\" \"period\" \"herd\""},{"path":"https://easystats.github.io/insight/reference/clean_parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Get clean names of model parameters — clean_parameters","title":"Get clean names of model parameters — clean_parameters","text":"function \"cleans\" names model parameters removing patterns like \"r_\" \"b[]\" (mostly applicable Stan models) adding columns information group component parameters belong (.e. fixed random, count zero-inflated...) main purpose function easily filter select model parameters, particular - limited - posterior samples Stan models, depending certain characteristics. might useful selective results reported results parameters filtered return certain results (see print_parameters()).","code":""},{"path":"https://easystats.github.io/insight/reference/clean_parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get clean names of model parameters — clean_parameters","text":"","code":"clean_parameters(x, ...)"},{"path":"https://easystats.github.io/insight/reference/clean_parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get clean names of model parameters — clean_parameters","text":"x fitted model. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/clean_parameters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get clean names of model parameters — clean_parameters","text":"data frame \"cleaned\" parameter names information effects, component group parameters belong . consistent across different models, returned data frame always least four columns Parameter, Effects, Component Cleaned_Parameter. See 'Details'.","code":""},{"path":"https://easystats.github.io/insight/reference/clean_parameters.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get clean names of model parameters — clean_parameters","text":"Effects column indicate parameter fixed random effect. Component can either conditional zero_inflated. models random effects, Group column indicates grouping factor random effects. multivariate response models brms rstanarm, additional Response column included, indicate parameters belong response formula. Furthermore, Cleaned_Parameter column returned contains \"human readable\" parameter names (mostly identical Parameter, except models brms rstanarm, specific terms like smooth- spline-terms).","code":""},{"path":"https://easystats.github.io/insight/reference/clean_parameters.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get clean names of model parameters — clean_parameters","text":"","code":"# \\donttest{ model <- download_model(\"brms_zi_2\") clean_parameters(model) #> Parameter Effects Component Group #> 1 b_Intercept fixed conditional #> 2 b_persons fixed conditional #> 3 b_child fixed conditional #> 4 b_camper fixed conditional #> 5 r_persons[1,Intercept] random conditional Intercept: persons #> 6 r_persons[2,Intercept] random conditional Intercept: persons #> 7 r_persons[3,Intercept] random conditional Intercept: persons #> 8 r_persons[4,Intercept] random conditional Intercept: persons #> 9 sd_persons__Intercept random conditional SD/Cor: persons #> 10 b_zi_Intercept fixed zero_inflated #> 11 b_zi_child fixed zero_inflated #> 12 b_zi_camper fixed zero_inflated #> 13 r_persons__zi[1,Intercept] random zero_inflated Intercept: persons #> 14 r_persons__zi[2,Intercept] random zero_inflated Intercept: persons #> 15 r_persons__zi[3,Intercept] random zero_inflated Intercept: persons #> 16 r_persons__zi[4,Intercept] random zero_inflated Intercept: persons #> 17 sd_persons__zi_Intercept random zero_inflated SD/Cor: persons #> Cleaned_Parameter #> 1 (Intercept) #> 2 persons #> 3 child #> 4 camper #> 5 persons.1 #> 6 persons.2 #> 7 persons.3 #> 8 persons.4 #> 9 (Intercept) #> 10 (Intercept) #> 11 child #> 12 camper #> 13 persons.1 #> 14 persons.2 #> 15 persons.3 #> 16 persons.4 #> 17 (Intercept) # }"},{"path":"https://easystats.github.io/insight/reference/color_if.html","id":null,"dir":"Reference","previous_headings":"","what":"Color-formatting for data columns based on condition — color_if","title":"Color-formatting for data columns based on condition — color_if","text":"Convenient function formats columns data frames color codes, color chosen based certain conditions. Columns printed color console.","code":""},{"path":"https://easystats.github.io/insight/reference/color_if.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Color-formatting for data columns based on condition — color_if","text":"","code":"color_if( x, columns, predicate = `>`, value = 0, color_if = \"green\", color_else = \"red\", digits = 2 ) colour_if( x, columns, predicate = `>`, value = 0, colour_if = \"green\", colour_else = \"red\", digits = 2 )"},{"path":"https://easystats.github.io/insight/reference/color_if.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Color-formatting for data columns based on condition — color_if","text":"x data frame columns Character vector column names x formatted. predicate function takes columns value input return TRUE FALSE, based condition (comparison value) met. value comparator. May used conjunction predicate quickly set function compares elements colums value. May ignored predicate function internally computes comparisons. See 'Examples'. color_if, colour_if Character vector, indicating color code used format values x meet condition predicate value. May one \"red\", \"yellow\", \"green\", \"blue\", \"violet\", \"cyan\" \"grey\". Formatting also possible \"bold\" \"italic\". color_else, colour_else See color_if, conditions met. digits Digits rounded values.","code":""},{"path":"https://easystats.github.io/insight/reference/color_if.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Color-formatting for data columns based on condition — color_if","text":"x, columns matched predicate wrapped color codes.","code":""},{"path":"https://easystats.github.io/insight/reference/color_if.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Color-formatting for data columns based on condition — color_if","text":"predicate-function simply works like : (predicate(x[, columns], value))","code":""},{"path":"https://easystats.github.io/insight/reference/color_if.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Color-formatting for data columns based on condition — color_if","text":"","code":"# all values in Sepal.Length larger than 5 in green, all remaining in red x <- color_if(iris[1:10, ], columns = \"Sepal.Length\", predicate = `>`, value = 5) x #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 \\033[32m 5.10\\033[39m 3.5 1.4 0.2 setosa #> 2 \\033[31m 4.90\\033[39m 3.0 1.4 0.2 setosa #> 3 \\033[31m 4.70\\033[39m 3.2 1.3 0.2 setosa #> 4 \\033[31m 4.60\\033[39m 3.1 1.5 0.2 setosa #> 5 \\033[31m 5.00\\033[39m 3.6 1.4 0.2 setosa #> 6 \\033[32m 5.40\\033[39m 3.9 1.7 0.4 setosa #> 7 \\033[31m 4.60\\033[39m 3.4 1.4 0.3 setosa #> 8 \\033[31m 5.00\\033[39m 3.4 1.5 0.2 setosa #> 9 \\033[31m 4.40\\033[39m 2.9 1.4 0.2 setosa #> 10 \\033[31m 4.90\\033[39m 3.1 1.5 0.1 setosa cat(x$Sepal.Length) #> 5.10 4.90 4.70 4.60 5.00 5.40 4.60 5.00 4.40 4.90 # all levels \"setosa\" in Species in green, all remaining in red x <- color_if(iris, columns = \"Species\", predicate = `==`, value = \"setosa\") cat(x$Species) #> setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica # own function, argument \"value\" not needed here p <- function(x, y) { x >= 4.9 & x <= 5.1 } # all values in Sepal.Length between 4.9 and 5.1 in green, all remaining in red x <- color_if(iris[1:10, ], columns = \"Sepal.Length\", predicate = p) cat(x$Sepal.Length) #> 5.10 4.90 4.70 4.60 5.00 5.40 4.60 5.00 4.40 4.90"},{"path":"https://easystats.github.io/insight/reference/compact_character.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove empty strings from character — compact_character","title":"Remove empty strings from character — compact_character","text":"Remove empty strings character","code":""},{"path":"https://easystats.github.io/insight/reference/compact_character.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove empty strings from character — compact_character","text":"","code":"compact_character(x)"},{"path":"https://easystats.github.io/insight/reference/compact_character.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove empty strings from character — compact_character","text":"x single character vector characters.","code":""},{"path":"https://easystats.github.io/insight/reference/compact_character.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Remove empty strings from character — compact_character","text":"character character vector empty strings removed.","code":""},{"path":"https://easystats.github.io/insight/reference/compact_character.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove empty strings from character — compact_character","text":"","code":"compact_character(c(\"x\", \"y\", NA)) #> [1] \"x\" \"y\" compact_character(c(\"x\", \"NULL\", \"\", \"y\")) #> [1] \"x\" \"y\""},{"path":"https://easystats.github.io/insight/reference/compact_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove empty elements from lists — compact_list","title":"Remove empty elements from lists — compact_list","text":"Remove empty elements lists","code":""},{"path":"https://easystats.github.io/insight/reference/compact_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove empty elements from lists — compact_list","text":"","code":"compact_list(x, remove_na = FALSE)"},{"path":"https://easystats.github.io/insight/reference/compact_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove empty elements from lists — compact_list","text":"x list vector. remove_na Logical decide NAs removed.","code":""},{"path":"https://easystats.github.io/insight/reference/compact_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove empty elements from lists — compact_list","text":"","code":"compact_list(list(NULL, 1, c(NA, NA))) #> [[1]] #> [1] 1 #> #> [[2]] #> [1] NA NA #> compact_list(c(1, NA, NA)) #> [1] 1 NA NA compact_list(c(1, NA, NA), remove_na = TRUE) #> [1] 1"},{"path":"https://easystats.github.io/insight/reference/display.html","id":null,"dir":"Reference","previous_headings":"","what":"Generic export of data frames into formatted tables — display","title":"Generic export of data frames into formatted tables — display","text":"display() generic function export data frames various table formats (like plain text, markdown, ...). print_md() usually convenient wrapper display(format = \"markdown\"). Similar, print_html() shortcut display(format = \"html\"). See documentation specific objects' classes.","code":""},{"path":"https://easystats.github.io/insight/reference/display.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generic export of data frames into formatted tables — display","text":"","code":"display(object, ...) print_md(x, ...) print_html(x, ...) # S3 method for class 'data.frame' display(object, format = \"markdown\", ...) # S3 method for class 'data.frame' print_md(x, ...) # S3 method for class 'data.frame' print_html(x, ...)"},{"path":"https://easystats.github.io/insight/reference/display.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generic export of data frames into formatted tables — display","text":"object, x data frame. ... Arguments passed methods. format String, indicating output format. Can \"markdown\" \"html\".","code":""},{"path":"https://easystats.github.io/insight/reference/display.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generic export of data frames into formatted tables — display","text":"Depending format, either object class gt_tbl character vector class knitr_kable.","code":""},{"path":"https://easystats.github.io/insight/reference/display.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generic export of data frames into formatted tables — display","text":"","code":"display(iris[1:5, ]) #> #> #> | Sepal.Length| Sepal.Width| Petal.Length| Petal.Width| Species| #> |------------:|-----------:|------------:|-----------:|-------:| #> | 5.10| 3.50| 1.40| 0.20| setosa| #> | 4.90| 3.00| 1.40| 0.20| setosa| #> | 4.70| 3.20| 1.30| 0.20| setosa| #> | 4.60| 3.10| 1.50| 0.20| setosa| #> | 5.00| 3.60| 1.40| 0.20| setosa|"},{"path":"https://easystats.github.io/insight/reference/dot-colour_detect.html","id":null,"dir":"Reference","previous_headings":"","what":"Detect coloured cells — .colour_detect","title":"Detect coloured cells — .colour_detect","text":"Detect coloured cells","code":""},{"path":"https://easystats.github.io/insight/reference/dot-colour_detect.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Detect coloured cells — .colour_detect","text":"","code":".colour_detect(x)"},{"path":"https://easystats.github.io/insight/reference/download_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Download circus models — download_model","title":"Download circus models — download_model","text":"Downloads pre-compiled models circus-repository. circus-repository contains variety fitted models help systematic testing packages","code":""},{"path":"https://easystats.github.io/insight/reference/download_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download circus models — download_model","text":"","code":"download_model(name, url = NULL)"},{"path":"https://easystats.github.io/insight/reference/download_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download circus models — download_model","text":"name Model name. url String URL download model data. Optional, used case repository-URL changing. default, models downloaded https://raw.github.com/easystats/circus/master/data/.","code":""},{"path":"https://easystats.github.io/insight/reference/download_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download circus models — download_model","text":"model circus-repository, NULL model downloaded (e.g., due server problems).","code":""},{"path":"https://easystats.github.io/insight/reference/download_model.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download circus models — download_model","text":"code generated model available https://easystats.github.io/circus/reference/index.html.","code":""},{"path":"https://easystats.github.io/insight/reference/download_model.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Download circus models — download_model","text":"https://easystats.github.io/circus/","code":""},{"path":"https://easystats.github.io/insight/reference/ellipsis_info.html","id":null,"dir":"Reference","previous_headings":"","what":"Gather information about objects in ellipsis (dot dot dot) — ellipsis_info","title":"Gather information about objects in ellipsis (dot dot dot) — ellipsis_info","text":"Provides information regarding models entered ellipsis. detects whether models, regressions, nested regressions etc., assigning different classes list objects.","code":""},{"path":"https://easystats.github.io/insight/reference/ellipsis_info.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Gather information about objects in ellipsis (dot dot dot) — ellipsis_info","text":"","code":"ellipsis_info(objects, ...) # Default S3 method ellipsis_info(..., only_models = TRUE, verbose = TRUE)"},{"path":"https://easystats.github.io/insight/reference/ellipsis_info.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Gather information about objects in ellipsis (dot dot dot) — ellipsis_info","text":"objects, ... Arbitrary number objects. May also list model objects. only_models keep supported models (default TRUE). verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/ellipsis_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Gather information about objects in ellipsis (dot dot dot) — ellipsis_info","text":"list objects passed function, including additional information attributes (e.g. models response nested).","code":""},{"path":"https://easystats.github.io/insight/reference/ellipsis_info.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Gather information about objects in ellipsis (dot dot dot) — ellipsis_info","text":"","code":"m1 <- lm(Sepal.Length ~ Petal.Width + Species, data = iris) m2 <- lm(Sepal.Length ~ Species, data = iris) m3 <- lm(Sepal.Length ~ Petal.Width, data = iris) m4 <- lm(Sepal.Length ~ 1, data = iris) m5 <- lm(Petal.Width ~ 1, data = iris) objects <- ellipsis_info(m1, m2, m3, m4) class(objects) #> [1] \"ListNonNestedRegressions\" \"ListRegressions\" #> [3] \"ListModels\" \"list\" objects <- ellipsis_info(m1, m2, m4) attributes(objects)$is_nested #> [1] TRUE objects <- ellipsis_info(m1, m2, m5) attributes(objects)$same_response #> [1] FALSE"},{"path":"https://easystats.github.io/insight/reference/export_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Data frame and Tables Pretty Formatting — apply_table_theme","title":"Data frame and Tables Pretty Formatting — apply_table_theme","text":"Data frame Tables Pretty Formatting","code":""},{"path":"https://easystats.github.io/insight/reference/export_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data frame and Tables Pretty Formatting — apply_table_theme","text":"","code":"apply_table_theme(out, x, theme = \"default\", sub_header_positions = NULL) export_table( x, sep = \" | \", header = \"-\", cross = NULL, empty_line = NULL, digits = 2, protect_integers = TRUE, missing = \"\", width = NULL, format = NULL, title = NULL, caption = title, subtitle = NULL, footer = NULL, align = NULL, group_by = NULL, zap_small = FALSE, table_width = NULL, verbose = TRUE, ... )"},{"path":"https://easystats.github.io/insight/reference/export_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Data frame and Tables Pretty Formatting — apply_table_theme","text":"tinytable object. x data frame. May also list data frames, export multiple data frames multiple tables. theme theme apply table. One \"default\", \"grid\", \"striped\", \"bootstrap\", \"void\", \"tabular\", \"darklines\". sub_header_positions vector row positions apply border . Currently particular internal use easystats packages. sep Column separator. header Header separator. Can NULL. cross Character used separator header lines cross. empty_line Separator used empty lines. NULL, line remains empty (.e. filled whitespaces). digits Number digits rounding significant figures. May also \"signif\" return significant figures \"scientific\" return scientific notation. Control number digits adding value suffix, e.g. digits = \"scientific4\" scientific notation 4 decimal places, digits = \"signif5\" 5 significant figures (see also signif()). protect_integers integers kept integers (.e., without decimals)? missing Value NA values replaced. default, empty string (.e. \"\") returned NA. width Refers width columns (numeric values). Can either NULL, number named numeric vector. NULL, width column adjusted minimum required width. number, columns numeric values minimum width specified width. named numeric vector, value names matched column names, match, specified width used (see 'Examples'). applies text-format (see format). format Name output-format, string. NULL (\"text\"), returned output used basic printing. Can one NULL (default) resp. \"text\" plain text, \"markdown\" (\"md\") markdown \"html\" HTML output. title, caption, subtitle Table title (caption) subtitle, strings. NULL, title subtitle printed, unless stored attributes (table_title, alias table_caption, table_subtitle). x list data frames, caption may list table captions, one table. footer Table footer, string. markdown-formatted tables, table footers, due limitation markdown rendering, actually just new text line table. x list data frames, footer may list table captions, one table. align Column alignment. markdown-formatted tables, default align = NULL right-align numeric columns, columns left-aligned. format = \"html\", default left-align first column center remaining. May string indicate alignment rules complete table, like \"left\", \"right\", \"center\" \"firstleft\" (left-align first column, center remaining); maybe string abbreviated alignment characters, length string must equal number columns, instance, align = \"lccrl\" left-align first column, center second third, right-align column four left-align fifth column. HTML-tables, may one \"center\", \"left\" \"right\". group_by Name column x indicates grouping tables. applies format = \"html\". group_by passed gt::gt(groupname_col = group_by). zap_small Logical, TRUE, small values rounded digits decimal places. FALSE, values decimal places digits printed scientific notation. table_width Numeric, \"auto\", indicating width complete table. table_width = \"auto\" table wider current width (.e. line length) console (source textual output, like markdown files), table split two parts. Else, table_width numeric table rows larger table_width, table split two parts. verbose Toggle messages warnings. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/export_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Data frame and Tables Pretty Formatting — apply_table_theme","text":"data frame character format.","code":""},{"path":"https://easystats.github.io/insight/reference/export_table.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Data frame and Tables Pretty Formatting — apply_table_theme","text":"values caption, subtitle footer can also provided attributes x, e.g. caption = NULL x attribute table_caption, value attribute used table caption. table_subtitle attribute subtitle, table_footer footer.","code":""},{"path":[]},{"path":"https://easystats.github.io/insight/reference/export_table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Data frame and Tables Pretty Formatting — apply_table_theme","text":"","code":"export_table(head(iris)) #> Sepal.Length | Sepal.Width | Petal.Length | Petal.Width | Species #> ----------------------------------------------------------------- #> 5.10 | 3.50 | 1.40 | 0.20 | setosa #> 4.90 | 3.00 | 1.40 | 0.20 | setosa #> 4.70 | 3.20 | 1.30 | 0.20 | setosa #> 4.60 | 3.10 | 1.50 | 0.20 | setosa #> 5.00 | 3.60 | 1.40 | 0.20 | setosa #> 5.40 | 3.90 | 1.70 | 0.40 | setosa export_table(head(iris), cross = \"+\") #> Sepal.Length | Sepal.Width | Petal.Length | Petal.Width | Species #> -------------+-------------+--------------+-------------+-------- #> 5.10 | 3.50 | 1.40 | 0.20 | setosa #> 4.90 | 3.00 | 1.40 | 0.20 | setosa #> 4.70 | 3.20 | 1.30 | 0.20 | setosa #> 4.60 | 3.10 | 1.50 | 0.20 | setosa #> 5.00 | 3.60 | 1.40 | 0.20 | setosa #> 5.40 | 3.90 | 1.70 | 0.40 | setosa export_table(head(iris), sep = \" \", header = \"*\", digits = 1) #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> ********************************************************* #> 5.1 3.5 1.4 0.2 setosa #> 4.9 3.0 1.4 0.2 setosa #> 4.7 3.2 1.3 0.2 setosa #> 4.6 3.1 1.5 0.2 setosa #> 5.0 3.6 1.4 0.2 setosa #> 5.4 3.9 1.7 0.4 setosa # split longer tables export_table(head(iris), table_width = 30) #> Sepal.Length | Sepal.Width #> -------------------------- #> 5.10 | 3.50 #> 4.90 | 3.00 #> 4.70 | 3.20 #> 4.60 | 3.10 #> 5.00 | 3.60 #> 5.40 | 3.90 #> #> Sepal.Length | Petal.Length #> --------------------------- #> 5.10 | 1.40 #> 4.90 | 1.40 #> 4.70 | 1.30 #> 4.60 | 1.50 #> 5.00 | 1.40 #> 5.40 | 1.70 #> #> Sepal.Length | Petal.Width | Species #> ------------------------------------ #> 5.10 | 0.20 | setosa #> 4.90 | 0.20 | setosa #> 4.70 | 0.20 | setosa #> 4.60 | 0.20 | setosa #> 5.00 | 0.20 | setosa #> 5.40 | 0.40 | setosa # \\donttest{ # colored footers data(iris) x <- as.data.frame(iris[1:5, ]) attr(x, \"table_footer\") <- c(\"This is a yellow footer line.\", \"yellow\") export_table(x) #> Sepal.Length | Sepal.Width | Petal.Length | Petal.Width | Species #> ----------------------------------------------------------------- #> 5.10 | 3.50 | 1.40 | 0.20 | setosa #> 4.90 | 3.00 | 1.40 | 0.20 | setosa #> 4.70 | 3.20 | 1.30 | 0.20 | setosa #> 4.60 | 3.10 | 1.50 | 0.20 | setosa #> 5.00 | 3.60 | 1.40 | 0.20 | setosa #> This is a yellow footer line. attr(x, \"table_footer\") <- list( c(\"\\nA yellow line\", \"yellow\"), c(\"\\nAnd a red line\", \"red\"), c(\"\\nAnd a blue line\", \"blue\") ) export_table(x) #> Sepal.Length | Sepal.Width | Petal.Length | Petal.Width | Species #> ----------------------------------------------------------------- #> 5.10 | 3.50 | 1.40 | 0.20 | setosa #> 4.90 | 3.00 | 1.40 | 0.20 | setosa #> 4.70 | 3.20 | 1.30 | 0.20 | setosa #> 4.60 | 3.10 | 1.50 | 0.20 | setosa #> 5.00 | 3.60 | 1.40 | 0.20 | setosa #> #> A yellow line #> And a red line #> And a blue line attr(x, \"table_footer\") <- list( c(\"Without the \", \"yellow\"), c(\"new-line character \", \"red\"), c(\"we can have multiple colors per line.\", \"blue\") ) export_table(x) #> Sepal.Length | Sepal.Width | Petal.Length | Petal.Width | Species #> ----------------------------------------------------------------- #> 5.10 | 3.50 | 1.40 | 0.20 | setosa #> 4.90 | 3.00 | 1.40 | 0.20 | setosa #> 4.70 | 3.20 | 1.30 | 0.20 | setosa #> 4.60 | 3.10 | 1.50 | 0.20 | setosa #> 5.00 | 3.60 | 1.40 | 0.20 | setosa #> Without the new-line character we can have multiple colors per line. # } # column-width d <- data.frame( x = c(1, 2, 3), y = c(100, 200, 300), z = c(10000, 20000, 30000) ) export_table(d) #> x | y | z #> --------------- #> 1 | 100 | 10000 #> 2 | 200 | 20000 #> 3 | 300 | 30000 export_table(d, width = 8) #> x | y | z #> ------------------------------ #> 1 | 100 | 10000 #> 2 | 200 | 20000 #> 3 | 300 | 30000 export_table(d, width = c(x = 5, z = 10)) #> x | y | z #> ------------------------ #> 1 | 100 | 10000 #> 2 | 200 | 20000 #> 3 | 300 | 30000 export_table(d, width = c(x = 5, y = 5, z = 10), align = \"lcr\") #> x | y | z #> -------------------------- #> 1 | 100 | 10000 #> 2 | 200 | 20000 #> 3 | 300 | 30000"},{"path":"https://easystats.github.io/insight/reference/find_algorithm.html","id":null,"dir":"Reference","previous_headings":"","what":"Find sampling algorithm and optimizers — find_algorithm","title":"Find sampling algorithm and optimizers — find_algorithm","text":"Returns information sampling estimation algorithm well optimization functions, Bayesian model information chains, iterations warmup-samples.","code":""},{"path":"https://easystats.github.io/insight/reference/find_algorithm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find sampling algorithm and optimizers — find_algorithm","text":"","code":"find_algorithm(x, ...)"},{"path":"https://easystats.github.io/insight/reference/find_algorithm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find sampling algorithm and optimizers — find_algorithm","text":"x fitted model. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/find_algorithm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find sampling algorithm and optimizers — find_algorithm","text":"list elements depending model. frequentist models: algorithm, instance \"OLS\" \"ML\" optimizer, name optimizing function, applies specific models (like gam) frequentist mixed models: algorithm, instance \"REML\" \"ML\" optimizer, name optimizing function Bayesian models: algorithm, algorithm chains, number chains iterations, number iterations per chain warmup, number warmups per chain","code":""},{"path":"https://easystats.github.io/insight/reference/find_algorithm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find sampling algorithm and optimizers — find_algorithm","text":"","code":"data(sleepstudy, package = \"lme4\") m <- lme4::lmer(Reaction ~ Days + (1 | Subject), data = sleepstudy) find_algorithm(m) #> $algorithm #> [1] \"REML\" #> #> $optimizer #> [1] \"nloptwrap\" #> # \\donttest{ data(sleepstudy, package = \"lme4\") m <- suppressWarnings(rstanarm::stan_lmer( Reaction ~ Days + (1 | Subject), data = sleepstudy, refresh = 0 )) find_algorithm(m) #> $algorithm #> [1] \"sampling\" #> #> $chains #> [1] 4 #> #> $iterations #> [1] 2000 #> #> $warmup #> [1] 1000 #> # }"},{"path":"https://easystats.github.io/insight/reference/find_formula.html","id":null,"dir":"Reference","previous_headings":"","what":"Find model formula — find_formula","title":"Find model formula — find_formula","text":"Returns formula(s) different parts model (like fixed random effects, zero-inflated component, ...). formula_ok() checks model formula valid syntax regarding writing TRUE instead T inside poly() data names used (.e. data$variable, rather variable).","code":""},{"path":"https://easystats.github.io/insight/reference/find_formula.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find model formula — find_formula","text":"","code":"find_formula(x, ...) formula_ok(x, verbose = TRUE, ...) # Default S3 method find_formula(x, verbose = TRUE, ...) # S3 method for class 'nestedLogit' find_formula(x, dichotomies = FALSE, verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/find_formula.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find model formula — find_formula","text":"x fitted model. ... Currently used. verbose Toggle warnings. dichotomies Logical, model nestedLogit objects, returns formulas dichotomies.","code":""},{"path":"https://easystats.github.io/insight/reference/find_formula.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find model formula — find_formula","text":"list formulas describe model. simple models, one list-element, conditional, returned. complex models, returned list may following elements: conditional, \"fixed effects\" part model (context fixed-effects instrumental variable regression, also called regressors) . One exception DirichletRegModel models DirichletReg, two three components, depending model. random, \"random effects\" part model (id gee-models similar) zero_inflated, \"fixed effects\" part zero-inflation component model zero_inflated_random, \"random effects\" part zero-inflation component model dispersion, dispersion formula instruments, fixed-effects instrumental variable regressions like ivreg::ivreg(), lfe::felm() plm::plm(), instrumental variables cluster, fixed-effects regressions like lfe::felm(), cluster specification correlation, models correlation-component like nlme::gls(), formula describes correlation structure scale, distributional models mgcv::gaulss() family fitted mgcv::gam(), formula describes scale parameter slopes, fixed-effects individual-slope models like feisr::feis(), formula slope parameters precision, DirichletRegModel models DirichletReg, parametrization (.e. model) \"alternative\".","code":""},{"path":"https://easystats.github.io/insight/reference/find_formula.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Find model formula — find_formula","text":"models class lme gls correlation-component returned, explicitly defined named argument (form), e.g. corAR1(form = ~1 | Mare)","code":""},{"path":"https://easystats.github.io/insight/reference/find_formula.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find model formula — find_formula","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_formula(m) #> $conditional #> mpg ~ wt + cyl + vs #> #> #> attr(,\"class\") #> [1] \"insight_formula\" \"list\" m <- lme4::lmer(Sepal.Length ~ Sepal.Width + (1 | Species), data = iris) f <- find_formula(m) f #> $conditional #> Sepal.Length ~ Sepal.Width #> #> #> $random #> ~1 | Species #> #> #> attr(,\"class\") #> [1] \"insight_formula\" \"list\" format(f) #> [1] \"Sepal.Length ~ Sepal.Width + (~1 | Species)\""},{"path":"https://easystats.github.io/insight/reference/find_interactions.html","id":null,"dir":"Reference","previous_headings":"","what":"Find interaction terms from models — find_interactions","title":"Find interaction terms from models — find_interactions","text":"Returns lowest highest order interaction terms model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_interactions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find interaction terms from models — find_interactions","text":"","code":"find_interactions( x, component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\", \"dispersion\", \"instruments\"), flatten = FALSE )"},{"path":"https://easystats.github.io/insight/reference/find_interactions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find interaction terms from models — find_interactions","text":"x fitted model. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed.","code":""},{"path":"https://easystats.github.io/insight/reference/find_interactions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find interaction terms from models — find_interactions","text":"list character vectors represent interaction terms. Depending component, returned list following elements (NULL, model interaction term): conditional, interaction terms belong \"fixed effects\" terms model zero_inflated, interaction terms belong \"fixed effects\" terms zero-inflation component model instruments, fixed-effects regressions like ivreg, felm plm, interaction terms belong instrumental variables","code":""},{"path":"https://easystats.github.io/insight/reference/find_interactions.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find interaction terms from models — find_interactions","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_interactions(m) #> NULL m <- lm(mpg ~ wt * cyl + vs * hp * gear + carb, data = mtcars) find_interactions(m) #> $conditional #> [1] \"wt:cyl\" \"vs:hp\" \"vs:gear\" \"hp:gear\" \"vs:hp:gear\" #>"},{"path":"https://easystats.github.io/insight/reference/find_offset.html","id":null,"dir":"Reference","previous_headings":"","what":"Find possible offset terms in a model — find_offset","title":"Find possible offset terms in a model — find_offset","text":"Returns character vector name(s) offset terms.","code":""},{"path":"https://easystats.github.io/insight/reference/find_offset.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find possible offset terms in a model — find_offset","text":"","code":"find_offset(x)"},{"path":"https://easystats.github.io/insight/reference/find_offset.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find possible offset terms in a model — find_offset","text":"x fitted model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_offset.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find possible offset terms in a model — find_offset","text":"character vector name(s) offset terms.","code":""},{"path":"https://easystats.github.io/insight/reference/find_offset.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find possible offset terms in a model — find_offset","text":"","code":"# Generate some zero-inflated data set.seed(123) N <- 100 # Samples x <- runif(N, 0, 10) # Predictor off <- rgamma(N, 3, 2) # Offset variable yhat <- -1 + x * 0.5 + log(off) # Prediction on log scale dat <- data.frame(y = NA, x, logOff = log(off)) dat$y <- rpois(N, exp(yhat)) # Poisson process dat$y <- ifelse(rbinom(N, 1, 0.3), 0, dat$y) # Zero-inflation process m1 <- zeroinfl(y ~ offset(logOff) + x | 1, data = dat, dist = \"poisson\") find_offset(m1) #> [1] \"logOff\" m2 <- zeroinfl(y ~ x | 1, data = dat, offset = logOff, dist = \"poisson\") find_offset(m2) #> [1] \"logOff\""},{"path":"https://easystats.github.io/insight/reference/find_parameters.BGGM.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of model parameters from Bayesian models — find_parameters.BGGM","title":"Find names of model parameters from Bayesian models — find_parameters.BGGM","text":"Returns names model parameters, like typically appear summary() output. Bayesian models, parameter names equal column names posterior samples coercion .data.frame().","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.BGGM.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of model parameters from Bayesian models — find_parameters.BGGM","text":"","code":"# S3 method for class 'BGGM' find_parameters( x, component = c(\"correlation\", \"conditional\", \"intercept\", \"all\"), flatten = FALSE, ... ) # S3 method for class 'BFBayesFactor' find_parameters( x, effects = c(\"all\", \"fixed\", \"random\"), component = c(\"all\", \"extra\"), flatten = FALSE, ... ) # S3 method for class 'MCMCglmm' find_parameters(x, effects = c(\"all\", \"fixed\", \"random\"), flatten = FALSE, ...) # S3 method for class 'bamlss' find_parameters( x, flatten = FALSE, component = c(\"all\", \"conditional\", \"location\", \"distributional\", \"auxiliary\"), parameters = NULL, ... ) # S3 method for class 'brmsfit' find_parameters( x, effects = \"all\", component = \"all\", flatten = FALSE, parameters = NULL, ... ) # S3 method for class 'bayesx' find_parameters( x, component = c(\"all\", \"conditional\", \"smooth_terms\"), flatten = FALSE, parameters = NULL, ... ) # S3 method for class 'stanreg' find_parameters( x, effects = c(\"all\", \"fixed\", \"random\"), component = c(\"location\", \"all\", \"conditional\", \"smooth_terms\", \"sigma\", \"distributional\", \"auxiliary\"), flatten = FALSE, parameters = NULL, ... ) # S3 method for class 'stanmvreg' find_parameters( x, effects = c(\"all\", \"fixed\", \"random\"), component = c(\"location\", \"all\", \"conditional\", \"smooth_terms\", \"sigma\", \"distributional\", \"auxiliary\"), flatten = FALSE, parameters = NULL, ... ) # S3 method for class 'sim.merMod' find_parameters( x, effects = c(\"all\", \"fixed\", \"random\"), flatten = FALSE, parameters = NULL, ... )"},{"path":"https://easystats.github.io/insight/reference/find_parameters.BGGM.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of model parameters from Bayesian models — find_parameters.BGGM","text":"x fitted model. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. ... Currently used. effects parameters fixed effects, random effects returned? applies mixed models. May abbreviated. parameters Regular expression pattern describes parameters returned.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.BGGM.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of model parameters from Bayesian models — find_parameters.BGGM","text":"list parameter names. simple models, one list-element, conditional, returned. complex models, returned list may following elements: conditional, \"fixed effects\" part model random, \"random effects\" part model zero_inflated, \"fixed effects\" part zero-inflation component model zero_inflated_random, \"random effects\" part zero-inflation component model smooth_terms, smooth parameters Furthermore, models, especially brms, can also return auxiliary parameters. may one following: sigma, residual standard deviation (auxiliary parameter) dispersion, dispersion parameters (auxiliary parameter) beta, beta parameter (auxiliary parameter) simplex, simplex parameters monotonic effects (brms ) mix, mixture parameters (brms ) shiftprop, shifted proportion parameters (brms )","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.BGGM.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of model parameters from Bayesian models — find_parameters.BGGM","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_parameters(m) #> $conditional #> [1] \"(Intercept)\" \"wt\" \"cyl\" \"vs\" #>"},{"path":"https://easystats.github.io/insight/reference/find_parameters.averaging.html","id":null,"dir":"Reference","previous_headings":"","what":"Find model parameters from models with special components — find_parameters.averaging","title":"Find model parameters from models with special components — find_parameters.averaging","text":"Returns names model parameters, like typically appear summary() output.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.averaging.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find model parameters from models with special components — find_parameters.averaging","text":"","code":"# S3 method for class 'averaging' find_parameters(x, component = c(\"conditional\", \"full\"), flatten = FALSE, ...) # S3 method for class 'betareg' find_parameters( x, component = c(\"all\", \"conditional\", \"precision\", \"location\", \"distributional\", \"auxiliary\"), flatten = FALSE, ... ) # S3 method for class 'DirichletRegModel' find_parameters( x, component = c(\"all\", \"conditional\", \"precision\", \"location\", \"distributional\", \"auxiliary\"), flatten = FALSE, ... ) # S3 method for class 'mjoint' find_parameters( x, component = c(\"all\", \"conditional\", \"survival\"), flatten = FALSE, ... ) # S3 method for class 'glmx' find_parameters( x, component = c(\"all\", \"conditional\", \"extra\"), flatten = FALSE, ... )"},{"path":"https://easystats.github.io/insight/reference/find_parameters.averaging.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find model parameters from models with special components — find_parameters.averaging","text":"x fitted model. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.averaging.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find model parameters from models with special components — find_parameters.averaging","text":"list parameter names. returned list may following elements: conditional, \"fixed effects\" part model. full, parameters full model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.averaging.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find model parameters from models with special components — find_parameters.averaging","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_parameters(m) #> $conditional #> [1] \"(Intercept)\" \"wt\" \"cyl\" \"vs\" #>"},{"path":"https://easystats.github.io/insight/reference/find_parameters.betamfx.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of model parameters from marginal effects models — find_parameters.betamfx","title":"Find names of model parameters from marginal effects models — find_parameters.betamfx","text":"Returns names model parameters, like typically appear summary() output.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.betamfx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of model parameters from marginal effects models — find_parameters.betamfx","text":"","code":"# S3 method for class 'betamfx' find_parameters( x, component = c(\"all\", \"conditional\", \"precision\", \"marginal\", \"location\", \"distributional\", \"auxiliary\"), flatten = FALSE, ... ) # S3 method for class 'logitmfx' find_parameters( x, component = c(\"all\", \"conditional\", \"marginal\", \"location\"), flatten = FALSE, ... )"},{"path":"https://easystats.github.io/insight/reference/find_parameters.betamfx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of model parameters from marginal effects models — find_parameters.betamfx","text":"x fitted model. component type parameters return, parameters conditional model, zero-inflated part model, dispersion term, instrumental variables marginal effects returned? Applies models zero-inflated /dispersion formula, models instrumental variables (called fixed-effects regressions), models marginal effects mfx. May abbreviated. Note conditional component also called count mean component, depending model. three convenient shortcuts: component = \"\" returns possible parameters. component = \"location\", location parameters conditional, zero_inflated, smooth_terms, instruments returned (everything fixed random effects - depending effects argument - auxiliary parameters). component = \"distributional\" (\"auxiliary\"), components like sigma, dispersion, beta precision (auxiliary parameters) returned. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.betamfx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of model parameters from marginal effects models — find_parameters.betamfx","text":"list parameter names. returned list may following elements: conditional, \"fixed effects\" part model. marginal, marginal effects. precision, precision parameter.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.betamfx.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of model parameters from marginal effects models — find_parameters.betamfx","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_parameters(m) #> $conditional #> [1] \"(Intercept)\" \"wt\" \"cyl\" \"vs\" #>"},{"path":"https://easystats.github.io/insight/reference/find_parameters.emmGrid.html","id":null,"dir":"Reference","previous_headings":"","what":"Find model parameters from estimated marginal means objects — find_parameters.emmGrid","title":"Find model parameters from estimated marginal means objects — find_parameters.emmGrid","text":"Returns parameter names model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.emmGrid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find model parameters from estimated marginal means objects — find_parameters.emmGrid","text":"","code":"# S3 method for class 'emmGrid' find_parameters(x, flatten = FALSE, merge_parameters = FALSE, ...)"},{"path":"https://easystats.github.io/insight/reference/find_parameters.emmGrid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find model parameters from estimated marginal means objects — find_parameters.emmGrid","text":"x fitted model. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. merge_parameters Logical, TRUE x multiple columns parameter names (like emmGrid objects may ), merged single parameter column, parameters names values values. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.emmGrid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find model parameters from estimated marginal means objects — find_parameters.emmGrid","text":"list parameter names. simple models, one list-element, conditional, returned.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.emmGrid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find model parameters from estimated marginal means objects — find_parameters.emmGrid","text":"","code":"data(mtcars) model <- lm(mpg ~ wt * factor(cyl), data = mtcars) emm <- emmeans(model, c(\"wt\", \"cyl\")) find_parameters(emm) #> $emmeans #> [1] 3.21725 3.21725 3.21725 #>"},{"path":"https://easystats.github.io/insight/reference/find_parameters.gamlss.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of model parameters from generalized additive models — find_parameters.gamlss","title":"Find names of model parameters from generalized additive models — find_parameters.gamlss","text":"Returns names model parameters, like typically appear summary() output.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.gamlss.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of model parameters from generalized additive models — find_parameters.gamlss","text":"","code":"# S3 method for class 'gamlss' find_parameters(x, flatten = FALSE, ...) # S3 method for class 'gam' find_parameters( x, component = c(\"all\", \"conditional\", \"smooth_terms\", \"location\"), flatten = FALSE, ... )"},{"path":"https://easystats.github.io/insight/reference/find_parameters.gamlss.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of model parameters from generalized additive models — find_parameters.gamlss","text":"x fitted model. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. ... Currently used. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.gamlss.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of model parameters from generalized additive models — find_parameters.gamlss","text":"list parameter names. returned list may following elements: conditional, \"fixed effects\" part model. smooth_terms, smooth parameters.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.gamlss.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of model parameters from generalized additive models — find_parameters.gamlss","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_parameters(m) #> $conditional #> [1] \"(Intercept)\" \"wt\" \"cyl\" \"vs\" #>"},{"path":"https://easystats.github.io/insight/reference/find_parameters.glmmTMB.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of model parameters from mixed models — find_parameters.glmmTMB","title":"Find names of model parameters from mixed models — find_parameters.glmmTMB","text":"Returns names model parameters, like typically appear summary() output.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.glmmTMB.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of model parameters from mixed models — find_parameters.glmmTMB","text":"","code":"# S3 method for class 'glmmTMB' find_parameters( x, effects = c(\"all\", \"fixed\", \"random\"), component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\", \"dispersion\"), flatten = FALSE, ... ) # S3 method for class 'nlmerMod' find_parameters( x, effects = c(\"all\", \"fixed\", \"random\"), component = c(\"all\", \"conditional\", \"nonlinear\"), flatten = FALSE, ... ) # S3 method for class 'hglm' find_parameters( x, effects = c(\"all\", \"fixed\", \"random\"), component = c(\"all\", \"conditional\", \"dispersion\"), flatten = FALSE, ... ) # S3 method for class 'merMod' find_parameters(x, effects = c(\"all\", \"fixed\", \"random\"), flatten = FALSE, ...)"},{"path":"https://easystats.github.io/insight/reference/find_parameters.glmmTMB.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of model parameters from mixed models — find_parameters.glmmTMB","text":"x fitted model. effects parameters fixed effects, random effects returned? applies mixed models. May abbreviated. component type parameters return, parameters conditional model, zero-inflated part model dispersion term? Applies models zero-inflated /dispersion formula. Note conditional component also called count mean component, depending model. three convenient shortcuts: component = \"\" returns possible parameters. component = \"location\", location parameters conditional zero_inflated returned (everything fixed random effects - depending effects argument - auxiliary parameters). component = \"distributional\" (\"auxiliary\"), components like sigma dispersion (auxiliary parameters) returned. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.glmmTMB.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of model parameters from mixed models — find_parameters.glmmTMB","text":"list parameter names. returned list may following elements: conditional, \"fixed effects\" part model. random, \"random effects\" part model. zero_inflated, \"fixed effects\" part zero-inflation component model. zero_inflated_random, \"random effects\" part zero-inflation component model. dispersion, dispersion parameters (auxiliary parameter) nonlinear, parameters nonlinear formula.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.glmmTMB.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of model parameters from mixed models — find_parameters.glmmTMB","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_parameters(m) #> $conditional #> [1] \"(Intercept)\" \"wt\" \"cyl\" \"vs\" #>"},{"path":"https://easystats.github.io/insight/reference/find_parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of model parameters — find_parameters","title":"Find names of model parameters — find_parameters","text":"Returns names model parameters, like typically appear summary() output. Bayesian models, parameter names equal column names posterior samples coercion .data.frame(). See documentation object's class: Bayesian models (rstanarm, brms, MCMCglmm, ...) Generalized additive models (mgcv, VGAM, ...) Marginal effects models (mfx) Estimated marginal means (emmeans) Mixed models (lme4, glmmTMB, GLMMadaptive, ...) Zero-inflated hurdle models (pscl, ...) Models special components (betareg, MuMIn, ...)","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of model parameters — find_parameters","text":"","code":"find_parameters(x, ...) # Default S3 method find_parameters(x, flatten = FALSE, verbose = TRUE, ...) # S3 method for class 'pgmm' find_parameters(x, component = c(\"conditional\", \"all\"), flatten = FALSE, ...) # S3 method for class 'nls' find_parameters( x, component = c(\"all\", \"conditional\", \"nonlinear\"), flatten = FALSE, ... )"},{"path":"https://easystats.github.io/insight/reference/find_parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of model parameters — find_parameters","text":"x fitted model. ... Currently used. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. verbose Toggle messages warnings. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of model parameters — find_parameters","text":"list parameter names. simple models, one list-element, conditional, returned.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.html","id":"model-components","dir":"Reference","previous_headings":"","what":"Model components","title":"Find names of model parameters — find_parameters","text":"Possible values component argument depend model class. Following valid options: \"\": returns model components, applies models, effect models just conditional model component. \"conditional\": returns conditional component, .e. \"fixed effects\" terms model. effect models just conditional model component. \"smooth_terms\": returns smooth terms, applies GAMs (similar models may contain smooth terms). \"zero_inflated\" (\"zi\"): returns zero-inflation component. \"dispersion\": returns dispersion model component. common models zero-inflation can model dispersion parameter. \"instruments\": instrumental-variable fixed effects regression, returns instruments. \"location\": returns location parameters conditional, zero_inflated, smooth_terms, instruments (everything fixed random effects - depending effects argument - auxiliary parameters). \"distributional\" (\"auxiliary\"): components like sigma, dispersion, beta precision (auxiliary parameters) returned.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of model parameters — find_parameters","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_parameters(m) #> $conditional #> [1] \"(Intercept)\" \"wt\" \"cyl\" \"vs\" #>"},{"path":"https://easystats.github.io/insight/reference/find_parameters.zeroinfl.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of model parameters from zero-inflated models — find_parameters.zeroinfl","title":"Find names of model parameters from zero-inflated models — find_parameters.zeroinfl","text":"Returns names model parameters, like typically appear summary() output.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.zeroinfl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of model parameters from zero-inflated models — find_parameters.zeroinfl","text":"","code":"# S3 method for class 'zeroinfl' find_parameters( x, component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\"), flatten = FALSE, ... ) # S3 method for class 'mhurdle' find_parameters( x, component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\", \"infrequent_purchase\", \"ip\", \"auxiliary\"), flatten = FALSE, ... )"},{"path":"https://easystats.github.io/insight/reference/find_parameters.zeroinfl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of model parameters from zero-inflated models — find_parameters.zeroinfl","text":"x fitted model. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.zeroinfl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of model parameters from zero-inflated models — find_parameters.zeroinfl","text":"list parameter names. returned list may following elements: conditional, \"fixed effects\" part model. zero_inflated, \"fixed effects\" part zero-inflation component model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.zeroinfl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of model parameters from zero-inflated models — find_parameters.zeroinfl","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_parameters(m) #> $conditional #> [1] \"(Intercept)\" \"wt\" \"cyl\" \"vs\" #>"},{"path":"https://easystats.github.io/insight/reference/find_predictors.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of model predictors — find_predictors","title":"Find names of model predictors — find_predictors","text":"Returns names predictor variables different parts model (like fixed random effects, zero-inflated component, ...). Unlike find_parameters(), names find_predictors() match original variable names data used fit model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_predictors.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of model predictors — find_predictors","text":"","code":"find_predictors(x, ...) # Default S3 method find_predictors( x, effects = c(\"fixed\", \"random\", \"all\"), component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\", \"dispersion\", \"instruments\", \"correlation\", \"smooth_terms\"), flatten = FALSE, verbose = TRUE, ... ) # S3 method for class 'afex_aov' find_predictors( x, effects = c(\"fixed\", \"random\", \"all\"), component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\", \"dispersion\", \"instruments\", \"correlation\", \"smooth_terms\"), flatten = FALSE, verbose = TRUE, ... )"},{"path":"https://easystats.github.io/insight/reference/find_predictors.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of model predictors — find_predictors","text":"x fitted model. ... Currently used. effects variables fixed effects, random effects returned? applies mixed models. May abbreviated. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/find_predictors.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of model predictors — find_predictors","text":"list character vectors represent name(s) predictor variables. Depending combination arguments effects component, returned list following elements: conditional, \"fixed effects\" terms model random, \"random effects\" terms model zero_inflated, \"fixed effects\" terms zero-inflation component model zero_inflated_random, \"random effects\" terms zero-inflation component model dispersion, dispersion terms instruments, fixed-effects regressions like ivreg, felm plm, instrumental variables correlation, models correlation-component like gls, variables used describe correlation structure","code":""},{"path":"https://easystats.github.io/insight/reference/find_predictors.html","id":"model-components","dir":"Reference","previous_headings":"","what":"Model components","title":"Find names of model predictors — find_predictors","text":"Possible values component argument depend model class. Following valid options: \"\": returns model components, applies models, effect models just conditional model component. \"conditional\": returns conditional component, .e. \"fixed effects\" terms model. effect models just conditional model component. \"smooth_terms\": returns smooth terms, applies GAMs (similar models may contain smooth terms). \"zero_inflated\" (\"zi\"): returns zero-inflation component. \"dispersion\": returns dispersion model component. common models zero-inflation can model dispersion parameter. \"instruments\": instrumental-variable fixed effects regression, returns instruments. \"location\": returns location parameters conditional, zero_inflated, smooth_terms, instruments (everything fixed random effects - depending effects argument - auxiliary parameters). \"distributional\" (\"auxiliary\"): components like sigma, dispersion, beta precision (auxiliary parameters) returned.","code":""},{"path":"https://easystats.github.io/insight/reference/find_predictors.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of model predictors — find_predictors","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_predictors(m) #> $conditional #> [1] \"wt\" \"cyl\" \"vs\" #>"},{"path":"https://easystats.github.io/insight/reference/find_random.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of random effects — find_random","title":"Find names of random effects — find_random","text":"Return name grouping factors mixed effects models.","code":""},{"path":"https://easystats.github.io/insight/reference/find_random.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of random effects — find_random","text":"","code":"find_random(x, split_nested = FALSE, flatten = FALSE)"},{"path":"https://easystats.github.io/insight/reference/find_random.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of random effects — find_random","text":"x fitted mixed model. split_nested Logical, TRUE, terms nested random effects returned separated elements, single string colon. See 'Examples'. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed.","code":""},{"path":"https://easystats.github.io/insight/reference/find_random.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of random effects — find_random","text":"list character vectors represent name(s) random effects (grouping factors). Depending model, returned list following elements: random, \"random effects\" terms conditional part model zero_inflated_random, \"random effects\" terms zero-inflation component model","code":""},{"path":"https://easystats.github.io/insight/reference/find_random.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of random effects — find_random","text":"","code":"data(sleepstudy, package = \"lme4\") sleepstudy$mygrp <- sample(1:5, size = 180, replace = TRUE) sleepstudy$mysubgrp <- NA for (i in 1:5) { filter_group <- sleepstudy$mygrp == i sleepstudy$mysubgrp[filter_group] <- sample(1:30, size = sum(filter_group), replace = TRUE) } m <- lme4::lmer( Reaction ~ Days + (1 | mygrp / mysubgrp) + (1 | Subject), data = sleepstudy ) #> boundary (singular) fit: see help('isSingular') find_random(m) #> $random #> [1] \"mysubgrp:mygrp\" \"mygrp\" \"Subject\" #> find_random(m, split_nested = TRUE) #> $random #> [1] \"mysubgrp\" \"mygrp\" \"Subject\" #>"},{"path":"https://easystats.github.io/insight/reference/find_random_slopes.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of random slopes — find_random_slopes","title":"Find names of random slopes — find_random_slopes","text":"Return name random slopes mixed effects models.","code":""},{"path":"https://easystats.github.io/insight/reference/find_random_slopes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of random slopes — find_random_slopes","text":"","code":"find_random_slopes(x)"},{"path":"https://easystats.github.io/insight/reference/find_random_slopes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of random slopes — find_random_slopes","text":"x fitted mixed model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_random_slopes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of random slopes — find_random_slopes","text":"list character vectors name(s) random slopes, NULL model random slopes. Depending model, returned list following elements: random, random slopes conditional part model zero_inflated_random, random slopes zero-inflation component model","code":""},{"path":"https://easystats.github.io/insight/reference/find_random_slopes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of random slopes — find_random_slopes","text":"","code":"data(sleepstudy, package = \"lme4\") m <- lme4::lmer(Reaction ~ Days + (1 + Days | Subject), data = sleepstudy) find_random_slopes(m) #> $random #> [1] \"Days\" #>"},{"path":"https://easystats.github.io/insight/reference/find_response.html","id":null,"dir":"Reference","previous_headings":"","what":"Find name of the response variable — find_response","title":"Find name of the response variable — find_response","text":"Returns name(s) response variable(s) model object.","code":""},{"path":"https://easystats.github.io/insight/reference/find_response.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find name of the response variable — find_response","text":"","code":"find_response(x, combine = TRUE, ...) # S3 method for class 'mjoint' find_response( x, combine = TRUE, component = c(\"conditional\", \"survival\", \"all\"), ... ) # S3 method for class 'joint' find_response( x, combine = TRUE, component = c(\"conditional\", \"survival\", \"all\"), ... )"},{"path":"https://easystats.github.io/insight/reference/find_response.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find name of the response variable — find_response","text":"x fitted model. combine Logical, TRUE response matrix-column, name response matches notation formula, instance also contain patterns like \"cbind(...)\". Else, original variable names matrix-column returned. See 'Examples'. ... Currently used. component Character, x joint model, argument can used specify component return. Possible values \"conditional\", \"survival\" \"\".","code":""},{"path":"https://easystats.github.io/insight/reference/find_response.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find name of the response variable — find_response","text":"name(s) response variable(s) x character vector, NULL response variable found.","code":""},{"path":"https://easystats.github.io/insight/reference/find_response.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find name of the response variable — find_response","text":"","code":"data(cbpp, package = \"lme4\") cbpp$trials <- cbpp$size - cbpp$incidence m <- glm(cbind(incidence, trials) ~ period, data = cbpp, family = binomial) find_response(m, combine = TRUE) #> [1] \"cbind(incidence, trials)\" find_response(m, combine = FALSE) #> [1] \"incidence\" \"trials\""},{"path":"https://easystats.github.io/insight/reference/find_smooth.html","id":null,"dir":"Reference","previous_headings":"","what":"Find smooth terms from a model object — find_smooth","title":"Find smooth terms from a model object — find_smooth","text":"Return names smooth terms model object.","code":""},{"path":"https://easystats.github.io/insight/reference/find_smooth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find smooth terms from a model object — find_smooth","text":"","code":"find_smooth(x, flatten = FALSE)"},{"path":"https://easystats.github.io/insight/reference/find_smooth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find smooth terms from a model object — find_smooth","text":"x (gam) model. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed.","code":""},{"path":"https://easystats.github.io/insight/reference/find_smooth.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find smooth terms from a model object — find_smooth","text":"character vector name(s) smooth terms.","code":""},{"path":"https://easystats.github.io/insight/reference/find_smooth.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find smooth terms from a model object — find_smooth","text":"","code":"data(iris) model <- mgcv::gam(Petal.Length ~ Petal.Width + s(Sepal.Length), data = iris) find_smooth(model) #> $smooth_terms #> [1] \"s(Sepal.Length)\" #>"},{"path":"https://easystats.github.io/insight/reference/find_statistic.html","id":null,"dir":"Reference","previous_headings":"","what":"Find statistic for model — find_statistic","title":"Find statistic for model — find_statistic","text":"Returns statistic regression model (t-statistic, z-statistic, etc.). Small helper checks model regression model object return statistic used.","code":""},{"path":"https://easystats.github.io/insight/reference/find_statistic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find statistic for model — find_statistic","text":"","code":"find_statistic(x, ...)"},{"path":"https://easystats.github.io/insight/reference/find_statistic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find statistic for model — find_statistic","text":"x object. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/find_statistic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find statistic for model — find_statistic","text":"character describing type statistic. statistic available distribution, NULL returned.","code":""},{"path":"https://easystats.github.io/insight/reference/find_statistic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find statistic for model — find_statistic","text":"","code":"# regression model object data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_statistic(m) #> [1] \"t-statistic\""},{"path":"https://easystats.github.io/insight/reference/find_terms.html","id":null,"dir":"Reference","previous_headings":"","what":"Find all model terms — find_terms","title":"Find all model terms — find_terms","text":"Returns list names terms, including response value random effects, \"\". means, --fly tranformations arithmetic expressions like log(), (), .factor() etc. preserved.","code":""},{"path":"https://easystats.github.io/insight/reference/find_terms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find all model terms — find_terms","text":"","code":"find_terms(x, ...) # Default S3 method find_terms(x, flatten = FALSE, as_term_labels = FALSE, verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/find_terms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find all model terms — find_terms","text":"x fitted model. ... Currently used. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. as_term_labels Logical, TRUE, extracts model formula tries access \"term.labels\" attribute. better mimic terms() behaviour even models method, may insufficient, e.g. mixed models. verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/find_terms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find all model terms — find_terms","text":"list (depending model) following elements (character vectors): response, name response variable conditional, names predictor variables conditional model (opposed zero-inflated part model) random, names random effects (grouping factors) zero_inflated, names predictor variables zero-inflated part model zero_inflated_random, names random effects (grouping factors) dispersion, name dispersion terms instruments, names instrumental variables Returns NULL terms found (instance, due problems accessing formula).","code":""},{"path":"https://easystats.github.io/insight/reference/find_terms.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Find all model terms — find_terms","text":"difference find_variables() find_terms() may return variable multiple times case multiple transformations (see examples ), find_variables() returns variable name .","code":""},{"path":"https://easystats.github.io/insight/reference/find_terms.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find all model terms — find_terms","text":"","code":"data(sleepstudy, package = \"lme4\") m <- suppressWarnings(lme4::lmer( log(Reaction) ~ Days + I(Days^2) + (1 + Days + exp(Days) | Subject), data = sleepstudy )) find_terms(m) #> $response #> [1] \"log(Reaction)\" #> #> $conditional #> [1] \"Days\" \"I(Days^2)\" #> #> $random #> [1] \"Days\" \"exp(Days)\" \"Subject\" #> # sometimes, it is necessary to retrieve terms from \"term.labels\" attribute m <- lm(mpg ~ hp * (am + cyl), data = mtcars) find_terms(m, as_term_labels = TRUE) #> $conditional #> [1] \"hp\" \"am\" \"cyl\" \"hp:am\" \"hp:cyl\" #>"},{"path":"https://easystats.github.io/insight/reference/find_transformation.html","id":null,"dir":"Reference","previous_headings":"","what":"Find possible transformation of response variables — find_transformation","title":"Find possible transformation of response variables — find_transformation","text":"functions checks whether transformation, log- exp-transforming, applied response variable (dependent variable) regression formula. Currently, following patterns detected: log, log1p, log2, log10, exp, expm1, sqrt, log(x+), log-log power (2nd power, like (x^2)).","code":""},{"path":"https://easystats.github.io/insight/reference/find_transformation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find possible transformation of response variables — find_transformation","text":"","code":"find_transformation(x)"},{"path":"https://easystats.github.io/insight/reference/find_transformation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find possible transformation of response variables — find_transformation","text":"x regression model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_transformation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find possible transformation of response variables — find_transformation","text":"string, name function applied transformation. Returns \"identity\" transformation, e.g. \"log(x+3)\" specific values added response variables log-transforming. unknown transformations, returns NULL.","code":""},{"path":"https://easystats.github.io/insight/reference/find_transformation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find possible transformation of response variables — find_transformation","text":"","code":"# identity, no transformation model <- lm(Sepal.Length ~ Species, data = iris) find_transformation(model) #> [1] \"identity\" # log-transformation model <- lm(log(Sepal.Length) ~ Species, data = iris) find_transformation(model) #> [1] \"log\" # log+2 model <- lm(log(Sepal.Length + 2) ~ Species, data = iris) find_transformation(model) #> [1] \"log(x+2)\""},{"path":"https://easystats.github.io/insight/reference/find_variables.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of all variables — find_variables","title":"Find names of all variables — find_variables","text":"Returns list names variables, including response value random effects.","code":""},{"path":"https://easystats.github.io/insight/reference/find_variables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of all variables — find_variables","text":"","code":"find_variables( x, effects = \"all\", component = \"all\", flatten = FALSE, verbose = TRUE )"},{"path":"https://easystats.github.io/insight/reference/find_variables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of all variables — find_variables","text":"x fitted model. effects variables fixed effects, random effects returned? applies mixed models. May abbreviated. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/find_variables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of all variables — find_variables","text":"list (depending model) following elements (character vectors): response, name response variable conditional, names predictor variables conditional model (opposed zero-inflated part model) cluster, names cluster grouping variables dispersion, name dispersion terms instruments, names instrumental variables random, names random effects (grouping factors) zero_inflated, names predictor variables zero-inflated part model zero_inflated_random, names random effects (grouping factors)","code":""},{"path":"https://easystats.github.io/insight/reference/find_variables.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Find names of all variables — find_variables","text":"difference find_terms() find_variables() returns variable name , find_terms() may return variable multiple times case transformations arithmetic expressions used formula.","code":""},{"path":"https://easystats.github.io/insight/reference/find_variables.html","id":"model-components","dir":"Reference","previous_headings":"","what":"Model components","title":"Find names of all variables — find_variables","text":"Possible values component argument depend model class. Following valid options: \"\": returns model components, applies models, effect models just conditional model component. \"conditional\": returns conditional component, .e. \"fixed effects\" terms model. effect models just conditional model component. \"smooth_terms\": returns smooth terms, applies GAMs (similar models may contain smooth terms). \"zero_inflated\" (\"zi\"): returns zero-inflation component. \"dispersion\": returns dispersion model component. common models zero-inflation can model dispersion parameter. \"instruments\": instrumental-variable fixed effects regression, returns instruments. \"location\": returns location parameters conditional, zero_inflated, smooth_terms, instruments (everything fixed random effects - depending effects argument - auxiliary parameters). \"distributional\" (\"auxiliary\"): components like sigma, dispersion, beta precision (auxiliary parameters) returned.","code":""},{"path":"https://easystats.github.io/insight/reference/find_variables.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of all variables — find_variables","text":"","code":"data(cbpp, package = \"lme4\") data(sleepstudy, package = \"lme4\") # some data preparation... cbpp$trials <- cbpp$size - cbpp$incidence sleepstudy$mygrp <- sample(1:5, size = 180, replace = TRUE) sleepstudy$mysubgrp <- NA for (i in 1:5) { filter_group <- sleepstudy$mygrp == i sleepstudy$mysubgrp[filter_group] <- sample(1:30, size = sum(filter_group), replace = TRUE) } m1 <- lme4::glmer( cbind(incidence, size - incidence) ~ period + (1 | herd), data = cbpp, family = binomial ) find_variables(m1) #> $response #> [1] \"incidence\" \"size\" #> #> $conditional #> [1] \"period\" #> #> $random #> [1] \"herd\" #> m2 <- lme4::lmer( Reaction ~ Days + (1 | mygrp / mysubgrp) + (1 | Subject), data = sleepstudy ) #> boundary (singular) fit: see help('isSingular') find_variables(m2) #> $response #> [1] \"Reaction\" #> #> $conditional #> [1] \"Days\" #> #> $random #> [1] \"mysubgrp\" \"mygrp\" \"Subject\" #> find_variables(m2, flatten = TRUE) #> [1] \"Reaction\" \"Days\" \"mysubgrp\" \"mygrp\" \"Subject\""},{"path":"https://easystats.github.io/insight/reference/find_weights.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of model weights — find_weights","title":"Find names of model weights — find_weights","text":"Returns name variable describes weights model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_weights.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of model weights — find_weights","text":"","code":"find_weights(x, ...)"},{"path":"https://easystats.github.io/insight/reference/find_weights.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of model weights — find_weights","text":"x fitted model. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/find_weights.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of model weights — find_weights","text":"name weighting variable character vector, NULL weights specified.","code":""},{"path":"https://easystats.github.io/insight/reference/find_weights.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of model weights — find_weights","text":"","code":"data(mtcars) mtcars$weight <- rnorm(nrow(mtcars), 1, .3) m <- lm(mpg ~ wt + cyl + vs, data = mtcars, weights = weight) find_weights(m) #> [1] \"weight\""},{"path":"https://easystats.github.io/insight/reference/fish.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample data set — fish","title":"Sample data set — fish","text":"sample data set, used tests examples.","code":""},{"path":"https://easystats.github.io/insight/reference/format_bf.html","id":null,"dir":"Reference","previous_headings":"","what":"Bayes Factor formatting — format_bf","title":"Bayes Factor formatting — format_bf","text":"Bayes Factor formatting","code":""},{"path":"https://easystats.github.io/insight/reference/format_bf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bayes Factor formatting — format_bf","text":"","code":"format_bf( bf, stars = FALSE, stars_only = FALSE, name = \"BF\", protect_ratio = FALSE, na_reference = NA, exact = FALSE )"},{"path":"https://easystats.github.io/insight/reference/format_bf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bayes Factor formatting — format_bf","text":"bf Bayes Factor. stars Add significance stars (e.g., p < .001***). stars_only Return significance stars. name Name prefixing text. Can NULL. protect_ratio values smaller 1 represented ratios? na_reference format missing values (NA). exact large small values reported scientific format (e.g., 4.24e5), truncated values (\"> 1000\" \"< 1/1000\").","code":""},{"path":"https://easystats.github.io/insight/reference/format_bf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Bayes Factor formatting — format_bf","text":"formatted string.","code":""},{"path":"https://easystats.github.io/insight/reference/format_bf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Bayes Factor formatting — format_bf","text":"","code":"format_bf(bfs <- c(0.000045, 0.033, NA, 1557, 3.54)) #> [1] \"BF < 0.001\" \"BF = 0.033\" \"\" \"BF > 1000\" \"BF = 3.54\" format_bf(bfs, exact = TRUE, name = NULL) #> [1] \"4.50e-05\" \"0.033\" \"\" \"1.56e+03\" \"3.54\" format_bf(bfs, stars = TRUE) #> [1] \"BF < 0.001\" \"BF = 0.033\" \"\" \"BF > 1000***\" \"BF = 3.54*\" format_bf(bfs, protect_ratio = TRUE) #> [1] \"BF < 1/1000\" \"BF = 1/30.30\" \"\" \"BF > 1000\" \"BF = 3.54\" format_bf(bfs, protect_ratio = TRUE, exact = TRUE) #> [1] \"BF = 1/2.22e+04\" \"BF = 1/30.30\" \"\" \"BF = 1.56e+03\" #> [5] \"BF = 3.54\" format_bf(bfs, na_reference = 1) #> [1] \"BF < 0.001\" \"BF = 0.033\" \"BF = 1.00\" \"BF > 1000\" \"BF = 3.54\""},{"path":"https://easystats.github.io/insight/reference/format_capitalize.html","id":null,"dir":"Reference","previous_headings":"","what":"Capitalizes the first letter in a string — format_capitalize","title":"Capitalizes the first letter in a string — format_capitalize","text":"function converts first letter string upper case.","code":""},{"path":"https://easystats.github.io/insight/reference/format_capitalize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Capitalizes the first letter in a string — format_capitalize","text":"","code":"format_capitalize(x, verbose = TRUE)"},{"path":"https://easystats.github.io/insight/reference/format_capitalize.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Capitalizes the first letter in a string — format_capitalize","text":"x character vector factor. latter coerced character. objects returned unchanged. verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/format_capitalize.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Capitalizes the first letter in a string — format_capitalize","text":"x, first letter capitalized.","code":""},{"path":"https://easystats.github.io/insight/reference/format_capitalize.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Capitalizes the first letter in a string — format_capitalize","text":"","code":"format_capitalize(\"hello\") #> [1] \"Hello\" format_capitalize(c(\"hello\", \"world\")) #> [1] \"Hello\" \"World\" unique(format_capitalize(iris$Species)) #> [1] \"Setosa\" \"Versicolor\" \"Virginica\""},{"path":"https://easystats.github.io/insight/reference/format_ci.html","id":null,"dir":"Reference","previous_headings":"","what":"Confidence/Credible Interval (CI) Formatting — format_ci","title":"Confidence/Credible Interval (CI) Formatting — format_ci","text":"Confidence/Credible Interval (CI) Formatting","code":""},{"path":"https://easystats.github.io/insight/reference/format_ci.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Confidence/Credible Interval (CI) Formatting — format_ci","text":"","code":"format_ci(CI_low, ...) # S3 method for class 'numeric' format_ci( CI_low, CI_high, ci = 0.95, digits = 2, brackets = TRUE, width = NULL, width_low = width, width_high = width, missing = \"\", zap_small = FALSE, ci_string = \"CI\", ... )"},{"path":"https://easystats.github.io/insight/reference/format_ci.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Confidence/Credible Interval (CI) Formatting — format_ci","text":"CI_low Lower CI bound. Usually numeric value, can also CI output returned bayestestR, case remaining arguments unnecessary. ... Arguments passed methods. CI_high Upper CI bound. ci CI level percentage. digits Number digits rounding significant figures. May also \"signif\" return significant figures \"scientific\" return scientific notation. Control number digits adding value suffix, e.g. digits = \"scientific4\" scientific notation 4 decimal places, digits = \"signif5\" 5 significant figures (see also signif()). brackets Either logical, TRUE (default), values encompassed square brackets. FALSE NULL, brackets used. Else, character vector length two, indicating opening closing brackets. width Minimum width returned string. NULL width larger string's length, leading whitespaces added string. width=\"auto\", width set length longest string. width_low, width_high Like width, applies lower higher confidence interval value. can used values lower upper CI different length. missing Value NA values replaced. default, empty string (.e. \"\") returned NA. zap_small Logical, TRUE, small values rounded digits decimal places. FALSE, values decimal places digits printed scientific notation. ci_string String used output indicate type interval. Default \"CI\", can changed \"HDI\" anything else, necessary.","code":""},{"path":"https://easystats.github.io/insight/reference/format_ci.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Confidence/Credible Interval (CI) Formatting — format_ci","text":"formatted string.","code":""},{"path":"https://easystats.github.io/insight/reference/format_ci.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Confidence/Credible Interval (CI) Formatting — format_ci","text":"","code":"format_ci(1.20, 3.57, ci = 0.90) #> [1] \"90% CI [1.20, 3.57]\" format_ci(1.20, 3.57, ci = NULL) #> [1] \"[1.20, 3.57]\" format_ci(1.20, 3.57, ci = NULL, brackets = FALSE) #> [1] \"1.20, 3.57\" format_ci(1.20, 3.57, ci = NULL, brackets = c(\"(\", \")\")) #> [1] \"(1.20, 3.57)\" format_ci(c(1.205645, 23.4), c(3.57, -1.35), ci = 0.90) #> [1] \"90% CI [1.21, 3.57]\" \"90% CI [23.40, -1.35]\" format_ci(c(1.20, NA, NA), c(3.57, -1.35, NA), ci = 0.90) #> [1] \"90% CI [1.20, 3.57]\" \"90% CI [, -1.35]\" \"\" # automatic alignment of width, useful for printing multiple CIs in columns x <- format_ci(c(1.205, 23.4, 100.43), c(3.57, -13.35, 9.4)) cat(x, sep = \"\\n\") #> 95% CI [1.21, 3.57] #> 95% CI [23.40, -13.35] #> 95% CI [100.43, 9.40] x <- format_ci(c(1.205, 23.4, 100.43), c(3.57, -13.35, 9.4), width = \"auto\") cat(x, sep = \"\\n\") #> 95% CI [ 1.21, 3.57] #> 95% CI [ 23.40, -13.35] #> 95% CI [100.43, 9.40]"},{"path":"https://easystats.github.io/insight/reference/format_message.html","id":null,"dir":"Reference","previous_headings":"","what":"Format messages and warnings — format_message","title":"Format messages and warnings — format_message","text":"Inserts line breaks longer message warning string. Line length adjusted maximum length console, width can accessed. default, new lines indented two spaces. format_alert() wrapper combines formatting string call message(), warning() stop(). default, format_alert() creates message(). format_warning() format_error() change default type exception warning() stop(), respectively.","code":""},{"path":"https://easystats.github.io/insight/reference/format_message.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format messages and warnings — format_message","text":"","code":"format_message( string, ..., line_length = 0.9 * getOption(\"width\", 80), indent = \" \" ) format_alert( string, ..., line_length = 0.9 * getOption(\"width\", 80), indent = \" \", type = \"message\", call. = FALSE ) format_warning(...) format_error(...)"},{"path":"https://easystats.github.io/insight/reference/format_message.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format messages and warnings — format_message","text":"string string. ... strings concatenated indented new lines. line_length Numeric, maximum length line. default 90% width console window. indent Character vector. lines specified ..., user-defined string can specified indent subsequent lines. Defaults \" \" (two white spaces), hence start line first line, two white space characters inserted. type Type exception alert raise. Can \"message\" message(), \"warning\" warning(), \"error\" stop(). call. Logical. Indicating call included error message. usually confusing users function producing warning error deep within another function, default FALSE.","code":""},{"path":"https://easystats.github.io/insight/reference/format_message.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Format messages and warnings — format_message","text":"format_message(), formatted string. format_alert() related functions, requested exception, exception formatted using format_message().","code":""},{"path":"https://easystats.github.io/insight/reference/format_message.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Format messages and warnings — format_message","text":"experimental formatting feature implemented function. can use following tags: {.b text} bold formatting {.text} use italic font style {.url www.url.com} formats string URL (.e., enclosing URL < >, blue color italic font style) {.pkg packagename} formats text blue color. features limitations: hard detect exact length line string multiple lines (line breaks) string contains formatting tags. Thus, can happen lines wrapped earlier length expected. Furthermore, multiple words format tag ({.b one two three}), line break might occur inside tag, formatting longer works (messing message-string).","code":""},{"path":"https://easystats.github.io/insight/reference/format_message.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format messages and warnings — format_message","text":"","code":"msg <- format_message(\"Much too long string for just one line, I guess!\", line_length = 15 ) message(msg) #> Much too long #> string for just #> one line, I #> guess! msg <- format_message(\"Much too long string for just one line, I guess!\", \"First new line\", \"Second new line\", \"(both indented)\", line_length = 30 ) message(msg) #> Much too long string for just #> one line, I guess! #> First new line #> Second new line #> (both indented) msg <- format_message(\"Much too long string for just one line, I guess!\", \"First new line\", \"Second new line\", \"(not indented)\", line_length = 30, indent = \"\" ) message(msg) #> Much too long string for just #> one line, I guess! #> First new line #> Second new line #> (not indented) # Caution, experimental! See 'Details' msg <- format_message( \"This is {.i italic}, visit {.url easystats.github.io/easystats}\", line_length = 30 ) message(msg) #> This is italic, visit #> # message format_alert(\"This is a message.\") #> This is a message. format_alert(\"This is a warning.\", type = \"message\") #> This is a warning. # error try(format_error(\"This is an error.\")) #> Error : This is an error. # warning format_warning(\"This is a warning.\") #> Warning: This is a warning."},{"path":"https://easystats.github.io/insight/reference/format_number.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert number to words — format_number","title":"Convert number to words — format_number","text":"Convert number words","code":""},{"path":"https://easystats.github.io/insight/reference/format_number.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert number to words — format_number","text":"","code":"format_number(x, textual = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/format_number.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert number to words — format_number","text":"x Number. textual Return words. FALSE, run format_value(). ... Arguments passed format_value() textual FALSE.","code":""},{"path":"https://easystats.github.io/insight/reference/format_number.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert number to words — format_number","text":"formatted string.","code":""},{"path":"https://easystats.github.io/insight/reference/format_number.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Convert number to words — format_number","text":"code adapted https://github.com/ateucher/useful_code/blob/master/R/numbers2words.r","code":""},{"path":"https://easystats.github.io/insight/reference/format_number.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert number to words — format_number","text":"","code":"format_number(2) #> [1] \"two\" format_number(45) #> [1] \"forty five\" format_number(324.68765) #> [1] \"three hundred and twenty five\""},{"path":"https://easystats.github.io/insight/reference/format_p.html","id":null,"dir":"Reference","previous_headings":"","what":"p-values formatting — format_p","title":"p-values formatting — format_p","text":"Format p-values.","code":""},{"path":"https://easystats.github.io/insight/reference/format_p.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"p-values formatting — format_p","text":"","code":"format_p( p, stars = FALSE, stars_only = FALSE, whitespace = TRUE, name = \"p\", missing = \"\", decimal_separator = NULL, digits = 3, ... )"},{"path":"https://easystats.github.io/insight/reference/format_p.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"p-values formatting — format_p","text":"p value vector p-values. stars Add significance stars (e.g., p < .001***). stars_only Return significance stars. whitespace Logical, TRUE (default), preserves whitespaces. Else, whitespace characters removed returned string. name Name prefixing text. Can NULL. missing Value NA values replaced. default, empty string (.e. \"\") returned NA. decimal_separator Character, NULL, used decimal separator. digits Number significant digits. May also \"scientific\" return exact p-values scientific notation, \"apa\" use APA 7th edition-style p-values (equivalent digits = 3). \"scientific\", control number digits adding value suffix, e.g.m digits = \"scientific4\" scientific notation 4 decimal places. ... Arguments methods.","code":""},{"path":"https://easystats.github.io/insight/reference/format_p.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"p-values formatting — format_p","text":"formatted string.","code":""},{"path":"https://easystats.github.io/insight/reference/format_p.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"p-values formatting — format_p","text":"","code":"format_p(c(.02, .065, 0, .23)) #> [1] \"p = 0.020\" \"p = 0.065\" \"p < .001\" \"p = 0.230\" format_p(c(.02, .065, 0, .23), name = NULL) #> [1] \"0.020\" \"0.065\" \"< .001\" \"0.230\" format_p(c(.02, .065, 0, .23), stars_only = TRUE) #> [1] \"*\" \"\" \"***\" \"\" model <- lm(mpg ~ wt + cyl, data = mtcars) p <- coef(summary(model))[, 4] format_p(p, digits = \"apa\") #> [1] \"p < .001\" \"p < .001\" \"p = 0.001\" format_p(p, digits = \"scientific\") #> [1] \"p = 3.04318e-20\" \"p = 2.22020e-04\" \"p = 1.06428e-03\" format_p(p, digits = \"scientific2\") #> [1] \"p = 3.04e-20\" \"p = 2.22e-04\" \"p = 1.06e-03\""},{"path":"https://easystats.github.io/insight/reference/format_pd.html","id":null,"dir":"Reference","previous_headings":"","what":"Probability of direction (pd) formatting — format_pd","title":"Probability of direction (pd) formatting — format_pd","text":"Probability direction (pd) formatting","code":""},{"path":"https://easystats.github.io/insight/reference/format_pd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Probability of direction (pd) formatting — format_pd","text":"","code":"format_pd(pd, stars = FALSE, stars_only = FALSE, name = \"pd\")"},{"path":"https://easystats.github.io/insight/reference/format_pd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Probability of direction (pd) formatting — format_pd","text":"pd Probability direction (pd). stars Add significance stars (e.g., p < .001***). stars_only Return significance stars. name Name prefixing text. Can NULL.","code":""},{"path":"https://easystats.github.io/insight/reference/format_pd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Probability of direction (pd) formatting — format_pd","text":"formatted string.","code":""},{"path":"https://easystats.github.io/insight/reference/format_pd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Probability of direction (pd) formatting — format_pd","text":"","code":"format_pd(0.12) #> [1] \"pd = 12.00%\" format_pd(c(0.12, 1, 0.9999, 0.98, 0.995, 0.96), name = NULL) #> [1] \"12.00%\" \"100%\" \"99.99%\" \"98.00%\" \"99.50%\" \"96.00%\" format_pd(c(0.12, 1, 0.9999, 0.98, 0.995, 0.96), stars = TRUE) #> [1] \"pd = 12.00%\" \"pd = 100%***\" \"pd = 99.99%***\" \"pd = 98.00%*\" #> [5] \"pd = 99.50%**\" \"pd = 96.00%\""},{"path":"https://easystats.github.io/insight/reference/format_rope.html","id":null,"dir":"Reference","previous_headings":"","what":"Percentage in ROPE formatting — format_rope","title":"Percentage in ROPE formatting — format_rope","text":"Percentage ROPE formatting","code":""},{"path":"https://easystats.github.io/insight/reference/format_rope.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Percentage in ROPE formatting — format_rope","text":"","code":"format_rope(rope_percentage, name = \"in ROPE\", digits = 2)"},{"path":"https://easystats.github.io/insight/reference/format_rope.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Percentage in ROPE formatting — format_rope","text":"rope_percentage Value vector percentages ROPE. name Name prefixing text. Can NULL. digits Number significant digits. May also \"scientific\" return exact p-values scientific notation, \"apa\" use APA 7th edition-style p-values (equivalent digits = 3). \"scientific\", control number digits adding value suffix, e.g.m digits = \"scientific4\" scientific notation 4 decimal places.","code":""},{"path":"https://easystats.github.io/insight/reference/format_rope.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Percentage in ROPE formatting — format_rope","text":"formatted string.","code":""},{"path":"https://easystats.github.io/insight/reference/format_rope.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Percentage in ROPE formatting — format_rope","text":"","code":"format_rope(c(0.02, 0.12, 0.357, 0)) #> [1] \"2.00% in ROPE\" \"12.00% in ROPE\" \"35.70% in ROPE\" \"0% in ROPE\" format_rope(c(0.02, 0.12, 0.357, 0), name = NULL) #> [1] \"2.00%\" \"12.00%\" \"35.70%\" \"0%\""},{"path":"https://easystats.github.io/insight/reference/format_string.html","id":null,"dir":"Reference","previous_headings":"","what":"String Values Formatting — format_string","title":"String Values Formatting — format_string","text":"String Values Formatting","code":""},{"path":"https://easystats.github.io/insight/reference/format_string.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"String Values Formatting — format_string","text":"","code":"format_string(x, ...) # S3 method for class 'character' format_string(x, length = NULL, abbreviate = \"...\", ...)"},{"path":"https://easystats.github.io/insight/reference/format_string.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"String Values Formatting — format_string","text":"x String value. ... Arguments passed methods. length Numeric, maximum length returned string. NULL, shorten string maximum length, however, truncate inside words. .e. string length happens inside word, word removed returned string, returned string maximum length length, might shorter. abbreviate String used suffix, x shortened.","code":""},{"path":"https://easystats.github.io/insight/reference/format_string.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"String Values Formatting — format_string","text":"formatted string.","code":""},{"path":"https://easystats.github.io/insight/reference/format_string.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"String Values Formatting — format_string","text":"","code":"s <- \"This can be considered as very long string!\" # string is shorter than max.length, so returned as is format_string(s, 60) #> [1] \"This can be considered as very long string!\" # string is shortened to as many words that result in # a string of maximum 20 chars format_string(s, 20) #> [1] \"This can be...\""},{"path":"https://easystats.github.io/insight/reference/format_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Parameter table formatting — format_table","title":"Parameter table formatting — format_table","text":"functions takes data frame model parameters input formats certain columns readable layout (like collapsing separate columns lower upper confidence interval values). Furthermore, column names formatted well. Note format_table() converts columns character vectors!","code":""},{"path":"https://easystats.github.io/insight/reference/format_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parameter table formatting — format_table","text":"","code":"format_table( x, pretty_names = TRUE, stars = FALSE, digits = 2, ci_width = \"auto\", ci_brackets = TRUE, ci_digits = 2, p_digits = 3, rope_digits = 2, ic_digits = 1, zap_small = FALSE, preserve_attributes = FALSE, exact = TRUE, use_symbols = getOption(\"insight_use_symbols\", FALSE), verbose = TRUE, ... )"},{"path":"https://easystats.github.io/insight/reference/format_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parameter table formatting — format_table","text":"x data frame model's parameters, returned various functions easystats-packages. May also result broom::tidy(). pretty_names Return \"pretty\" (.e. human readable) parameter names. stars TRUE, add significance stars (e.g., p < .001***). Can also character vector, naming columns include stars significant values. especially useful Bayesian models, might multiple columns significant values, e.g. BF Bayes factor pd probability direction. cases, use stars = c(\"pd\", \"BF\") add stars columns, stars = \"BF\" add stars Bayes factor exclude pd column. Currently, following columns recognized: \"BF\", \"pd\" \"p\". digits, ci_digits, p_digits, rope_digits, ic_digits Number digits rounding significant figures. May also \"signif\" return significant figures \"scientific\" return scientific notation. Control number digits adding value suffix, e.g. digits = \"scientific4\" scientific notation 4 decimal places, digits = \"signif5\" 5 significant figures (see also signif()). ci_width Minimum width returned string confidence intervals. NULL width larger string's length, leading whitespaces added string. width=\"auto\", width set length longest string. ci_brackets Logical, TRUE (default), CI-values encompassed square brackets (else parentheses). zap_small Logical, TRUE, small values rounded digits decimal places. FALSE, values decimal places digits printed scientific notation. preserve_attributes Logical, TRUE, preserves attributes input data frame. exact Formatting Bayes factor columns, case provided data frame contains column (.e. columns named \"BF\" \"log_BF\"). exact = TRUE, large small values either reported scientific format (e.g., 4.24e5), else truncated values (\"> 1000\" \"< 1/1000\"). use_symbols Logical, TRUE, column names refer particular effectsizes (like Phi, Omega Epsilon) include related unicode-character instead written name. works Windows R >= 4.2, OS X Linux R >= 4.0. possible define global option setting, see 'Note'. verbose Toggle messages warnings. ... Arguments passed methods.","code":""},{"path":"https://easystats.github.io/insight/reference/format_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parameter table formatting — format_table","text":"data frame. Note format_table() converts columns character vectors!","code":""},{"path":"https://easystats.github.io/insight/reference/format_table.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Parameter table formatting — format_table","text":"options(insight_use_symbols = TRUE) override use_symbols argument always displays symbols, possible.","code":""},{"path":[]},{"path":"https://easystats.github.io/insight/reference/format_table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Parameter table formatting — format_table","text":"","code":"format_table(head(iris), digits = 1) #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 5.1 3.5 1.4 0.2 setosa #> 2 4.9 3.0 1.4 0.2 setosa #> 3 4.7 3.2 1.3 0.2 setosa #> 4 4.6 3.1 1.5 0.2 setosa #> 5 5.0 3.6 1.4 0.2 setosa #> 6 5.4 3.9 1.7 0.4 setosa m <- lm(Sepal.Length ~ Species * Sepal.Width, data = iris) x <- parameters::model_parameters(m) as.data.frame(format_table(x)) #> Parameter Coefficient SE 95% CI t(144) #> 1 (Intercept) 2.64 0.57 [ 1.51, 3.77] 4.62 #> 2 Species [versicolor] 0.90 0.80 [-0.68, 2.48] 1.13 #> 3 Species [virginica] 1.27 0.82 [-0.35, 2.88] 1.55 #> 4 Sepal Width 0.69 0.17 [ 0.36, 1.02] 4.17 #> 5 Species [versicolor] × Sepal Width 0.17 0.26 [-0.34, 0.69] 0.67 #> 6 Species [virginica] × Sepal Width 0.21 0.26 [-0.29, 0.72] 0.83 #> p #> 1 < .001 #> 2 0.261 #> 3 0.123 #> 4 < .001 #> 5 0.503 #> 6 0.411 as.data.frame(format_table(x, p_digits = \"scientific\")) #> Parameter Coefficient SE 95% CI t(144) #> 1 (Intercept) 2.64 0.57 [ 1.51, 3.77] 4.62 #> 2 Species [versicolor] 0.90 0.80 [-0.68, 2.48] 1.13 #> 3 Species [virginica] 1.27 0.82 [-0.35, 2.88] 1.55 #> 4 Sepal Width 0.69 0.17 [ 0.36, 1.02] 4.17 #> 5 Species [versicolor] × Sepal Width 0.17 0.26 [-0.34, 0.69] 0.67 #> 6 Species [virginica] × Sepal Width 0.21 0.26 [-0.29, 0.72] 0.83 #> p #> 1 8.52612e-06 #> 2 2.61332e-01 #> 3 1.22515e-01 #> 4 5.31104e-05 #> 5 5.02805e-01 #> 6 4.10634e-01 # \\donttest{ model <- rstanarm::stan_glm( Sepal.Length ~ Species, data = iris, refresh = 0, seed = 123 ) x <- parameters::model_parameters(model, ci = c(0.69, 0.89, 0.95)) as.data.frame(format_table(x)) #> Parameter Median 69% CI 89% CI 95% CI pd Rhat #> 1 (Intercept) 5.01 [4.93, 5.08] [4.86, 5.15] [4.88, 5.12] 100% 1.000 #> 2 Speciesversicolor 0.93 [0.82, 1.04] [0.73, 1.14] [0.76, 1.11] 100% 1.000 #> 3 Speciesvirginica 1.58 [1.48, 1.69] [1.39, 1.79] [1.42, 1.75] 100% 1.000 #> ESS Prior #> 1 3279.00 Normal (5.84 +- 2.07) #> 2 3458.00 Normal (0.00 +- 4.38) #> 3 3201.00 Normal (0.00 +- 4.38) # }"},{"path":"https://easystats.github.io/insight/reference/format_value.html","id":null,"dir":"Reference","previous_headings":"","what":"Numeric Values Formatting — format_value","title":"Numeric Values Formatting — format_value","text":"format_value() converts numeric values formatted string values, formatting can something like rounding digits, scientific notation etc. format_percent() short-cut format_value(as_percent = TRUE).","code":""},{"path":"https://easystats.github.io/insight/reference/format_value.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Numeric Values Formatting — format_value","text":"","code":"format_value(x, ...) # S3 method for class 'data.frame' format_value( x, digits = 2, protect_integers = FALSE, missing = \"\", width = NULL, as_percent = FALSE, zap_small = FALSE, lead_zero = TRUE, style_positive = \"none\", style_negative = \"hyphen\", ... ) # S3 method for class 'numeric' format_value( x, digits = 2, protect_integers = FALSE, missing = \"\", width = NULL, as_percent = FALSE, zap_small = FALSE, lead_zero = TRUE, style_positive = \"none\", style_negative = \"hyphen\", ... ) format_percent(x, ...)"},{"path":"https://easystats.github.io/insight/reference/format_value.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Numeric Values Formatting — format_value","text":"x Numeric value. ... Arguments passed methods. digits Number digits rounding significant figures. May also \"signif\" return significant figures \"scientific\" return scientific notation. Control number digits adding value suffix, e.g. digits = \"scientific4\" scientific notation 4 decimal places, digits = \"signif5\" 5 significant figures (see also signif()). protect_integers integers kept integers (.e., without decimals)? missing Value NA values replaced. default, empty string (.e. \"\") returned NA. width Minimum width returned string. NULL width larger string's length, leading whitespaces added string. as_percent Logical, TRUE, value formatted percentage value. zap_small Logical, TRUE, small values rounded digits decimal places. FALSE, values decimal places digits printed scientific notation. lead_zero Logical, TRUE (default), includes leading zeros, else leading zeros dropped. style_positive string determines style positive numbers. May \"none\" (default), \"plus\" add plus-sign \"space\" precede string Unicode \"figure space\", .e., space equally wide number +. style_negative string determines style negative numbers. May \"hyphen\" (default), \"minus\" proper Unicode minus symbol \"parens\" wrap number parentheses.","code":""},{"path":"https://easystats.github.io/insight/reference/format_value.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Numeric Values Formatting — format_value","text":"formatted string.","code":""},{"path":"https://easystats.github.io/insight/reference/format_value.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Numeric Values Formatting — format_value","text":"","code":"format_value(1.20) #> [1] \"1.20\" format_value(1.2) #> [1] \"1.20\" format_value(1.2012313) #> [1] \"1.20\" format_value(c(0.0045, 234, -23)) #> [1] \"4.50e-03\" \"234.00\" \"-23.00\" format_value(c(0.0045, .12, .34)) #> [1] \"4.50e-03\" \"0.12\" \"0.34\" format_value(c(0.0045, .12, .34), as_percent = TRUE) #> [1] \"0.45%\" \"12.00%\" \"34.00%\" format_value(c(0.0045, .12, .34), digits = \"scientific\") #> [1] \"4.50000e-03\" \"1.20000e-01\" \"3.40000e-01\" format_value(c(0.0045, .12, .34), digits = \"scientific2\") #> [1] \"4.50e-03\" \"1.20e-01\" \"3.40e-01\" format_value(c(0.045, .12, .34), lead_zero = FALSE) #> [1] \".04\" \".12\" \".34\" # default format_value(c(0.0045, .123, .345)) #> [1] \"4.50e-03\" \"0.12\" \"0.34\" # significant figures format_value(c(0.0045, .123, .345), digits = \"signif\") #> [1] \"0.0045\" \"0.123\" \"0.345\" format_value(as.factor(c(\"A\", \"B\", \"A\"))) #> [1] A B A #> Levels: A B format_value(iris$Species) #> [1] setosa setosa setosa setosa setosa setosa #> [7] setosa setosa setosa setosa setosa setosa #> [13] setosa setosa setosa setosa setosa setosa #> [19] setosa setosa setosa setosa setosa setosa #> [25] setosa setosa setosa setosa setosa setosa #> [31] setosa setosa setosa setosa setosa setosa #> [37] setosa setosa setosa setosa setosa setosa #> [43] setosa setosa setosa setosa setosa setosa #> [49] setosa setosa versicolor versicolor versicolor versicolor #> [55] versicolor versicolor versicolor versicolor versicolor versicolor #> [61] versicolor versicolor versicolor versicolor versicolor versicolor #> [67] versicolor versicolor versicolor versicolor versicolor versicolor #> [73] versicolor versicolor versicolor versicolor versicolor versicolor #> [79] versicolor versicolor versicolor versicolor versicolor versicolor #> [85] versicolor versicolor versicolor versicolor versicolor versicolor #> [91] versicolor versicolor versicolor versicolor versicolor versicolor #> [97] versicolor versicolor versicolor versicolor virginica virginica #> [103] virginica virginica virginica virginica virginica virginica #> [109] virginica virginica virginica virginica virginica virginica #> [115] virginica virginica virginica virginica virginica virginica #> [121] virginica virginica virginica virginica virginica virginica #> [127] virginica virginica virginica virginica virginica virginica #> [133] virginica virginica virginica virginica virginica virginica #> [139] virginica virginica virginica virginica virginica virginica #> [145] virginica virginica virginica virginica virginica virginica #> Levels: setosa versicolor virginica format_value(3) #> [1] \"3.00\" format_value(3, protect_integers = TRUE) #> [1] \"3\" format_value(head(iris)) #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 5.10 3.50 1.40 0.20 setosa #> 2 4.90 3.00 1.40 0.20 setosa #> 3 4.70 3.20 1.30 0.20 setosa #> 4 4.60 3.10 1.50 0.20 setosa #> 5 5.00 3.60 1.40 0.20 setosa #> 6 5.40 3.90 1.70 0.40 setosa"},{"path":"https://easystats.github.io/insight/reference/get_auxiliary.html","id":null,"dir":"Reference","previous_headings":"","what":"Get auxiliary parameters from models — get_auxiliary","title":"Get auxiliary parameters from models — get_auxiliary","text":"Returns requested auxiliary parameters models, like dispersion, sigma, beta...","code":""},{"path":"https://easystats.github.io/insight/reference/get_auxiliary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get auxiliary parameters from models — get_auxiliary","text":"","code":"get_auxiliary( x, type = \"sigma\", summary = TRUE, centrality = \"mean\", verbose = TRUE, ... )"},{"path":"https://easystats.github.io/insight/reference/get_auxiliary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get auxiliary parameters from models — get_auxiliary","text":"x model. type name auxiliary parameter retrieved. \"sigma\" available models, \"dispersion\" models class glm, glmerMod glmmTMB well brmsfit. \"beta\" parameters currently returned brmsfit models. See 'Details'. summary Logical, indicates whether full posterior samples (summary = FALSE)) summarized centrality indices posterior samples (summary = TRUE)) returned estimates. centrality models posterior samples, summary = TRUE. case, centrality = \"mean\" calculate means posterior samples parameter, centrality = \"median\" use robust median value measure central tendency. verbose Toggle warnings. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/get_auxiliary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get auxiliary parameters from models — get_auxiliary","text":"requested auxiliary parameter, NULL information accessed.","code":""},{"path":"https://easystats.github.io/insight/reference/get_auxiliary.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get auxiliary parameters from models — get_auxiliary","text":"Currently, sigma dispersion parameter returned, limited set models.","code":""},{"path":"https://easystats.github.io/insight/reference/get_auxiliary.html","id":"sigma-parameter","dir":"Reference","previous_headings":"","what":"Sigma Parameter","title":"Get auxiliary parameters from models — get_auxiliary","text":"See get_sigma().","code":""},{"path":"https://easystats.github.io/insight/reference/get_auxiliary.html","id":"dispersion-parameter","dir":"Reference","previous_headings":"","what":"Dispersion Parameter","title":"Get auxiliary parameters from models — get_auxiliary","text":"many different definitions \"dispersion\", depending context. get_auxiliary() returns dispersion parameters usually can considered variance--mean ratio generalized (linear) mixed models. Exceptions models class glmmTMB, dispersion equals σ2. detail, computation dispersion parameter generalized linear models ratio sum squared working-residuals residual degrees freedom. mixed models class glmer, dispersion parameter also called φ ratio sum squared Pearson-residuals residual degrees freedom. models class glmmTMB, dispersion σ2.","code":""},{"path":"https://easystats.github.io/insight/reference/get_auxiliary.html","id":"brms-models","dir":"Reference","previous_headings":"","what":"brms models","title":"Get auxiliary parameters from models — get_auxiliary","text":"models class brmsfit, different options type argument. See list supported auxiliary parameters : find_parameters.BGGM().","code":""},{"path":"https://easystats.github.io/insight/reference/get_auxiliary.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get auxiliary parameters from models — get_auxiliary","text":"","code":"# from ?glm clotting <- data.frame( u = c(5, 10, 15, 20, 30, 40, 60, 80, 100), lot1 = c(118, 58, 42, 35, 27, 25, 21, 19, 18), lot2 = c(69, 35, 26, 21, 18, 16, 13, 12, 12) ) model <- glm(lot1 ~ log(u), data = clotting, family = Gamma()) get_auxiliary(model, type = \"dispersion\") # same as summary(model)$dispersion #> [1] 0.002446059"},{"path":"https://easystats.github.io/insight/reference/get_call.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the model's function call — get_call","title":"Get the model's function call — get_call","text":"Returns model's function call available.","code":""},{"path":"https://easystats.github.io/insight/reference/get_call.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the model's function call — get_call","text":"","code":"get_call(x)"},{"path":"https://easystats.github.io/insight/reference/get_call.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the model's function call — get_call","text":"x fitted mixed model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_call.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the model's function call — get_call","text":"function call.","code":""},{"path":"https://easystats.github.io/insight/reference/get_call.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the model's function call — get_call","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_call(m) #> lm(formula = mpg ~ wt + cyl + vs, data = mtcars) m <- lme4::lmer(Sepal.Length ~ Sepal.Width + (1 | Species), data = iris) get_call(m) #> lme4::lmer(formula = Sepal.Length ~ Sepal.Width + (1 | Species), #> data = iris)"},{"path":"https://easystats.github.io/insight/reference/get_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the data that was used to fit the model — get_data","title":"Get the data that was used to fit the model — get_data","text":"functions tries get data used fit model returns data frame.","code":""},{"path":"https://easystats.github.io/insight/reference/get_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the data that was used to fit the model — get_data","text":"","code":"get_data(x, ...) # Default S3 method get_data(x, source = \"environment\", verbose = TRUE, ...) # S3 method for class 'glmmTMB' get_data( x, effects = \"all\", component = \"all\", source = \"environment\", verbose = TRUE, ... ) # S3 method for class 'afex_aov' get_data(x, shape = c(\"long\", \"wide\"), ...) # S3 method for class 'rma' get_data( x, source = \"environment\", verbose = TRUE, include_interval = FALSE, transf = NULL, transf_args = NULL, ci = 0.95, ... )"},{"path":"https://easystats.github.io/insight/reference/get_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the data that was used to fit the model — get_data","text":"x fitted model. ... Currently used. source String, indicating data recovered. source = \"environment\" (default), data recovered environment (e.g. data workspace). option usually fastest way getting data ensures original variables used model fitting returned. Note always current data recovered environment. Hence, data modified model fitting (e.g., variables recoded rows filtered), returned data may longer equal model data. source = \"frame\" (\"mf\"), data taken model frame. transformed variables back-transformed, possible. option returns data even available environment, however, certain edge cases back-transforming original data may fail. source = \"environment\" fails recover data, tries extract data model frame; source = \"frame\" data extracted model frame, data recovered environment. ways returns observations missing data variables used model fitting. verbose Toggle messages warnings. effects model data fixed effects (\"fixed\"), random effects (\"random\") (\"\") returned? applies mixed gee models. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. shape Return long wide data? applicable repeated measures designs. include_interval meta-analysis models, normal-approximation confidence intervals added response effect size? transf meta-analysis models, intervals included, function applied response effect size interval. transf_args meta-analysis models, optional list arguments passed transf function. ci meta-analysis models, Confidence Interval (CI) level include_interval = TRUE. Default 0.95 (95%).","code":""},{"path":"https://easystats.github.io/insight/reference/get_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the data that was used to fit the model — get_data","text":"data used fit model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_data.html","id":"model-components","dir":"Reference","previous_headings":"","what":"Model components","title":"Get the data that was used to fit the model — get_data","text":"Possible values component argument depend model class. Following valid options: \"\": returns model components, applies models, effect models just conditional model component. \"conditional\": returns conditional component, .e. \"fixed effects\" terms model. effect models just conditional model component. \"smooth_terms\": returns smooth terms, applies GAMs (similar models may contain smooth terms). \"zero_inflated\" (\"zi\"): returns zero-inflation component. \"dispersion\": returns dispersion model component. common models zero-inflation can model dispersion parameter. \"instruments\": instrumental-variable fixed effects regression, returns instruments. \"location\": returns location parameters conditional, zero_inflated, smooth_terms, instruments (everything fixed random effects - depending effects argument - auxiliary parameters). \"distributional\" (\"auxiliary\"): components like sigma, dispersion, beta precision (auxiliary parameters) returned.","code":""},{"path":"https://easystats.github.io/insight/reference/get_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the data that was used to fit the model — get_data","text":"","code":"data(cbpp, package = \"lme4\") cbpp$trials <- cbpp$size - cbpp$incidence m <- glm(cbind(incidence, trials) ~ period, data = cbpp, family = binomial) head(get_data(m)) #> incidence trials period #> 1 2 12 1 #> 2 3 9 2 #> 3 4 5 3 #> 4 0 5 4 #> 5 3 19 1 #> 6 1 17 2"},{"path":"https://easystats.github.io/insight/reference/get_datagrid.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a reference grid — get_datagrid","title":"Create a reference grid — get_datagrid","text":"Create reference matrix, useful visualisation, evenly spread combined values. Usually used make generate predictions using get_predicted(). See vignette tutorial create visualisation matrix using function.","code":""},{"path":"https://easystats.github.io/insight/reference/get_datagrid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a reference grid — get_datagrid","text":"","code":"get_datagrid(x, ...) # S3 method for class 'data.frame' get_datagrid( x, at = \"all\", factors = \"reference\", numerics = \"mean\", preserve_range = FALSE, reference = x, length = 10, range = \"range\", ... ) # S3 method for class 'numeric' get_datagrid(x, length = 10, range = \"range\", ...) # S3 method for class 'factor' get_datagrid(x, ...) # Default S3 method get_datagrid( x, at = \"all\", factors = \"reference\", numerics = \"mean\", preserve_range = TRUE, reference = x, include_smooth = TRUE, include_random = FALSE, include_response = FALSE, data = NULL, verbose = TRUE, ... )"},{"path":"https://easystats.github.io/insight/reference/get_datagrid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a reference grid — get_datagrid","text":"x object construct reference grid. ... Arguments passed methods (instance, length range control spread numeric variables.). Indicates focal predictors (variables) reference grid values focal predictors represented. specified otherwise, representative values numeric variables predictors evenly distributed minimum maximum, total number length values covering range (see 'Examples'). Possible options : \"\", include variables predictors. character vector one variable predictor names, like c(\"Species\", \"Sepal.Width\"), create grid combinations unique values. factors, use levels, numeric variables, use range length length (evenly spread minimum maximum) character vectors, use unique values. list named elements, indicating focal predictors representative values, e.g. = list(Sepal.Length = c(2, 4), Species = \"setosa\"). string assignments, e.g. = \"Sepal.Length = 2\" = c(\"Sepal.Length = 2\", \"Species = 'setosa'\") - note usage single double quotes assign strings within strings. special handling assignments brackets, .e. values defined inside [ ].numeric variables, value(s) inside brackets either two values, indicating minimum maximum (e.g. = \"Sepal.Length = [0, 5]\"), range length length (evenly spread given minimum maximum) created. two numeric values = \"Sepal.Length = [2,3,4,5]\", case values used representative values. \"token\" creates pre-defined representative values: mean -/+ 1 SD around mean: \"x = [sd]\" median -/+ 1 MAD around median: \"x = [mad]\" Tukey's five number summary (minimum, lower-hinge, median, upper-hinge, maximum): \"x = [fivenum]\" terciles, including minimum maximum: \"x = [terciles]\" terciles, excluding minimum maximum: \"x = [terciles2]\" quartiles, including minimum maximum: \"x = [quartiles]\" quartiles, excluding minimum maximum: \"x = [quartiles2]\" minimum maximum value: \"x = [minmax]\" 0 maximum value: \"x = [zeromax]\" factor variables, value(s) inside brackets indicate one factor levels, like = \"Species = [setosa, versicolor]\". Note: length argument ignored using brackets-tokens. remaining variables specified fixed (see also arguments factors numerics). factors Type summary factors. Can \"reference\" (set reference level), \"mode\" (set common level) \"\" keep levels. numerics Type summary numeric values. Can \"\" (duplicate grid unique values), function (\"mean\", \"median\", ...) value (e.g., numerics = 0). preserve_range case combinations numeric variables factors, setting preserve_range = TRUE drop observations value numeric variable originally present range factor level. leads unbalanced grid. Also, want minimum maximum closely match actual ranges, increase length argument. reference reference vector compute mean SD. Used standardizing unstandardizing grid using effectsize::standardize. length Length numeric target variables selected \"\". arguments controls number (equally spread) values taken represent continuous variables. longer length increase precision, can also substantially increase size datagrid (especially case interactions). NA, return unique values. case multiple continuous target variables, length can also vector different values (see examples). range Option control representative values given , specific values provided. Use combination length argument control number values within specified range. range can one following: \"range\" (default), use minimum maximum original data vector end-points (min max). interval type specified, \"iqr\", \"ci\", \"hdi\" \"eti\", spread values within range (default CI width 95% can changed adding instance ci = 0.90.) See IQR() bayestestR::ci(). can useful robust change skipping extreme values. \"sd\" \"mad\", spread dispersion index around mean median, respectively. length argument even number (e.g., 4), one step positive side (.e., -1, 0, +1, +2). result named vector. See 'Examples.' \"grid\" create reference grid useful plotting predictions, choosing representative values numeric variables based position reference grid. numeric variable first predictor , values minimum maximum length indicated length generated. numeric predictors specified first , mean -1/+1 SD around mean returned. factors, levels returned. include_smooth x model object, decide whether smooth terms included data grid . include_random x mixed model object, decide whether random effect terms included data grid . include_random FALSE, x mixed model random effects, still included returned grid, set \"population level\" value (e.g., NA glmmTMB 0 merMod). ensures common predict() methods work properly, usually need data variables model included. include_response x model object, decide whether response variable included data grid . data Optional, data frame used fit model. Usually, data retrieved via get_data(). verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/get_datagrid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a reference grid — get_datagrid","text":"Reference grid data frame.","code":""},{"path":[]},{"path":"https://easystats.github.io/insight/reference/get_datagrid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a reference grid — get_datagrid","text":"","code":"# Datagrids of variables and dataframes ===================================== # Single variable is of interest; all others are \"fixed\" ------------------ # Factors get_datagrid(iris, at = \"Species\") # Returns all the levels #> Species Sepal.Length Sepal.Width Petal.Length Petal.Width #> 1 setosa 5.843333 3.057333 3.758 1.199333 #> 2 versicolor 5.843333 3.057333 3.758 1.199333 #> 3 virginica 5.843333 3.057333 3.758 1.199333 get_datagrid(iris, at = \"Species = c('setosa', 'versicolor')\") # Specify an expression #> Species Sepal.Length Sepal.Width Petal.Length Petal.Width #> 1 setosa 5.843333 3.057333 3.758 1.199333 #> 2 versicolor 5.843333 3.057333 3.758 1.199333 # Numeric variables get_datagrid(iris, at = \"Sepal.Length\") # default spread length = 10 #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 4.3 3.057333 3.758 1.199333 setosa #> 2 4.7 3.057333 3.758 1.199333 setosa #> 3 5.1 3.057333 3.758 1.199333 setosa #> 4 5.5 3.057333 3.758 1.199333 setosa #> 5 5.9 3.057333 3.758 1.199333 setosa #> 6 6.3 3.057333 3.758 1.199333 setosa #> 7 6.7 3.057333 3.758 1.199333 setosa #> 8 7.1 3.057333 3.758 1.199333 setosa #> 9 7.5 3.057333 3.758 1.199333 setosa #> 10 7.9 3.057333 3.758 1.199333 setosa get_datagrid(iris, at = \"Sepal.Length\", length = 3) # change length #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 4.3 3.057333 3.758 1.199333 setosa #> 2 6.1 3.057333 3.758 1.199333 setosa #> 3 7.9 3.057333 3.758 1.199333 setosa get_datagrid(iris[2:150, ], at = \"Sepal.Length\", factors = \"mode\", numerics = \"median\" ) # change non-targets fixing #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 4.3 3 4.4 1.3 versicolor #> 2 4.7 3 4.4 1.3 versicolor #> 3 5.1 3 4.4 1.3 versicolor #> 4 5.5 3 4.4 1.3 versicolor #> 5 5.9 3 4.4 1.3 versicolor #> 6 6.3 3 4.4 1.3 versicolor #> 7 6.7 3 4.4 1.3 versicolor #> 8 7.1 3 4.4 1.3 versicolor #> 9 7.5 3 4.4 1.3 versicolor #> 10 7.9 3 4.4 1.3 versicolor get_datagrid(iris, at = \"Sepal.Length\", range = \"ci\", ci = 0.90) # change min/max of target #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 4.600 3.057333 3.758 1.199333 setosa #> 2 4.895 3.057333 3.758 1.199333 setosa #> 3 5.190 3.057333 3.758 1.199333 setosa #> 4 5.485 3.057333 3.758 1.199333 setosa #> 5 5.780 3.057333 3.758 1.199333 setosa #> 6 6.075 3.057333 3.758 1.199333 setosa #> 7 6.370 3.057333 3.758 1.199333 setosa #> 8 6.665 3.057333 3.758 1.199333 setosa #> 9 6.960 3.057333 3.758 1.199333 setosa #> 10 7.255 3.057333 3.758 1.199333 setosa get_datagrid(iris, at = \"Sepal.Length = [0, 1]\") # Manually change min/max #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 0.0000000 3.057333 3.758 1.199333 setosa #> 2 0.1111111 3.057333 3.758 1.199333 setosa #> 3 0.2222222 3.057333 3.758 1.199333 setosa #> 4 0.3333333 3.057333 3.758 1.199333 setosa #> 5 0.4444444 3.057333 3.758 1.199333 setosa #> 6 0.5555556 3.057333 3.758 1.199333 setosa #> 7 0.6666667 3.057333 3.758 1.199333 setosa #> 8 0.7777778 3.057333 3.758 1.199333 setosa #> 9 0.8888889 3.057333 3.758 1.199333 setosa #> 10 1.0000000 3.057333 3.758 1.199333 setosa get_datagrid(iris, at = \"Sepal.Length = [sd]\") # -1 SD, mean and +1 SD #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 5.015267 3.057333 3.758 1.199333 setosa #> 2 5.843333 3.057333 3.758 1.199333 setosa #> 3 6.671399 3.057333 3.758 1.199333 setosa # identical to previous line: -1 SD, mean and +1 SD get_datagrid(iris, at = \"Sepal.Length\", range = \"sd\", length = 3) #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 5.015267 3.057333 3.758 1.199333 setosa #> 2 5.843333 3.057333 3.758 1.199333 setosa #> 3 6.671399 3.057333 3.758 1.199333 setosa get_datagrid(iris, at = \"Sepal.Length = [quartiles]\") # quartiles #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 4.3 3.057333 3.758 1.199333 setosa #> 2 5.1 3.057333 3.758 1.199333 setosa #> 3 5.8 3.057333 3.758 1.199333 setosa #> 4 6.4 3.057333 3.758 1.199333 setosa #> 5 7.9 3.057333 3.758 1.199333 setosa # Numeric and categorical variables, generating a grid for plots # default spread length = 10 get_datagrid(iris, at = c(\"Sepal.Length\", \"Species\"), range = \"grid\") #> Sepal.Length Species Sepal.Width Petal.Length Petal.Width #> 1 2.531069 setosa 3.057333 3.758 1.199333 #> 2 3.359135 setosa 3.057333 3.758 1.199333 #> 3 4.187201 setosa 3.057333 3.758 1.199333 #> 4 5.015267 setosa 3.057333 3.758 1.199333 #> 5 5.843333 setosa 3.057333 3.758 1.199333 #> 6 6.671399 setosa 3.057333 3.758 1.199333 #> 7 7.499466 setosa 3.057333 3.758 1.199333 #> 8 8.327532 setosa 3.057333 3.758 1.199333 #> 9 9.155598 setosa 3.057333 3.758 1.199333 #> 10 9.983664 setosa 3.057333 3.758 1.199333 #> 11 2.531069 versicolor 3.057333 3.758 1.199333 #> 12 3.359135 versicolor 3.057333 3.758 1.199333 #> 13 4.187201 versicolor 3.057333 3.758 1.199333 #> 14 5.015267 versicolor 3.057333 3.758 1.199333 #> 15 5.843333 versicolor 3.057333 3.758 1.199333 #> 16 6.671399 versicolor 3.057333 3.758 1.199333 #> 17 7.499466 versicolor 3.057333 3.758 1.199333 #> 18 8.327532 versicolor 3.057333 3.758 1.199333 #> 19 9.155598 versicolor 3.057333 3.758 1.199333 #> 20 9.983664 versicolor 3.057333 3.758 1.199333 #> 21 2.531069 virginica 3.057333 3.758 1.199333 #> 22 3.359135 virginica 3.057333 3.758 1.199333 #> 23 4.187201 virginica 3.057333 3.758 1.199333 #> 24 5.015267 virginica 3.057333 3.758 1.199333 #> 25 5.843333 virginica 3.057333 3.758 1.199333 #> 26 6.671399 virginica 3.057333 3.758 1.199333 #> 27 7.499466 virginica 3.057333 3.758 1.199333 #> 28 8.327532 virginica 3.057333 3.758 1.199333 #> 29 9.155598 virginica 3.057333 3.758 1.199333 #> 30 9.983664 virginica 3.057333 3.758 1.199333 # default spread length = 3 (-1 SD, mean and +1 SD) get_datagrid(iris, at = c(\"Species\", \"Sepal.Length\"), range = \"grid\") #> Species Sepal.Length Sepal.Width Petal.Length Petal.Width #> 1 setosa 5.015267 3.057333 3.758 1.199333 #> 2 setosa 5.843333 3.057333 3.758 1.199333 #> 3 setosa 6.671399 3.057333 3.758 1.199333 #> 4 versicolor 5.015267 3.057333 3.758 1.199333 #> 5 versicolor 5.843333 3.057333 3.758 1.199333 #> 6 versicolor 6.671399 3.057333 3.758 1.199333 #> 7 virginica 5.015267 3.057333 3.758 1.199333 #> 8 virginica 5.843333 3.057333 3.758 1.199333 #> 9 virginica 6.671399 3.057333 3.758 1.199333 # Standardization and unstandardization data <- get_datagrid(iris, at = \"Sepal.Length\", range = \"sd\", length = 3) data$Sepal.Length # It is a named vector (extract names with `names(out$Sepal.Length)`) #> -1 SD Mean +1 SD #> 5.015267 5.843333 6.671399 datawizard::standardize(data, select = \"Sepal.Length\") #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 -1 3.057333 3.758 1.199333 setosa #> 2 0 3.057333 3.758 1.199333 setosa #> 3 1 3.057333 3.758 1.199333 setosa data <- get_datagrid(iris, at = \"Sepal.Length = c(-2, 0, 2)\") # Manually specify values data #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 -2 3.057333 3.758 1.199333 setosa #> 2 0 3.057333 3.758 1.199333 setosa #> 3 2 3.057333 3.758 1.199333 setosa datawizard::unstandardize(data, select = \"Sepal.Length\") #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 4.187201 3.057333 3.758 1.199333 setosa #> 2 5.843333 3.057333 3.758 1.199333 setosa #> 3 7.499466 3.057333 3.758 1.199333 setosa # Multiple variables are of interest, creating a combination -------------- get_datagrid(iris, at = c(\"Sepal.Length\", \"Species\"), length = 3) #> Sepal.Length Species Sepal.Width Petal.Length Petal.Width #> 1 4.3 setosa 3.057333 3.758 1.199333 #> 2 6.1 setosa 3.057333 3.758 1.199333 #> 3 7.9 setosa 3.057333 3.758 1.199333 #> 4 4.3 versicolor 3.057333 3.758 1.199333 #> 5 6.1 versicolor 3.057333 3.758 1.199333 #> 6 7.9 versicolor 3.057333 3.758 1.199333 #> 7 4.3 virginica 3.057333 3.758 1.199333 #> 8 6.1 virginica 3.057333 3.758 1.199333 #> 9 7.9 virginica 3.057333 3.758 1.199333 get_datagrid(iris, at = c(\"Sepal.Length\", \"Petal.Length\"), length = c(3, 2)) #> Sepal.Length Petal.Length Sepal.Width Petal.Width Species #> 1 4.3 1.0 3.057333 1.199333 setosa #> 2 6.1 1.0 3.057333 1.199333 setosa #> 3 7.9 1.0 3.057333 1.199333 setosa #> 4 4.3 6.9 3.057333 1.199333 setosa #> 5 6.1 6.9 3.057333 1.199333 setosa #> 6 7.9 6.9 3.057333 1.199333 setosa get_datagrid(iris, at = c(1, 3), length = 3) #> Sepal.Length Petal.Length Sepal.Width Petal.Width Species #> 1 4.3 1.00 3.057333 1.199333 setosa #> 2 6.1 1.00 3.057333 1.199333 setosa #> 3 7.9 1.00 3.057333 1.199333 setosa #> 4 4.3 3.95 3.057333 1.199333 setosa #> 5 6.1 3.95 3.057333 1.199333 setosa #> 6 7.9 3.95 3.057333 1.199333 setosa #> 7 4.3 6.90 3.057333 1.199333 setosa #> 8 6.1 6.90 3.057333 1.199333 setosa #> 9 7.9 6.90 3.057333 1.199333 setosa get_datagrid(iris, at = c(\"Sepal.Length\", \"Species\"), preserve_range = TRUE) #> Sepal.Length Species Sepal.Width Petal.Length Petal.Width #> 1 4.3 setosa 3.057333 3.758 1.199333 #> 2 4.7 setosa 3.057333 3.758 1.199333 #> 3 5.1 setosa 3.057333 3.758 1.199333 #> 4 5.5 setosa 3.057333 3.758 1.199333 #> 5 5.1 versicolor 3.057333 3.758 1.199333 #> 6 5.5 versicolor 3.057333 3.758 1.199333 #> 7 5.9 versicolor 3.057333 3.758 1.199333 #> 8 6.3 versicolor 3.057333 3.758 1.199333 #> 9 6.7 versicolor 3.057333 3.758 1.199333 #> 10 5.1 virginica 3.057333 3.758 1.199333 #> 11 5.5 virginica 3.057333 3.758 1.199333 #> 12 5.9 virginica 3.057333 3.758 1.199333 #> 13 6.3 virginica 3.057333 3.758 1.199333 #> 14 6.7 virginica 3.057333 3.758 1.199333 #> 15 7.1 virginica 3.057333 3.758 1.199333 #> 16 7.5 virginica 3.057333 3.758 1.199333 #> 17 7.9 virginica 3.057333 3.758 1.199333 get_datagrid(iris, at = c(\"Sepal.Length\", \"Species\"), numerics = 0) #> Sepal.Length Species Sepal.Width Petal.Length Petal.Width #> 1 4.3 setosa 0 0 0 #> 2 4.7 setosa 0 0 0 #> 3 5.1 setosa 0 0 0 #> 4 5.5 setosa 0 0 0 #> 5 5.9 setosa 0 0 0 #> 6 6.3 setosa 0 0 0 #> 7 6.7 setosa 0 0 0 #> 8 7.1 setosa 0 0 0 #> 9 7.5 setosa 0 0 0 #> 10 7.9 setosa 0 0 0 #> 11 4.3 versicolor 0 0 0 #> 12 4.7 versicolor 0 0 0 #> 13 5.1 versicolor 0 0 0 #> 14 5.5 versicolor 0 0 0 #> 15 5.9 versicolor 0 0 0 #> 16 6.3 versicolor 0 0 0 #> 17 6.7 versicolor 0 0 0 #> 18 7.1 versicolor 0 0 0 #> 19 7.5 versicolor 0 0 0 #> 20 7.9 versicolor 0 0 0 #> 21 4.3 virginica 0 0 0 #> 22 4.7 virginica 0 0 0 #> 23 5.1 virginica 0 0 0 #> 24 5.5 virginica 0 0 0 #> 25 5.9 virginica 0 0 0 #> 26 6.3 virginica 0 0 0 #> 27 6.7 virginica 0 0 0 #> 28 7.1 virginica 0 0 0 #> 29 7.5 virginica 0 0 0 #> 30 7.9 virginica 0 0 0 get_datagrid(iris, at = c(\"Sepal.Length = 3\", \"Species\")) #> Sepal.Length Species Sepal.Width Petal.Length Petal.Width #> 1 3 setosa 3.057333 3.758 1.199333 #> 2 3 versicolor 3.057333 3.758 1.199333 #> 3 3 virginica 3.057333 3.758 1.199333 get_datagrid(iris, at = c(\"Sepal.Length = c(3, 1)\", \"Species = 'setosa'\")) #> Sepal.Length Species Sepal.Width Petal.Length Petal.Width #> 1 3 setosa 3.057333 3.758 1.199333 #> 2 1 setosa 3.057333 3.758 1.199333 # With list-style at-argument get_datagrid(iris, at = list(Sepal.Length = c(1, 3), Species = \"setosa\")) #> Sepal.Length Species Sepal.Width Petal.Length Petal.Width #> 1 1 setosa 3.057333 3.758 1.199333 #> 2 3 setosa 3.057333 3.758 1.199333 # With models =============================================================== # Fit a linear regression model <- lm(Sepal.Length ~ Sepal.Width * Petal.Length, data = iris) # Get datagrid of predictors data <- get_datagrid(model, length = c(20, 3), range = c(\"range\", \"sd\")) # same as: get_datagrid(model, range = \"grid\", length = 20) # Add predictions data$Sepal.Length <- get_predicted(model, data = data) # Visualize relationships (each color is at -1 SD, Mean, and + 1 SD of Petal.Length) plot(data$Sepal.Width, data$Sepal.Length, col = data$Petal.Length, main = \"Relationship at -1 SD, Mean, and + 1 SD of Petal.Length\" )"},{"path":"https://easystats.github.io/insight/reference/get_deviance.html","id":null,"dir":"Reference","previous_headings":"","what":"Model Deviance — get_deviance","title":"Model Deviance — get_deviance","text":"Returns model deviance (see stats::deviance()).","code":""},{"path":"https://easystats.github.io/insight/reference/get_deviance.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Model Deviance — get_deviance","text":"","code":"get_deviance(x, ...) # Default S3 method get_deviance(x, verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/get_deviance.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Model Deviance — get_deviance","text":"x model. ... used. verbose Toggle warnings messages.","code":""},{"path":"https://easystats.github.io/insight/reference/get_deviance.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Model Deviance — get_deviance","text":"model deviance.","code":""},{"path":"https://easystats.github.io/insight/reference/get_deviance.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Model Deviance — get_deviance","text":"GLMMs class glmerMod, glmmTMB MixMod, absolute unconditional deviance returned (see 'Details' ?lme4::merMod-class), .e. minus twice log-likelihood. get relative conditional deviance (relative saturated model, conditioned conditional modes random effects), use deviance(). value returned get_deviance() usually equals deviance-value summary().","code":""},{"path":"https://easystats.github.io/insight/reference/get_deviance.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Model Deviance — get_deviance","text":"","code":"data(mtcars) x <- lm(mpg ~ cyl, data = mtcars) get_deviance(x) #> [1] 308.3342"},{"path":"https://easystats.github.io/insight/reference/get_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract degrees of freedom — get_df","title":"Extract degrees of freedom — get_df","text":"Estimate extract residual model-based degrees freedom regression models.","code":""},{"path":"https://easystats.github.io/insight/reference/get_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract degrees of freedom — get_df","text":"","code":"get_df(x, ...) # Default S3 method get_df(x, type = \"residual\", verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/get_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract degrees of freedom — get_df","text":"x statistical model. ... Currently used. type Can \"residual\", \"wald\", \"normal\", \"model\". \"analytical\" alias \"residual\". \"residual\" (aka \"analytical\") returns residual degrees freedom, usually stats::df.residual() returns. model object method extract residual degrees freedom, calculated n-p, .e. number observations minus number estimated parameters. residual degrees freedom extracted either approach, returns Inf. \"wald\" returns residual (aka analytical) degrees freedom models t-statistic, 1 models Chi-squared statistic, Inf models. Also returns Inf residual degrees freedom extracted. \"normal\" always returns Inf. \"model\" returns model-based degrees freedom, .e. number (estimated) parameters. mixed models, can also \"ml1\" (approximation degrees freedom based \"m-l-1\" heuristic suggested Elff et al. 2019) \"betwithin\", models class merMod, type can also \"satterthwaite\" \"kenward-roger\". See 'Details'. Usually, degrees freedom required calculate p-values confidence intervals, type = \"wald\" likely best choice cases. verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/get_df.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract degrees of freedom — get_df","text":"Degrees freedom mixed models Inferential statistics (like p-values, confidence intervals standard errors) may biased mixed models number clusters small (even sample size level-1 units high). cases recommended approximate accurate number degrees freedom inferential statistics (see Li Redden 2015). m-l-1 degrees freedom m-l-1 heuristic approach uses t-distribution fewer degrees freedom. particular repeated measure designs (longitudinal data analysis), m-l-1 heuristic likely accurate simply using residual infinite degrees freedom, get_df(type = \"ml1\") returns different degrees freedom within-cluster -cluster effects. Note \"m-l-1\" heuristic applicable (least less accurate) complex multilevel designs, e.g. cross-classified clusters. cases, accurate approaches like Kenward-Roger approximation recommended. However, \"m-l-1\" heuristic also applies generalized mixed models, approaches like Kenward-Roger Satterthwaite limited linear mixed models . -within degrees freedom -within denominator degrees freedom approximation , similar \"m-l-1\" heuristic, recommended particular (generalized) linear mixed models repeated measurements (longitudinal design). get_df(type = \"betwithin\") implements heuristic based -within approach, .e. type returns different degrees freedom within-cluster -cluster effects. Note implementation return exactly results shown Li Redden 2015, similar. Satterthwaite Kenward-Rogers degrees freedom Unlike simpler approximation heuristics like \"m-l-1\" rule (type = \"ml1\"), Satterthwaite Kenward-Rogers approximation also applicable complex multilevel designs. However, \"m-l-1\" \"-within\" heuristics also apply generalized mixed models, approaches like Kenward-Roger Satterthwaite limited linear mixed models .","code":""},{"path":"https://easystats.github.io/insight/reference/get_df.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extract degrees of freedom — get_df","text":"Kenward, M. G., & Roger, J. H. (1997). Small sample inference fixed effects restricted maximum likelihood. Biometrics, 983-997. Satterthwaite FE (1946) approximate distribution estimates variance components. Biometrics Bulletin 2 (6):110–4. Elff, M.; Heisig, J.P.; Schaeffer, M.; Shikano, S. (2019). Multilevel Analysis Clusters: Improving Likelihood-based Methods Provide Unbiased Estimates Accurate Inference, British Journal Political Science. Li, P., Redden, D. T. (2015). Comparing denominator degrees freedom approximations generalized linear mixed model analyzing binary outcome small sample cluster-randomized trials. BMC Medical Research Methodology, 15(1), 38","code":""},{"path":"https://easystats.github.io/insight/reference/get_df.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract degrees of freedom — get_df","text":"","code":"model <- lm(Sepal.Length ~ Petal.Length * Species, data = iris) get_df(model) # same as df.residual(model) #> [1] 144 get_df(model, type = \"model\") # same as attr(logLik(model), \"df\") #> [1] 7"},{"path":"https://easystats.github.io/insight/reference/get_family.html","id":null,"dir":"Reference","previous_headings":"","what":"A robust alternative to stats::family — get_family","title":"A robust alternative to stats::family — get_family","text":"robust resilient alternative stats::family. avoid issues models like gamm4.","code":""},{"path":"https://easystats.github.io/insight/reference/get_family.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A robust alternative to stats::family — get_family","text":"","code":"get_family(x, ...)"},{"path":"https://easystats.github.io/insight/reference/get_family.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A robust alternative to stats::family — get_family","text":"x statistical model. ... arguments passed methods.","code":""},{"path":"https://easystats.github.io/insight/reference/get_family.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A robust alternative to stats::family — get_family","text":"","code":"data(mtcars) x <- glm(vs ~ wt, data = mtcars, family = \"binomial\") get_family(x) #> #> Family: binomial #> Link function: logit #> x <- mgcv::gamm( vs ~ am + s(wt), random = list(cyl = ~1), data = mtcars, family = \"binomial\" ) #> #> Maximum number of PQL iterations: 20 #> iteration 1 #> iteration 2 #> iteration 3 #> iteration 4 #> iteration 5 #> iteration 6 #> iteration 7 #> iteration 8 get_family(x) #> #> Family: binomial #> Link function: logit #>"},{"path":"https://easystats.github.io/insight/reference/get_intercept.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the value at the intercept — get_intercept","title":"Get the value at the intercept — get_intercept","text":"Returns value intercept (.e., intercept parameter), NA one.","code":""},{"path":"https://easystats.github.io/insight/reference/get_intercept.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the value at the intercept — get_intercept","text":"","code":"get_intercept(x, ...)"},{"path":"https://easystats.github.io/insight/reference/get_intercept.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the value at the intercept — get_intercept","text":"x model. ... used.","code":""},{"path":"https://easystats.github.io/insight/reference/get_intercept.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the value at the intercept — get_intercept","text":"value intercept.","code":""},{"path":"https://easystats.github.io/insight/reference/get_intercept.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the value at the intercept — get_intercept","text":"","code":"get_intercept(lm(Sepal.Length ~ Petal.Width, data = iris)) #> [1] 4.777629 get_intercept(lm(Sepal.Length ~ 0 + Petal.Width, data = iris)) #> [1] NA get_intercept(lme4::lmer(Sepal.Length ~ Sepal.Width + (1 | Species), data = iris)) #> [1] 3.406167 get_intercept(gamm4::gamm4(Sepal.Length ~ s(Petal.Width), data = iris)) #> [1] 5.843333"},{"path":"https://easystats.github.io/insight/reference/get_loglikelihood.html","id":null,"dir":"Reference","previous_headings":"","what":"Log-Likelihood — get_loglikelihood","title":"Log-Likelihood — get_loglikelihood","text":"robust function compute log-likelihood model, well individual log-likelihoods (observation) whenever possible. Can used replacement stats::logLik() box, returned object class (gives results default).","code":""},{"path":"https://easystats.github.io/insight/reference/get_loglikelihood.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Log-Likelihood — get_loglikelihood","text":"","code":"get_loglikelihood(x, ...) loglikelihood(x, ...) # S3 method for class 'lm' get_loglikelihood( x, estimator = \"ML\", REML = FALSE, check_response = FALSE, verbose = TRUE, ... )"},{"path":"https://easystats.github.io/insight/reference/get_loglikelihood.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Log-Likelihood — get_loglikelihood","text":"x model. ... Passed logLik(), possible. estimator Corresponds different estimators standard deviation errors. estimator=\"ML\" (default), scaling done n (biased ML estimator), equivalent using stats::logLik(). estimator=\"OLS\", returns unbiased OLS estimator. estimator=\"REML\" give results logLik(..., REML=TRUE). REML linear models. argument present compatibility stats::logLik(). Setting TRUE overwrite estimator argument thus equivalent setting estimator=\"REML\". give results stats::logLik(..., REML=TRUE). Note individual log-likelihoods available REML. check_response Logical, TRUE, checks response variable transformed (like log() sqrt()), , returns corrected log-likelihood. get back original scale, likelihood model multiplied Jacobian/derivative transformation. verbose Toggle warnings messages.","code":""},{"path":"https://easystats.github.io/insight/reference/get_loglikelihood.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Log-Likelihood — get_loglikelihood","text":"object class \"logLik\", also containing log-likelihoods observation per_observation attribute (attributes(get_loglikelihood(x))$per_observation) possible. code partly inspired nonnest2 package.","code":""},{"path":"https://easystats.github.io/insight/reference/get_loglikelihood.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Log-Likelihood — get_loglikelihood","text":"","code":"x <- lm(Sepal.Length ~ Petal.Width + Species, data = iris) get_loglikelihood(x, estimator = \"ML\") # Equivalent to stats::logLik(x) #> 'log Lik.' -101.0339 (df=5) get_loglikelihood(x, estimator = \"REML\") # Equivalent to stats::logLik(x, REML=TRUE) #> 'log Lik.' -107.0896 (df=5) get_loglikelihood(x, estimator = \"OLS\") #> 'log Lik.' -101.0611 (df=5)"},{"path":"https://easystats.github.io/insight/reference/get_modelmatrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Model Matrix — get_modelmatrix","title":"Model Matrix — get_modelmatrix","text":"Creates design matrix description. character variables coerced factors.","code":""},{"path":"https://easystats.github.io/insight/reference/get_modelmatrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Model Matrix — get_modelmatrix","text":"","code":"get_modelmatrix(x, ...)"},{"path":"https://easystats.github.io/insight/reference/get_modelmatrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Model Matrix — get_modelmatrix","text":"x object. ... Passed methods (mainly model.matrix()).","code":""},{"path":"https://easystats.github.io/insight/reference/get_modelmatrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Model Matrix — get_modelmatrix","text":"","code":"data(mtcars) model <- lm(am ~ vs, data = mtcars) get_modelmatrix(model) #> (Intercept) vs #> Mazda RX4 1 0 #> Mazda RX4 Wag 1 0 #> Datsun 710 1 1 #> Hornet 4 Drive 1 1 #> Hornet Sportabout 1 0 #> Valiant 1 1 #> Duster 360 1 0 #> Merc 240D 1 1 #> Merc 230 1 1 #> Merc 280 1 1 #> Merc 280C 1 1 #> Merc 450SE 1 0 #> Merc 450SL 1 0 #> Merc 450SLC 1 0 #> Cadillac Fleetwood 1 0 #> Lincoln Continental 1 0 #> Chrysler Imperial 1 0 #> Fiat 128 1 1 #> Honda Civic 1 1 #> Toyota Corolla 1 1 #> Toyota Corona 1 1 #> Dodge Challenger 1 0 #> AMC Javelin 1 0 #> Camaro Z28 1 0 #> Pontiac Firebird 1 0 #> Fiat X1-9 1 1 #> Porsche 914-2 1 0 #> Lotus Europa 1 1 #> Ford Pantera L 1 0 #> Ferrari Dino 1 0 #> Maserati Bora 1 0 #> Volvo 142E 1 1 #> attr(,\"assign\") #> [1] 0 1"},{"path":"https://easystats.github.io/insight/reference/get_parameters.BGGM.html","id":null,"dir":"Reference","previous_headings":"","what":"Get model parameters from Bayesian models — get_parameters.BGGM","title":"Get model parameters from Bayesian models — get_parameters.BGGM","text":"Returns coefficients (posterior samples Bayesian models) model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.BGGM.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get model parameters from Bayesian models — get_parameters.BGGM","text":"","code":"# S3 method for class 'BGGM' get_parameters( x, component = c(\"correlation\", \"conditional\", \"intercept\", \"all\"), summary = FALSE, centrality = \"mean\", ... ) # S3 method for class 'MCMCglmm' get_parameters( x, effects = c(\"fixed\", \"random\", \"all\"), summary = FALSE, centrality = \"mean\", ... ) # S3 method for class 'BFBayesFactor' get_parameters( x, effects = c(\"all\", \"fixed\", \"random\"), component = c(\"all\", \"extra\"), iterations = 4000, progress = FALSE, verbose = TRUE, summary = FALSE, centrality = \"mean\", ... ) # S3 method for class 'stanmvreg' get_parameters( x, effects = c(\"fixed\", \"random\", \"all\"), parameters = NULL, summary = FALSE, centrality = \"mean\", ... ) # S3 method for class 'brmsfit' get_parameters( x, effects = \"fixed\", component = \"all\", parameters = NULL, summary = FALSE, centrality = \"mean\", ... ) # S3 method for class 'stanreg' get_parameters( x, effects = c(\"fixed\", \"random\", \"all\"), component = c(\"location\", \"all\", \"conditional\", \"smooth_terms\", \"sigma\", \"distributional\", \"auxiliary\"), parameters = NULL, summary = FALSE, centrality = \"mean\", ... ) # S3 method for class 'bayesx' get_parameters( x, component = c(\"conditional\", \"smooth_terms\", \"all\"), summary = FALSE, centrality = \"mean\", ... ) # S3 method for class 'bamlss' get_parameters( x, component = c(\"all\", \"conditional\", \"smooth_terms\", \"location\", \"distributional\", \"auxiliary\"), parameters = NULL, summary = FALSE, centrality = \"mean\", ... ) # S3 method for class 'sim.merMod' get_parameters( x, effects = c(\"fixed\", \"random\", \"all\"), parameters = NULL, summary = FALSE, centrality = \"mean\", ... ) # S3 method for class 'sim' get_parameters(x, parameters = NULL, summary = FALSE, centrality = \"mean\", ...)"},{"path":"https://easystats.github.io/insight/reference/get_parameters.BGGM.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get model parameters from Bayesian models — get_parameters.BGGM","text":"x fitted model. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. summary Logical, indicates whether full posterior samples (summary = FALSE)) summarized centrality indices posterior samples (summary = TRUE)) returned estimates. centrality models posterior samples, summary = TRUE. case, centrality = \"mean\" calculate means posterior samples parameter, centrality = \"median\" use robust median value measure central tendency. ... Currently used. effects parameters fixed effects, random effects returned? applies mixed models. May abbreviated. iterations Number posterior draws. progress Display progress. verbose Toggle messages warnings. parameters Regular expression pattern describes parameters returned.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.BGGM.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get model parameters from Bayesian models — get_parameters.BGGM","text":"posterior samples requested parameters data frame. summary = TRUE, returns data frame two columns: parameter names related point estimates (based centrality).","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.BGGM.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get model parameters from Bayesian models — get_parameters.BGGM","text":"cases models either return different \"effects\" (fixed, random) \"components\" (conditional, zero-inflated, ...), arguments effects component can used.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.BGGM.html","id":"bfbayesfactor-models","dir":"Reference","previous_headings":"","what":"BFBayesFactor Models","title":"Get model parameters from Bayesian models — get_parameters.BGGM","text":"Note BFBayesFactor models (BayesFactor package), posteriors extracted first numerator model (.e., model[1]). want apply function foo() another model stored BFBayesFactor object, index directly, e.g. foo(model[2]), foo(1/model[5]), etc. See also bayestestR::weighted_posteriors().","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.BGGM.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get model parameters from Bayesian models — get_parameters.BGGM","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_parameters(m) #> Parameter Estimate #> 1 (Intercept) 38.7460642 #> 2 wt -3.2463673 #> 3 cyl -1.3641033 #> 4 vs 0.5241721"},{"path":"https://easystats.github.io/insight/reference/get_parameters.betamfx.html","id":null,"dir":"Reference","previous_headings":"","what":"Get model parameters from marginal effects models — get_parameters.betamfx","title":"Get model parameters from marginal effects models — get_parameters.betamfx","text":"Returns coefficients model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.betamfx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get model parameters from marginal effects models — get_parameters.betamfx","text":"","code":"# S3 method for class 'betamfx' get_parameters( x, component = c(\"all\", \"conditional\", \"precision\", \"marginal\"), ... ) # S3 method for class 'logitmfx' get_parameters(x, component = c(\"all\", \"conditional\", \"marginal\"), ...)"},{"path":"https://easystats.github.io/insight/reference/get_parameters.betamfx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get model parameters from marginal effects models — get_parameters.betamfx","text":"x fitted model. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.betamfx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get model parameters from marginal effects models — get_parameters.betamfx","text":"data frame three columns: parameter names, related point estimates component.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.betamfx.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get model parameters from marginal effects models — get_parameters.betamfx","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_parameters(m) #> Parameter Estimate #> 1 (Intercept) 38.7460642 #> 2 wt -3.2463673 #> 3 cyl -1.3641033 #> 4 vs 0.5241721"},{"path":"https://easystats.github.io/insight/reference/get_parameters.betareg.html","id":null,"dir":"Reference","previous_headings":"","what":"Get model parameters from models with special components — get_parameters.betareg","title":"Get model parameters from models with special components — get_parameters.betareg","text":"Returns coefficients model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.betareg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get model parameters from models with special components — get_parameters.betareg","text":"","code":"# S3 method for class 'betareg' get_parameters( x, component = c(\"all\", \"conditional\", \"precision\", \"location\", \"distributional\", \"auxiliary\"), ... ) # S3 method for class 'DirichletRegModel' get_parameters( x, component = c(\"all\", \"conditional\", \"precision\", \"location\", \"distributional\", \"auxiliary\"), ... ) # S3 method for class 'averaging' get_parameters(x, component = c(\"conditional\", \"full\"), ...) # S3 method for class 'glmx' get_parameters( x, component = c(\"all\", \"conditional\", \"extra\", \"location\", \"distributional\", \"auxiliary\"), ... ) # S3 method for class 'clm2' get_parameters(x, component = c(\"all\", \"conditional\", \"scale\"), ...) # S3 method for class 'mvord' get_parameters( x, component = c(\"all\", \"conditional\", \"thresholds\", \"correlation\"), ... ) # S3 method for class 'mjoint' get_parameters(x, component = c(\"all\", \"conditional\", \"survival\"), ...)"},{"path":"https://easystats.github.io/insight/reference/get_parameters.betareg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get model parameters from models with special components — get_parameters.betareg","text":"x fitted model. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.betareg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get model parameters from models with special components — get_parameters.betareg","text":"data frame three columns: parameter names, related point estimates component.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.betareg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get model parameters from models with special components — get_parameters.betareg","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_parameters(m) #> Parameter Estimate #> 1 (Intercept) 38.7460642 #> 2 wt -3.2463673 #> 3 cyl -1.3641033 #> 4 vs 0.5241721"},{"path":"https://easystats.github.io/insight/reference/get_parameters.emmGrid.html","id":null,"dir":"Reference","previous_headings":"","what":"Get model parameters from estimated marginal means objects — get_parameters.emmGrid","title":"Get model parameters from estimated marginal means objects — get_parameters.emmGrid","text":"Returns coefficients model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.emmGrid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get model parameters from estimated marginal means objects — get_parameters.emmGrid","text":"","code":"# S3 method for class 'emmGrid' get_parameters(x, summary = FALSE, merge_parameters = FALSE, ...) # S3 method for class 'emm_list' get_parameters(x, summary = FALSE, ...)"},{"path":"https://easystats.github.io/insight/reference/get_parameters.emmGrid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get model parameters from estimated marginal means objects — get_parameters.emmGrid","text":"x fitted model. summary Logical, indicates whether full posterior samples (summary = FALSE)) summarized centrality indices posterior samples (summary = TRUE)) returned estimates. merge_parameters Logical, TRUE x multiple columns parameter names (like emmGrid objects may ), merged single parameter column, parameters names values values. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.emmGrid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get model parameters from estimated marginal means objects — get_parameters.emmGrid","text":"data frame two columns: parameter names related point estimates.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.emmGrid.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Get model parameters from estimated marginal means objects — get_parameters.emmGrid","text":"Note emmGrid emm_list objects returned functions emmeans different structure compared usual regression models. Hence, Parameter column always contain names variables, may rather contain values, e.g. contrasts. See example pairwise comparisons .","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.emmGrid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get model parameters from estimated marginal means objects — get_parameters.emmGrid","text":"","code":"data(mtcars) model <- lm(mpg ~ wt * factor(cyl), data = mtcars) emm <- emmeans(model, \"cyl\") #> NOTE: Results may be misleading due to involvement in interactions get_parameters(emm) #> cyl Estimate #> 1 4 21.40330 #> 2 6 19.46455 #> 3 8 16.81441 emm <- emmeans(model, pairwise ~ cyl) #> NOTE: Results may be misleading due to involvement in interactions get_parameters(emm) #> Parameter Estimate Component #> 1 4 21.403304 emmeans #> 2 6 19.464549 emmeans #> 3 8 16.814408 emmeans #> 4 cyl4 - cyl6 1.938755 contrasts #> 5 cyl4 - cyl8 4.588896 contrasts #> 6 cyl6 - cyl8 2.650141 contrasts"},{"path":"https://easystats.github.io/insight/reference/get_parameters.gamm.html","id":null,"dir":"Reference","previous_headings":"","what":"Get model parameters from generalized additive models — get_parameters.gamm","title":"Get model parameters from generalized additive models — get_parameters.gamm","text":"Returns coefficients model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.gamm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get model parameters from generalized additive models — get_parameters.gamm","text":"","code":"# S3 method for class 'gamm' get_parameters( x, component = c(\"all\", \"conditional\", \"smooth_terms\", \"location\"), ... ) # S3 method for class 'gam' get_parameters( x, component = c(\"all\", \"conditional\", \"smooth_terms\", \"location\"), ... ) # S3 method for class 'rqss' get_parameters(x, component = c(\"all\", \"conditional\", \"smooth_terms\"), ...)"},{"path":"https://easystats.github.io/insight/reference/get_parameters.gamm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get model parameters from generalized additive models — get_parameters.gamm","text":"x fitted model. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.gamm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get model parameters from generalized additive models — get_parameters.gamm","text":"models smooth terms zero-inflation component, data frame three columns: parameter names, related point estimates component.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.gamm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get model parameters from generalized additive models — get_parameters.gamm","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_parameters(m) #> Parameter Estimate #> 1 (Intercept) 38.7460642 #> 2 wt -3.2463673 #> 3 cyl -1.3641033 #> 4 vs 0.5241721"},{"path":"https://easystats.github.io/insight/reference/get_parameters.glmm.html","id":null,"dir":"Reference","previous_headings":"","what":"Get model parameters from mixed models — get_parameters.glmm","title":"Get model parameters from mixed models — get_parameters.glmm","text":"Returns coefficients model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.glmm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get model parameters from mixed models — get_parameters.glmm","text":"","code":"# S3 method for class 'glmm' get_parameters(x, effects = c(\"all\", \"fixed\", \"random\"), ...) # S3 method for class 'coxme' get_parameters(x, effects = c(\"fixed\", \"random\"), ...) # S3 method for class 'nlmerMod' get_parameters( x, effects = c(\"fixed\", \"random\"), component = c(\"all\", \"conditional\", \"nonlinear\"), ... ) # S3 method for class 'merMod' get_parameters(x, effects = c(\"fixed\", \"random\"), ...) # S3 method for class 'glmmTMB' get_parameters( x, effects = c(\"fixed\", \"random\"), component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\", \"dispersion\"), ... ) # S3 method for class 'glimML' get_parameters(x, effects = c(\"fixed\", \"random\", \"all\"), ...)"},{"path":"https://easystats.github.io/insight/reference/get_parameters.glmm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get model parameters from mixed models — get_parameters.glmm","text":"x fitted model. effects parameters fixed effects, random effects returned? applies mixed models. May abbreviated. ... Currently used. component type parameters return, parameters conditional model, zero-inflated part model dispersion term? Applies models zero-inflated /dispersion formula. Note conditional component also called count mean component, depending model. three convenient shortcuts: component = \"\" returns possible parameters. component = \"location\", location parameters conditional zero_inflated returned (everything fixed random effects - depending effects argument - auxiliary parameters). component = \"distributional\" (\"auxiliary\"), components like sigma dispersion (auxiliary parameters) returned.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.glmm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get model parameters from mixed models — get_parameters.glmm","text":"effects = \"fixed\", data frame two columns: parameter names related point estimates. effects = \"random\", list data frames random effects (returned ranef()), unless random effects simplified structure fixed effects (e.g. models MCMCglmm).","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.glmm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get model parameters from mixed models — get_parameters.glmm","text":"cases models either return different \"effects\" (fixed, random) \"components\" (conditional, zero-inflated, ...), arguments effects component can used.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.glmm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get model parameters from mixed models — get_parameters.glmm","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_parameters(m) #> Parameter Estimate #> 1 (Intercept) 38.7460642 #> 2 wt -3.2463673 #> 3 cyl -1.3641033 #> 4 vs 0.5241721"},{"path":"https://easystats.github.io/insight/reference/get_parameters.htest.html","id":null,"dir":"Reference","previous_headings":"","what":"Get model parameters from htest-objects — get_parameters.htest","title":"Get model parameters from htest-objects — get_parameters.htest","text":"Returns parameters hypothesis test.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.htest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get model parameters from htest-objects — get_parameters.htest","text":"","code":"# S3 method for class 'htest' get_parameters(x, ...)"},{"path":"https://easystats.github.io/insight/reference/get_parameters.htest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get model parameters from htest-objects — get_parameters.htest","text":"x fitted model. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.htest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get model parameters from htest-objects — get_parameters.htest","text":"data frame two columns: parameter names related point estimates.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.htest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get model parameters from htest-objects — get_parameters.htest","text":"","code":"get_parameters(t.test(1:10, y = c(7:20))) #> Parameter Estimate #> 1 1:10 and c(7:20) -8"},{"path":"https://easystats.github.io/insight/reference/get_parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Get model parameters — get_parameters","title":"Get model parameters — get_parameters","text":"Returns coefficients (posterior samples Bayesian models) model. See documentation object's class: Bayesian models (rstanarm, brms, MCMCglmm, ...) Estimated marginal means (emmeans) Generalized additive models (mgcv, VGAM, ...) Marginal effects models (mfx) Mixed models (lme4, glmmTMB, GLMMadaptive, ...) Zero-inflated hurdle models (pscl, ...) Models special components (betareg, MuMIn, ...) Hypothesis tests (htest)","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get model parameters — get_parameters","text":"","code":"get_parameters(x, ...) # Default S3 method get_parameters(x, verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/get_parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get model parameters — get_parameters","text":"x fitted model. ... Currently used. verbose Toggle messages warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get model parameters — get_parameters","text":"non-Bayesian models, data frame two columns: parameter names related point estimates. Anova (aov()) error term, list parameters conditional random effects parameters","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get model parameters — get_parameters","text":"cases models either return different \"effects\" (fixed, random) \"components\" (conditional, zero-inflated, ...), arguments effects component can used. get_parameters() comparable coef(), however, coefficients returned data frame (columns names point estimates coefficients). Bayesian models, posterior samples parameters returned.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.html","id":"model-components","dir":"Reference","previous_headings":"","what":"Model components","title":"Get model parameters — get_parameters","text":"Possible values component argument depend model class. Following valid options: \"\": returns model components, applies models, effect models just conditional model component. \"conditional\": returns conditional component, .e. \"fixed effects\" terms model. effect models just conditional model component. \"smooth_terms\": returns smooth terms, applies GAMs (similar models may contain smooth terms). \"zero_inflated\" (\"zi\"): returns zero-inflation component. \"dispersion\": returns dispersion model component. common models zero-inflation can model dispersion parameter. \"instruments\": instrumental-variable fixed effects regression, returns instruments. \"location\": returns location parameters conditional, zero_inflated, smooth_terms, instruments (everything fixed random effects - depending effects argument - auxiliary parameters). \"distributional\" (\"auxiliary\"): components like sigma, dispersion, beta precision (auxiliary parameters) returned.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get model parameters — get_parameters","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_parameters(m) #> Parameter Estimate #> 1 (Intercept) 38.7460642 #> 2 wt -3.2463673 #> 3 cyl -1.3641033 #> 4 vs 0.5241721"},{"path":"https://easystats.github.io/insight/reference/get_parameters.zeroinfl.html","id":null,"dir":"Reference","previous_headings":"","what":"Get model parameters from zero-inflated and hurdle models — get_parameters.zeroinfl","title":"Get model parameters from zero-inflated and hurdle models — get_parameters.zeroinfl","text":"Returns coefficients model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.zeroinfl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get model parameters from zero-inflated and hurdle models — get_parameters.zeroinfl","text":"","code":"# S3 method for class 'zeroinfl' get_parameters( x, component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\"), ... ) # S3 method for class 'zcpglm' get_parameters( x, component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\"), ... ) # S3 method for class 'mhurdle' get_parameters( x, component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\", \"infrequent_purchase\", \"ip\", \"auxiliary\"), ... )"},{"path":"https://easystats.github.io/insight/reference/get_parameters.zeroinfl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get model parameters from zero-inflated and hurdle models — get_parameters.zeroinfl","text":"x fitted model. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.zeroinfl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get model parameters from zero-inflated and hurdle models — get_parameters.zeroinfl","text":"models smooth terms zero-inflation component, data frame three columns: parameter names, related point estimates component.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.zeroinfl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get model parameters from zero-inflated and hurdle models — get_parameters.zeroinfl","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_parameters(m) #> Parameter Estimate #> 1 (Intercept) 38.7460642 #> 2 wt -3.2463673 #> 3 cyl -1.3641033 #> 4 vs 0.5241721"},{"path":"https://easystats.github.io/insight/reference/get_predicted.html","id":null,"dir":"Reference","previous_headings":"","what":"Model predictions (robust) and their confidence intervals — get_predicted","title":"Model predictions (robust) and their confidence intervals — get_predicted","text":"get_predicted() function robust, flexible user-friendly alternative base R predict() function. Additional features advantages include availability uncertainty intervals (CI), bootstrapping, intuitive API support models base R's predict() function. However, although interface simplified, still important read documentation arguments. making \"predictions\" (lose term variety things) non-trivial process, lots caveats complications. Read 'Details' section information. get_predicted_ci() returns confidence (prediction) interval (CI) associated predictions made model. function can called separately vector predicted values. get_predicted() usually returns confidence intervals (included attribute, accessible via .data.frame() method) default. preferred rely get_predicted() function standard errors confidence intervals - use get_predicted_ci() standard errors confidence intervals available otherwise.","code":""},{"path":"https://easystats.github.io/insight/reference/get_predicted.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Model predictions (robust) and their confidence intervals — get_predicted","text":"","code":"get_predicted(x, ...) # Default S3 method get_predicted( x, data = NULL, predict = \"expectation\", ci = NULL, ci_type = \"confidence\", ci_method = NULL, dispersion_method = \"sd\", vcov = NULL, vcov_args = NULL, verbose = TRUE, ... ) # S3 method for class 'lm' get_predicted( x, data = NULL, predict = \"expectation\", ci = NULL, iterations = NULL, verbose = TRUE, ... ) # S3 method for class 'stanreg' get_predicted( x, data = NULL, predict = \"expectation\", iterations = NULL, ci = NULL, ci_method = NULL, include_random = \"default\", include_smooth = TRUE, verbose = TRUE, ... ) # S3 method for class 'gam' get_predicted( x, data = NULL, predict = \"expectation\", ci = NULL, include_random = TRUE, include_smooth = TRUE, iterations = NULL, verbose = TRUE, ... ) # S3 method for class 'lmerMod' get_predicted( x, data = NULL, predict = \"expectation\", ci = NULL, ci_method = NULL, include_random = \"default\", iterations = NULL, verbose = TRUE, ... ) # S3 method for class 'principal' get_predicted(x, data = NULL, ...)"},{"path":"https://easystats.github.io/insight/reference/get_predicted.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Model predictions (robust) and their confidence intervals — get_predicted","text":"x statistical model (can also data.frame, case second argument model). ... argument passed, instance get_predicted_ci(). data optional data frame look variables predict. omitted, data used fit model used. Visualization matrices can generated using get_datagrid(). predict string NULL \"link\" returns predictions model's link-scale (logistic models, means log-odds scale) confidence interval (CI). \"expectation\" (default) also returns confidence intervals, time output response scale (logistic models, means probabilities). \"prediction\" also gives output response scale, time associated prediction interval (PI), larger confidence interval (though mostly make sense linear models). \"classification\" differs \"prediction\" binomial models additionally transforms predictions original response's type (instance, factor). strings passed directly type argument predict() method supplied modelling package. predict = NULL, alternative arguments type captured ... ellipsis passed directly predict() method supplied modelling package. Note might result conflicts multiple matching type arguments - thus, recommendation use predict argument values. Notes: can see 4 options predictions gradient \"close model\" \"close response data\": \"link\", \"expectation\", \"prediction\", \"classification\". predict argument modulates two things: scale output type certainty interval. Read Details section . ci interval level. Default NULL, fast even larger models. Set interval level explicit value, e.g. 0.95, 95% CI). ci_type Can \"prediction\" \"confidence\". Prediction intervals show range likely contains value new observation (range fall), whereas confidence intervals reflect uncertainty around estimated parameters (gives range link; instance regression line linear regressions). Prediction intervals account uncertainty model's parameters, plus random variation individual values. Thus, prediction intervals always wider confidence intervals. Moreover, prediction intervals necessarily become narrower sample size increases (reflect quality fit). applies mostly \"simple\" linear models (like lm), models (e.g., glm), prediction intervals somewhat useless (instance, binomial model dependent variable vector 1s 0s, prediction interval ... [0, 1]). ci_method method computing p values confidence intervals. Possible values depend model type. NULL uses default method, varies based model type. frequentist models: \"wald\" (default), \"residual\" \"normal\". Bayesian models: \"quantile\" (default), \"hdi\", \"eti\", \"spi\". Mixed effects lme4 models: \"wald\" (default), \"residual\", \"normal\", \"satterthwaite\", \"kenward-roger\". See get_df() details. dispersion_method Bootstrap dispersion Bayesian posterior summary: \"sd\" \"mad\". vcov Variance-covariance matrix used compute uncertainty estimates (e.g., robust standard errors). argument accepts covariance matrix, function returns covariance matrix, string identifies function used compute covariance matrix. covariance matrix function returns covariance matrix (e.g., stats::vcov()) string indicates kind uncertainty estimates return. Heteroskedasticity-consistent: \"vcovHC\", \"HC\", \"HC0\", \"HC1\", \"HC2\", \"HC3\", \"HC4\", \"HC4m\", \"HC5\". See ?sandwich::vcovHC Cluster-robust: \"vcovCR\", \"CR0\", \"CR1\", \"CR1p\", \"CR1S\", \"CR2\", \"CR3\". See ?clubSandwich::vcovCR() Bootstrap: \"vcovBS\", \"xy\", \"residual\", \"wild\", \"mammen\", \"webb\". See ?sandwich::vcovBS sandwich package functions: \"vcovHAC\", \"vcovPC\", \"vcovCL\", \"vcovPL\". vcov_args List arguments passed function identified vcov argument. function typically supplied sandwich clubSandwich packages. Please refer documentation (e.g., ?sandwich::vcovHAC) see list available arguments. estimation type (argument type) given, default type \"HC\" (\"vcovHC\") equals default sandwich package; type \"CR\" (\"vcoCR\"), default set \"CR3\". verbose Toggle warnings. iterations Bayesian models, corresponds number posterior draws. NULL, return draws (one iteration model). frequentist models, NULL, generate bootstrapped draws, bootstrapped CIs computed. Iterations can accessed running .data.frame(..., keep_iterations = TRUE) output. include_random \"default\", include random effects prediction, unless random effect variables data. TRUE, include random effects prediction (case, checked actually random effect variables data). FALSE, take account. Can also formula specify random effects condition predicting (passed re.form argument). include_random = TRUE data provided, make sure include random effect variables data well. include_smooth General Additive Models (GAMs). FALSE, fix value smooth average, predictions depending . (default), mean(), bayestestR::map_estimate().","code":""},{"path":"https://easystats.github.io/insight/reference/get_predicted.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Model predictions (robust) and their confidence intervals — get_predicted","text":"fitted values (.e. predictions response). Bayesian bootstrapped models (iterations != NULL), iterations (columns observations rows) can accessed via .data.frame().","code":""},{"path":"https://easystats.github.io/insight/reference/get_predicted.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Model predictions (robust) and their confidence intervals — get_predicted","text":"insight::get_predicted(), predict argument jointly modulates two separate concepts, scale uncertainty interval.","code":""},{"path":"https://easystats.github.io/insight/reference/get_predicted.html","id":"confidence-interval-ci-vs-prediction-interval-pi-","dir":"Reference","previous_headings":"","what":"Confidence Interval (CI) vs. Prediction Interval (PI))","title":"Model predictions (robust) and their confidence intervals — get_predicted","text":"Linear models - lm(): linear models, prediction intervals (predict=\"prediction\") show range likely contains value new observation (range likely fall), whereas confidence intervals (predict=\"expectation\" predict=\"link\") reflect uncertainty around estimated parameters (gives range uncertainty regression line). general, Prediction Intervals (PIs) account uncertainty model's parameters, plus random variation individual values. Thus, prediction intervals always wider confidence intervals. Moreover, prediction intervals necessarily become narrower sample size increases (reflect quality fit, also variability within data). Generalized Linear models - glm(): binomial models, prediction intervals somewhat useless (instance, binomial (Bernoulli) model dependent variable vector 1s 0s, prediction interval ... [0, 1]).","code":""},{"path":"https://easystats.github.io/insight/reference/get_predicted.html","id":"link-scale-vs-response-scale","dir":"Reference","previous_headings":"","what":"Link scale vs. Response scale","title":"Model predictions (robust) and their confidence intervals — get_predicted","text":"users set predict argument \"expectation\", predictions returned response scale, arguably convenient way understand visualize relationships interest. users set predict argument \"link\", predictions returned link scale, transformation applied. instance, logistic regression model, response scale corresponds predicted probabilities, whereas link-scale makes predictions log-odds (probabilities logit scale). Note users select predict=\"classification\" binomial models, get_predicted() function first calculate predictions user selected predict=\"expectation\". , round responses order return likely outcome.","code":""},{"path":"https://easystats.github.io/insight/reference/get_predicted.html","id":"heteroscedasticity-consistent-standard-errors","dir":"Reference","previous_headings":"","what":"Heteroscedasticity consistent standard errors","title":"Model predictions (robust) and their confidence intervals — get_predicted","text":"arguments vcov vcov_args can used calculate robust standard errors confidence intervals predictions. arguments, provided get_predicted(), passed get_predicted_ci(), thus, see related documentation details.","code":""},{"path":"https://easystats.github.io/insight/reference/get_predicted.html","id":"bayesian-and-bootstrapped-models-and-iterations","dir":"Reference","previous_headings":"","what":"Bayesian and Bootstrapped models and iterations","title":"Model predictions (robust) and their confidence intervals — get_predicted","text":"predictions based multiple iterations, instance case Bayesian models bootstrapped predictions, function used compute centrality (point-estimate predictions) can modified via centrality_function argument. instance, get_predicted(model, centrality_function = stats::median). default mean. Individual draws can accessed running iter <- .data.frame(get_predicted(model)), iterations can reshaped long format bayestestR::reshape_iterations(iter).","code":""},{"path":[]},{"path":"https://easystats.github.io/insight/reference/get_predicted.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Model predictions (robust) and their confidence intervals — get_predicted","text":"","code":"data(mtcars) x <- lm(mpg ~ cyl + hp, data = mtcars) predictions <- get_predicted(x, ci = 0.95) predictions #> Predicted values: #> #> [1] 21.21678 21.21678 26.07124 21.21678 15.44448 21.31239 14.10597 26.66401 #> [9] 26.03299 20.96820 20.96820 15.34888 15.34888 15.34888 14.87083 14.67962 #> [17] 14.39279 26.58752 26.85523 26.60665 25.99475 15.92253 15.92253 14.10597 #> [25] 15.44448 26.58752 26.10948 25.68880 13.74265 19.97387 12.38501 25.76529 #> #> NOTE: Confidence intervals, if available, are stored as attributes and can be accessed using `as.data.frame()` on this output. #> # Options and methods --------------------- get_predicted(x, predict = \"prediction\") #> Predicted values: #> #> [1] 21.21678 21.21678 26.07124 21.21678 15.44448 21.31239 14.10597 26.66401 #> [9] 26.03299 20.96820 20.96820 15.34888 15.34888 15.34888 14.87083 14.67962 #> [17] 14.39279 26.58752 26.85523 26.60665 25.99475 15.92253 15.92253 14.10597 #> [25] 15.44448 26.58752 26.10948 25.68880 13.74265 19.97387 12.38501 25.76529 #> #> NOTE: Confidence intervals, if available, are stored as attributes and can be accessed using `as.data.frame()` on this output. #> # Get CI as.data.frame(predictions) #> Predicted SE CI_low CI_high #> 1 21.21678 0.7281647 19.727518 22.70605 #> 2 21.21678 0.7281647 19.727518 22.70605 #> 3 26.07124 0.9279509 24.173366 27.96911 #> 4 21.21678 0.7281647 19.727518 22.70605 #> 5 15.44448 0.9200310 13.562810 17.32616 #> 6 21.31239 0.7777664 19.721680 22.90310 #> 7 14.10597 1.0080670 12.044237 16.16769 #> 8 26.66401 0.9225132 24.777260 28.55076 #> 9 26.03299 0.9362657 24.118117 27.94787 #> 10 20.96820 0.6234320 19.693139 22.24326 #> 11 20.96820 0.6234320 19.693139 22.24326 #> 12 15.34888 0.8862558 13.536280 17.16147 #> 13 15.34888 0.8862558 13.536280 17.16147 #> 14 15.34888 0.8862558 13.536280 17.16147 #> 15 14.87083 0.8057154 13.222961 16.51871 #> 16 14.67962 0.8206255 13.001249 16.35798 #> 17 14.39279 0.8911693 12.570146 16.21544 #> 18 26.58752 0.9099596 24.726448 28.44860 #> 19 26.85523 0.9695585 24.872258 28.83820 #> 20 26.60665 0.9127445 24.739874 28.47342 #> 21 25.99475 0.9454598 24.061069 27.92843 #> 22 15.92253 1.1490264 13.572504 18.27255 #> 23 15.92253 1.1490264 13.572504 18.27255 #> 24 14.10597 1.0080670 12.044237 16.16769 #> 25 15.44448 0.9200310 13.562810 17.32616 #> 26 26.58752 0.9099596 24.726448 28.44860 #> 27 26.10948 0.9205392 24.226768 27.99220 #> 28 25.68880 1.0474287 23.546572 27.83104 #> 29 13.74265 1.2011595 11.286007 16.19930 #> 30 19.97387 0.7635547 18.412227 21.53552 #> 31 12.38501 2.1153615 8.058613 16.71141 #> 32 25.76529 1.0175965 23.684073 27.84651 # Bootstrapped as.data.frame(get_predicted(x, iterations = 4)) #> Predicted iter_1 iter_2 iter_3 iter_4 #> 1 21.40432 21.39969 21.82240 20.970542 21.42465 #> 2 21.40432 21.39969 21.82240 20.970542 21.42465 #> 3 26.68824 27.17221 28.54269 23.659855 27.37819 #> 4 21.40432 21.39969 21.82240 20.970542 21.42465 #> 5 15.13788 15.17414 14.88754 16.075708 14.41413 #> 6 21.50666 21.44688 21.84475 21.200284 21.53475 #> 7 13.70504 14.51349 14.57464 12.859324 12.87272 #> 8 27.32278 27.46478 28.68126 25.084254 28.06082 #> 9 26.64730 27.15333 28.53375 23.567958 27.33415 #> 10 21.13822 21.27699 21.76429 20.373213 21.13838 #> 11 21.13822 21.27699 21.76429 20.373213 21.13838 #> 12 15.03554 15.12695 14.86519 15.845966 14.30403 #> 13 15.03554 15.12695 14.86519 15.845966 14.30403 #> 14 15.03554 15.12695 14.86519 15.845966 14.30403 #> 15 14.52381 14.89101 14.75344 14.697258 13.75353 #> 16 14.31912 14.79663 14.70874 14.237774 13.53333 #> 17 14.01208 14.65506 14.64169 13.548549 13.20302 #> 18 27.24090 27.42703 28.66338 24.900460 27.97274 #> 19 27.52747 27.55916 28.72596 25.543737 28.28102 #> 20 27.26137 27.43647 28.66785 24.946409 27.99476 #> 21 26.60636 27.13446 28.52481 23.476061 27.29011 #> 22 15.64961 15.41009 14.99929 17.224417 14.96464 #> 23 15.64961 15.41009 14.99929 17.224417 14.96464 #> 24 13.70504 14.51349 14.57464 12.859324 12.87272 #> 25 15.13788 15.17414 14.88754 16.075708 14.41413 #> 26 27.24090 27.42703 28.66338 24.900460 27.97274 #> 27 26.72917 27.19108 28.55163 23.751752 27.42223 #> 28 26.27885 26.98345 28.45329 22.740888 26.93779 #> 29 13.31613 14.33417 14.48970 11.986305 12.45434 #> 30 20.07382 20.78622 21.53184 17.983899 19.99334 #> 31 11.86282 13.66407 14.17233 8.723972 10.89091 #> 32 26.36073 27.02120 28.47117 22.924681 27.02587 # Same as as.data.frame(..., keep_iterations = FALSE) summary(get_predicted(x, iterations = 4)) #> Predicted #> 1 20.79277 #> 2 20.79277 #> 3 25.80472 #> 4 20.79277 #> 5 15.02221 #> 6 20.87179 #> 7 13.91592 #> 8 26.29465 #> 9 25.77311 #> 10 20.58731 #> 11 20.58731 #> 12 14.94319 #> 13 14.94319 #> 14 14.94319 #> 15 14.54809 #> 16 14.39005 #> 17 14.15298 #> 18 26.23143 #> 19 26.45269 #> 20 26.24724 #> 21 25.74151 #> 22 15.41732 #> 23 15.41732 #> 24 13.91592 #> 25 15.02221 #> 26 26.23143 #> 27 25.83633 #> 28 25.48864 #> 29 13.61564 #> 30 19.76550 #> 31 12.49355 #> 32 25.55186 # Different prediction types ------------------------ data(iris) data <- droplevels(iris[1:100, ]) # Fit a logistic model x <- glm(Species ~ Sepal.Length, data = data, family = \"binomial\") # Expectation (default): response scale + CI pred <- get_predicted(x, predict = \"expectation\", ci = 0.95) head(as.data.frame(pred)) #> Predicted SE CI_low CI_high #> 1 0.16579367 0.05943589 0.078854431 0.31573138 #> 2 0.06637193 0.03625646 0.022083989 0.18286787 #> 3 0.02479825 0.01843411 0.005675609 0.10175666 #> 4 0.01498061 0.01261461 0.002839122 0.07513285 #> 5 0.10623680 0.04779474 0.042437982 0.24173444 #> 6 0.48159935 0.07901420 0.333158095 0.63336131 # Prediction: response scale + PI pred <- get_predicted(x, predict = \"prediction\", ci = 0.95) head(as.data.frame(pred)) #> Predicted CI_low CI_high #> 1 0.16579367 2.220446e-16 1.000000e+00 #> 2 0.06637193 2.220446e-16 1.000000e+00 #> 3 0.02479825 2.220446e-16 2.220446e-16 #> 4 0.01498061 2.220446e-16 2.220446e-16 #> 5 0.10623680 2.220446e-16 1.000000e+00 #> 6 0.48159935 2.220446e-16 1.000000e+00 # Link: link scale + CI pred <- get_predicted(x, predict = \"link\", ci = 0.95) head(as.data.frame(pred)) #> Predicted SE CI_low CI_high #> 1 -1.61573668 0.4297415 -2.4580146 -0.7734588 #> 2 -2.64380391 0.5850960 -3.7905709 -1.4970369 #> 3 -3.67187114 0.7622663 -5.1658856 -2.1778567 #> 4 -4.18590475 0.8548690 -5.8614172 -2.5103923 #> 5 -2.12977030 0.5033646 -3.1163467 -1.1431939 #> 6 -0.07363584 0.3164854 -0.6939359 0.5466642 # Classification: classification \"type\" + PI pred <- get_predicted(x, predict = \"classification\", ci = 0.95) head(as.data.frame(pred)) #> Predicted CI_low CI_high #> 1 setosa setosa versicolor #> 2 setosa setosa versicolor #> 3 setosa setosa setosa #> 4 setosa setosa setosa #> 5 setosa setosa versicolor #> 6 setosa setosa versicolor"},{"path":"https://easystats.github.io/insight/reference/get_predicted_ci.html","id":null,"dir":"Reference","previous_headings":"","what":"Confidence intervals around predicted values — get_predicted_ci","title":"Confidence intervals around predicted values — get_predicted_ci","text":"Confidence intervals around predicted values","code":""},{"path":"https://easystats.github.io/insight/reference/get_predicted_ci.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Confidence intervals around predicted values — get_predicted_ci","text":"","code":"get_predicted_ci(x, ...) # Default S3 method get_predicted_ci( x, predictions = NULL, data = NULL, se = NULL, ci = 0.95, ci_type = \"confidence\", ci_method = NULL, dispersion_method = \"sd\", vcov = NULL, vcov_args = NULL, verbose = TRUE, ... )"},{"path":"https://easystats.github.io/insight/reference/get_predicted_ci.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Confidence intervals around predicted values — get_predicted_ci","text":"x statistical model (can also data.frame, case second argument model). ... argument passed, instance get_predicted_ci(). predictions vector predicted values (obtained stats::fitted(), stats::predict() get_predicted()). data optional data frame look variables predict. omitted, data used fit model used. Visualization matrices can generated using get_datagrid(). se Numeric vector standard error predicted values. NULL, standard errors calculated based variance-covariance matrix. ci interval level. Default NULL, fast even larger models. Set interval level explicit value, e.g. 0.95, 95% CI). ci_type Can \"prediction\" \"confidence\". Prediction intervals show range likely contains value new observation (range fall), whereas confidence intervals reflect uncertainty around estimated parameters (gives range link; instance regression line linear regressions). Prediction intervals account uncertainty model's parameters, plus random variation individual values. Thus, prediction intervals always wider confidence intervals. Moreover, prediction intervals necessarily become narrower sample size increases (reflect quality fit). applies mostly \"simple\" linear models (like lm), models (e.g., glm), prediction intervals somewhat useless (instance, binomial model dependent variable vector 1s 0s, prediction interval ... [0, 1]). ci_method method computing p values confidence intervals. Possible values depend model type. NULL uses default method, varies based model type. frequentist models: \"wald\" (default), \"residual\" \"normal\". Bayesian models: \"quantile\" (default), \"hdi\", \"eti\", \"spi\". Mixed effects lme4 models: \"wald\" (default), \"residual\", \"normal\", \"satterthwaite\", \"kenward-roger\". See get_df() details. dispersion_method Bootstrap dispersion Bayesian posterior summary: \"sd\" \"mad\". vcov Variance-covariance matrix used compute uncertainty estimates (e.g., robust standard errors). argument accepts covariance matrix, function returns covariance matrix, string identifies function used compute covariance matrix. covariance matrix function returns covariance matrix (e.g., stats::vcov()) string indicates kind uncertainty estimates return. Heteroskedasticity-consistent: \"vcovHC\", \"HC\", \"HC0\", \"HC1\", \"HC2\", \"HC3\", \"HC4\", \"HC4m\", \"HC5\". See ?sandwich::vcovHC Cluster-robust: \"vcovCR\", \"CR0\", \"CR1\", \"CR1p\", \"CR1S\", \"CR2\", \"CR3\". See ?clubSandwich::vcovCR() Bootstrap: \"vcovBS\", \"xy\", \"residual\", \"wild\", \"mammen\", \"webb\". See ?sandwich::vcovBS sandwich package functions: \"vcovHAC\", \"vcovPC\", \"vcovCL\", \"vcovPL\". vcov_args List arguments passed function identified vcov argument. function typically supplied sandwich clubSandwich packages. Please refer documentation (e.g., ?sandwich::vcovHAC) see list available arguments. estimation type (argument type) given, default type \"HC\" (\"vcovHC\") equals default sandwich package; type \"CR\" (\"vcoCR\"), default set \"CR3\". verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/get_predicted_ci.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Confidence intervals around predicted values — get_predicted_ci","text":"Typically, get_predicted() returns confidence intervals based standard errors returned predict()-function, assuming normal distribution (+/- 1.96 * SE) resp. Student's t-distribution (degrees freedom available). predict() certain class return standard errors (example, merMod-objects), calculated manually, based following steps: matrix-multiply X parameter vector B get predictions, extract variance-covariance matrix V parameters compute XVX' get variance-covariance matrix predictions. square-root diagonal matrix represent standard errors predictions, multiplied critical test-statistic value (e.g., ~1.96 normal distribution) confidence intervals. ci_type = \"prediction\", prediction intervals calculated. wider confidence intervals, also take account uncertainty model . taking square-root diagonal variance-covariance matrix, get_predicted_ci() adds residual variance values. mixed models, get_variance_residual() used, get_sigma()^2 used non-mixed models. preferred rely standard errors returned get_predicted() (.e. returned predict()-function), accurate manually calculated standard errors. Use get_predicted_ci() standard errors available otherwise. exception Bayesian models bootstrapped predictions, get_predicted_ci() returns quantiles posterior distribution bootstrapped samples predictions. actually accurate standard errors resp. confidence (uncertainty) intervals.","code":""},{"path":"https://easystats.github.io/insight/reference/get_predicted_ci.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Confidence intervals around predicted values — get_predicted_ci","text":"","code":"# Confidence Intervals for Model Predictions # ------------------------------------------ data(mtcars) # Linear model # ------------ x <- lm(mpg ~ cyl + hp, data = mtcars) predictions <- predict(x) ci_vals <- get_predicted_ci(x, predictions, ci_type = \"prediction\") head(ci_vals) #> SE CI_low CI_high #> 1 3.255505 14.558527 27.87504 #> 2 3.255505 14.558527 27.87504 #> 3 3.305931 19.309850 32.83263 #> 4 3.255505 14.558527 27.87504 #> 5 3.303717 8.687625 22.20134 #> 6 3.266957 14.630713 27.99407 ci_vals <- get_predicted_ci(x, predictions, ci_type = \"confidence\") head(ci_vals) #> SE CI_low CI_high #> 1 0.7281647 19.72752 22.70605 #> 2 0.7281647 19.72752 22.70605 #> 3 0.9279509 24.17337 27.96911 #> 4 0.7281647 19.72752 22.70605 #> 5 0.9200310 13.56281 17.32616 #> 6 0.7777664 19.72168 22.90310 ci_vals <- get_predicted_ci(x, predictions, ci = c(0.8, 0.9, 0.95)) head(ci_vals) #> SE CI_low_0.8 CI_high_0.8 CI_low_0.9 CI_high_0.9 #> Mazda RX4 0.7281647 20.26184 22.17172 19.97954 22.45403 #> Mazda RX4 Wag 0.7281647 20.26184 22.17172 19.97954 22.45403 #> Datsun 710 0.9279509 24.85429 27.28818 24.49453 27.64794 #> Hornet 4 Drive 0.7281647 20.26184 22.17172 19.97954 22.45403 #> Hornet Sportabout 0.9200310 14.23793 16.65104 13.88124 17.00773 #> Valiant 0.7777664 20.29240 22.33238 19.99087 22.63391 #> CI_low_0.95 CI_high_0.95 #> Mazda RX4 19.72752 22.70605 #> Mazda RX4 Wag 19.72752 22.70605 #> Datsun 710 24.17337 27.96911 #> Hornet 4 Drive 19.72752 22.70605 #> Hornet Sportabout 13.56281 17.32616 #> Valiant 19.72168 22.90310 # Bootstrapped # ------------ predictions <- get_predicted(x, iterations = 500) get_predicted_ci(x, predictions) #> SE CI_low CI_high #> 1 0.6778386 20.06367 22.73426 #> 2 0.6778386 20.06367 22.73426 #> 3 1.1213280 24.07299 28.19569 #> 4 0.6778386 20.06367 22.73426 #> 5 0.7137549 13.96361 16.74841 #> 6 0.7196399 20.11708 22.92205 #> 7 0.9616939 11.54478 15.32004 #> 8 1.1099003 24.70988 29.07236 #> 9 1.1281547 24.00743 28.15526 #> 10 0.5968210 19.90476 22.18073 #> 11 0.5968210 19.90476 22.18073 #> 12 0.6867313 13.94831 16.57341 #> 13 0.6867313 13.94831 16.57341 #> 14 0.6867313 13.94831 16.57341 #> 15 0.6619519 13.42214 15.93349 #> 16 0.7053541 13.08691 15.77129 #> 17 0.8151358 12.40637 15.55107 #> 18 1.1012410 24.63705 28.94998 #> 19 1.1440413 24.87906 29.34752 #> 20 1.1031298 24.65526 28.99487 #> 21 1.1356722 23.94017 28.10764 #> 22 0.9243855 14.17452 17.75612 #> 23 0.9243855 14.17452 17.75612 #> 24 0.9616939 11.54478 15.32004 #> 25 0.7137549 13.96361 16.74841 #> 26 1.1012410 24.63705 28.94998 #> 27 1.1152049 24.14757 28.24896 #> 28 1.2189054 23.41192 27.86701 #> 29 1.1785211 10.35989 15.04183 #> 30 0.8033095 18.06171 21.24781 #> 31 2.1096285 6.00274 14.50050 #> 32 1.1944721 23.58991 27.93128 ci_vals <- get_predicted_ci(x, predictions, ci = c(0.80, 0.95)) head(ci_vals) #> SE CI_low_0.8 CI_high_0.8 CI_low_0.95 CI_high_0.95 #> 1 0.6778386 20.45157 22.16835 20.06367 22.73426 #> 2 0.6778386 20.45157 22.16835 20.06367 22.73426 #> 3 1.1213280 24.67816 27.54677 24.07299 28.19569 #> 4 0.6778386 20.45157 22.16835 20.06367 22.73426 #> 5 0.7137549 14.54509 16.32089 13.96361 16.74841 #> 6 0.7196399 20.53000 22.33227 20.11708 22.92205 datawizard::reshape_ci(ci_vals) #> SE CI CI_low CI_high #> 1 0.6778386 0.80 20.451569 22.16835 #> 2 0.6778386 0.95 20.063672 22.73426 #> 3 0.6778386 0.80 20.451569 22.16835 #> 4 0.6778386 0.95 20.063672 22.73426 #> 5 1.1213280 0.80 24.678158 27.54677 #> 6 1.1213280 0.95 24.072992 28.19569 #> 7 0.6778386 0.80 20.451569 22.16835 #> 8 0.6778386 0.95 20.063672 22.73426 #> 9 0.7137549 0.80 14.545092 16.32089 #> 10 0.7137549 0.95 13.963615 16.74841 #> 11 0.7196399 0.80 20.530002 22.33227 #> 12 0.7196399 0.95 20.117084 22.92205 #> 13 0.9616939 0.80 12.655150 14.95435 #> 14 0.9616939 0.95 11.544778 15.32004 #> 15 1.1099003 0.80 25.382182 28.18554 #> 16 1.1099003 0.95 24.709884 29.07236 #> 17 1.1281547 0.80 24.601358 27.52583 #> 18 1.1281547 0.95 24.007430 28.15526 #> 19 0.5968210 0.80 20.254035 21.81961 #> 20 0.5968210 0.95 19.904758 22.18073 #> 21 0.5968210 0.80 20.254035 21.81961 #> 22 0.5968210 0.95 19.904758 22.18073 #> 23 0.6867313 0.80 14.457044 16.21674 #> 24 0.6867313 0.95 13.948306 16.57341 #> 25 0.6867313 0.80 14.457044 16.21674 #> 26 0.6867313 0.95 13.948306 16.57341 #> 27 0.6867313 0.80 14.457044 16.21674 #> 28 0.6867313 0.95 13.948306 16.57341 #> 29 0.6619519 0.80 13.896709 15.57043 #> 30 0.6619519 0.95 13.422141 15.93349 #> 31 0.7053541 0.80 13.603118 15.38838 #> 32 0.7053541 0.95 13.086914 15.77129 #> 33 0.8151358 0.80 13.135102 15.14540 #> 34 0.8151358 0.95 12.406367 15.55107 #> 35 1.1012410 0.80 25.282352 28.10660 #> 36 1.1012410 0.95 24.637053 28.94998 #> 37 1.1440413 0.80 25.552262 28.39162 #> 38 1.1440413 0.95 24.879062 29.34752 #> 39 1.1031298 0.80 25.307084 28.11418 #> 40 1.1031298 0.95 24.655261 28.99487 #> 41 1.1356722 0.80 24.536732 27.48013 #> 42 1.1356722 0.95 23.940169 28.10764 #> 43 0.9243855 0.80 14.860147 17.07831 #> 44 0.9243855 0.95 14.174521 17.75612 #> 45 0.9243855 0.80 14.860147 17.07831 #> 46 0.9243855 0.95 14.174521 17.75612 #> 47 0.9616939 0.80 12.655150 14.95435 #> 48 0.9616939 0.95 11.544778 15.32004 #> 49 0.7137549 0.80 14.545092 16.32089 #> 50 0.7137549 0.95 13.963615 16.74841 #> 51 1.1012410 0.80 25.282352 28.10660 #> 52 1.1012410 0.95 24.637053 28.94998 #> 53 1.1152049 0.80 24.740830 27.58820 #> 54 1.1152049 0.95 24.147568 28.24896 #> 55 1.2189054 0.80 24.021410 27.27151 #> 56 1.2189054 0.95 23.411922 27.86701 #> 57 1.1785211 0.80 12.017648 14.69466 #> 58 1.1785211 0.95 10.359894 15.04183 #> 59 0.8033095 0.80 18.845838 20.82505 #> 60 0.8033095 0.95 18.061714 21.24781 #> 61 2.1096285 0.80 9.139553 13.95768 #> 62 2.1096285 0.95 6.002740 14.50050 #> 63 1.1944721 0.80 24.160657 27.32296 #> 64 1.1944721 0.95 23.589908 27.93128 ci_vals <- get_predicted_ci(x, predictions, dispersion_method = \"MAD\", ci_method = \"HDI\" ) head(ci_vals) #> SE CI_low CI_high #> 1 0.6511853 20.08775 22.75861 #> 2 0.6511853 20.08775 22.75861 #> 3 1.1886593 24.12011 28.22016 #> 4 0.6511853 20.08775 22.75861 #> 5 0.6922916 13.92620 16.69426 #> 6 0.7042060 20.11663 22.92984 # Logistic model # -------------- x <- glm(vs ~ wt, data = mtcars, family = \"binomial\") predictions <- predict(x, type = \"link\") ci_vals <- get_predicted_ci(x, predictions, ci_type = \"prediction\") head(ci_vals) #> CI_low CI_high #> Mazda RX4 -Inf Inf #> Mazda RX4 Wag -Inf Inf #> Datsun 710 -Inf Inf #> Hornet 4 Drive -Inf Inf #> Hornet Sportabout -Inf Inf #> Valiant -Inf Inf ci_vals <- get_predicted_ci(x, predictions, ci_type = \"confidence\") head(ci_vals) #> SE CI_low CI_high #> 1 0.5623444 -0.3931282 1.8112213 #> 2 0.4690190 -0.6974034 1.1411172 #> 3 0.7195076 -0.1279982 2.6924199 #> 4 0.4459072 -1.3016913 0.4462326 #> 5 0.5021936 -1.8418839 0.1266787 #> 6 0.5094490 -1.8943152 0.1026881"},{"path":"https://easystats.github.io/insight/reference/get_predictors.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the data from model predictors — get_predictors","title":"Get the data from model predictors — get_predictors","text":"Returns data predictor variables (fixed effects).","code":""},{"path":"https://easystats.github.io/insight/reference/get_predictors.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the data from model predictors — get_predictors","text":"","code":"get_predictors(x, verbose = TRUE)"},{"path":"https://easystats.github.io/insight/reference/get_predictors.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the data from model predictors — get_predictors","text":"x fitted model. verbose Toggle messages warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/get_predictors.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the data from model predictors — get_predictors","text":"data predictor variables, data frame.","code":""},{"path":"https://easystats.github.io/insight/reference/get_predictors.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the data from model predictors — get_predictors","text":"","code":"m <- lm(mpg ~ wt + cyl + vs, data = mtcars) head(get_predictors(m)) #> wt cyl vs #> Mazda RX4 2.620 6 0 #> Mazda RX4 Wag 2.875 6 0 #> Datsun 710 2.320 4 1 #> Hornet 4 Drive 3.215 6 1 #> Hornet Sportabout 3.440 8 0 #> Valiant 3.460 6 1"},{"path":"https://easystats.github.io/insight/reference/get_priors.html","id":null,"dir":"Reference","previous_headings":"","what":"Get summary of priors used for a model — get_priors","title":"Get summary of priors used for a model — get_priors","text":"Provides summary prior distributions used parameters given model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_priors.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get summary of priors used for a model — get_priors","text":"","code":"get_priors(x, ...) # S3 method for class 'brmsfit' get_priors(x, verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/get_priors.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get summary of priors used for a model — get_priors","text":"x Bayesian model. ... Currently used. verbose Toggle warnings messages.","code":""},{"path":"https://easystats.github.io/insight/reference/get_priors.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get summary of priors used for a model — get_priors","text":"data frame summary prior distributions used parameters given model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_priors.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get summary of priors used for a model — get_priors","text":"","code":"# \\donttest{ library(rstanarm) model <- stan_glm(Sepal.Width ~ Species * Petal.Length, data = iris) #> #> SAMPLING FOR MODEL 'continuous' NOW (CHAIN 1). #> Chain 1: #> Chain 1: Gradient evaluation took 2.1e-05 seconds #> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 0.21 seconds. #> Chain 1: Adjust your expectations accordingly! #> Chain 1: #> Chain 1: #> Chain 1: Iteration: 1 / 2000 [ 0%] (Warmup) #> Chain 1: Iteration: 200 / 2000 [ 10%] (Warmup) #> Chain 1: Iteration: 400 / 2000 [ 20%] (Warmup) #> Chain 1: Iteration: 600 / 2000 [ 30%] (Warmup) #> Chain 1: Iteration: 800 / 2000 [ 40%] (Warmup) #> Chain 1: Iteration: 1000 / 2000 [ 50%] (Warmup) #> Chain 1: Iteration: 1001 / 2000 [ 50%] (Sampling) #> Chain 1: Iteration: 1200 / 2000 [ 60%] (Sampling) #> Chain 1: Iteration: 1400 / 2000 [ 70%] (Sampling) #> Chain 1: Iteration: 1600 / 2000 [ 80%] (Sampling) #> Chain 1: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 1: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 1: #> Chain 1: Elapsed Time: 0.441 seconds (Warm-up) #> Chain 1: 0.492 seconds (Sampling) #> Chain 1: 0.933 seconds (Total) #> Chain 1: #> #> SAMPLING FOR MODEL 'continuous' NOW (CHAIN 2). #> Chain 2: #> Chain 2: Gradient evaluation took 1.1e-05 seconds #> Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 0.11 seconds. #> Chain 2: Adjust your expectations accordingly! #> Chain 2: #> Chain 2: #> Chain 2: Iteration: 1 / 2000 [ 0%] (Warmup) #> Chain 2: Iteration: 200 / 2000 [ 10%] (Warmup) #> Chain 2: Iteration: 400 / 2000 [ 20%] (Warmup) #> Chain 2: Iteration: 600 / 2000 [ 30%] (Warmup) #> Chain 2: Iteration: 800 / 2000 [ 40%] (Warmup) #> Chain 2: Iteration: 1000 / 2000 [ 50%] (Warmup) #> Chain 2: Iteration: 1001 / 2000 [ 50%] (Sampling) #> Chain 2: Iteration: 1200 / 2000 [ 60%] (Sampling) #> Chain 2: Iteration: 1400 / 2000 [ 70%] (Sampling) #> Chain 2: Iteration: 1600 / 2000 [ 80%] (Sampling) #> Chain 2: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 2: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 2: #> Chain 2: Elapsed Time: 0.454 seconds (Warm-up) #> Chain 2: 0.495 seconds (Sampling) #> Chain 2: 0.949 seconds (Total) #> Chain 2: #> #> SAMPLING FOR MODEL 'continuous' NOW (CHAIN 3). #> Chain 3: #> Chain 3: Gradient evaluation took 1.1e-05 seconds #> Chain 3: 1000 transitions using 10 leapfrog steps per transition would take 0.11 seconds. #> Chain 3: Adjust your expectations accordingly! #> Chain 3: #> Chain 3: #> Chain 3: Iteration: 1 / 2000 [ 0%] (Warmup) #> Chain 3: Iteration: 200 / 2000 [ 10%] (Warmup) #> Chain 3: Iteration: 400 / 2000 [ 20%] (Warmup) #> Chain 3: Iteration: 600 / 2000 [ 30%] (Warmup) #> Chain 3: Iteration: 800 / 2000 [ 40%] (Warmup) #> Chain 3: Iteration: 1000 / 2000 [ 50%] (Warmup) #> Chain 3: Iteration: 1001 / 2000 [ 50%] (Sampling) #> Chain 3: Iteration: 1200 / 2000 [ 60%] (Sampling) #> Chain 3: Iteration: 1400 / 2000 [ 70%] (Sampling) #> Chain 3: Iteration: 1600 / 2000 [ 80%] (Sampling) #> Chain 3: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 3: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 3: #> Chain 3: Elapsed Time: 0.442 seconds (Warm-up) #> Chain 3: 0.523 seconds (Sampling) #> Chain 3: 0.965 seconds (Total) #> Chain 3: #> #> SAMPLING FOR MODEL 'continuous' NOW (CHAIN 4). #> Chain 4: #> Chain 4: Gradient evaluation took 1.3e-05 seconds #> Chain 4: 1000 transitions using 10 leapfrog steps per transition would take 0.13 seconds. #> Chain 4: Adjust your expectations accordingly! #> Chain 4: #> Chain 4: #> Chain 4: Iteration: 1 / 2000 [ 0%] (Warmup) #> Chain 4: Iteration: 200 / 2000 [ 10%] (Warmup) #> Chain 4: Iteration: 400 / 2000 [ 20%] (Warmup) #> Chain 4: Iteration: 600 / 2000 [ 30%] (Warmup) #> Chain 4: Iteration: 800 / 2000 [ 40%] (Warmup) #> Chain 4: Iteration: 1000 / 2000 [ 50%] (Warmup) #> Chain 4: Iteration: 1001 / 2000 [ 50%] (Sampling) #> Chain 4: Iteration: 1200 / 2000 [ 60%] (Sampling) #> Chain 4: Iteration: 1400 / 2000 [ 70%] (Sampling) #> Chain 4: Iteration: 1600 / 2000 [ 80%] (Sampling) #> Chain 4: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 4: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 4: #> Chain 4: Elapsed Time: 0.408 seconds (Warm-up) #> Chain 4: 0.479 seconds (Sampling) #> Chain 4: 0.887 seconds (Total) #> Chain 4: get_priors(model) #> Parameter Distribution Location Scale Adjusted_Scale #> 1 (Intercept) normal 3.057333 2.5 1.0896657 #> 2 Speciesversicolor normal 0.000000 2.5 2.3038121 #> 3 Speciesvirginica normal 0.000000 2.5 2.3038121 #> 4 Petal.Length normal 0.000000 2.5 0.6172700 #> 5 Speciesversicolor:Petal.Length normal 0.000000 2.5 0.5360283 #> 6 Speciesvirginica:Petal.Length normal 0.000000 2.5 0.4119705 # }"},{"path":"https://easystats.github.io/insight/reference/get_random.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the data from random effects — get_random","title":"Get the data from random effects — get_random","text":"Returns data random effects terms.","code":""},{"path":"https://easystats.github.io/insight/reference/get_random.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the data from random effects — get_random","text":"","code":"get_random(x)"},{"path":"https://easystats.github.io/insight/reference/get_random.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the data from random effects — get_random","text":"x fitted mixed model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_random.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the data from random effects — get_random","text":"data random effects terms, data frame. NULL model random effects.","code":""},{"path":"https://easystats.github.io/insight/reference/get_random.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the data from random effects — get_random","text":"","code":"data(sleepstudy) # prepare some data... sleepstudy$mygrp <- sample(1:5, size = 180, replace = TRUE) sleepstudy$mysubgrp <- NA for (i in 1:5) { filter_group <- sleepstudy$mygrp == i sleepstudy$mysubgrp[filter_group] <- sample(1:30, size = sum(filter_group), replace = TRUE) } m <- lmer( Reaction ~ Days + (1 | mygrp / mysubgrp) + (1 | Subject), data = sleepstudy ) #> boundary (singular) fit: see help('isSingular') head(get_random(m)) #> mysubgrp mygrp Subject #> 1 25 4 308 #> 2 6 3 308 #> 3 26 3 308 #> 4 24 5 308 #> 5 19 3 308 #> 6 3 1 308"},{"path":"https://easystats.github.io/insight/reference/get_residuals.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract model residuals — get_residuals","title":"Extract model residuals — get_residuals","text":"Returns residuals regression models.","code":""},{"path":"https://easystats.github.io/insight/reference/get_residuals.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract model residuals — get_residuals","text":"","code":"get_residuals(x, ...) # Default S3 method get_residuals(x, weighted = FALSE, verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/get_residuals.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract model residuals — get_residuals","text":"x model. ... Passed residuals(), possible. weighted Logical, TRUE, returns weighted residuals. verbose Toggle warnings messages.","code":""},{"path":"https://easystats.github.io/insight/reference/get_residuals.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract model residuals — get_residuals","text":"residuals, NULL information accessed.","code":""},{"path":"https://easystats.github.io/insight/reference/get_residuals.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extract model residuals — get_residuals","text":"function returns default type residuals, .e. response linear models, deviance residuals models class glm etc. access different types, pass type argument (see 'Examples'). function robust alternative residuals(), works special model objects otherwise respond properly calling residuals().","code":""},{"path":"https://easystats.github.io/insight/reference/get_residuals.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract model residuals — get_residuals","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_residuals(m) #> Mazda RX4 Mazda RX4 Wag Datsun 710 Hornet 4 Drive #> -1.0559619 -0.2281383 -3.4822509 0.7514545 #> Hornet Sportabout Valiant Duster 360 Merc 240D #> 2.0342659 -1.7531855 -1.9437064 0.9420887 #> Merc 230 Merc 280 Merc 280C Merc 450SE #> -0.7877660 -0.7181129 -2.1181129 1.7794773 #> Merc 450SL Merc 450SLC Cadillac Fleetwood Lincoln Continental #> 1.5757124 -0.3619692 -0.3898093 0.1750587 #> Chrysler Imperial Fiat 128 Honda Civic Toyota Corolla #> 4.2185956 5.7281850 1.8290601 6.0432610 #> Toyota Corona Dodge Challenger AMC Javelin Camaro Z28 #> -4.3115276 -0.9060247 -1.4819660 -2.0671872 #> Pontiac Firebird Fiat X1-9 Porsche 914-2 Lotus Europa #> 3.8490446 -0.2321023 -0.3424249 1.4979307 #> Ford Pantera L Ferrari Dino Maserati Bora Volvo 142E #> -1.7422533 -1.8690068 -1.2437064 -3.3889219 m <- glm(vs ~ wt + cyl + mpg, data = mtcars, family = binomial()) get_residuals(m) # type = \"deviance\" by default #> Mazda RX4 Mazda RX4 Wag Datsun 710 Hornet 4 Drive #> -0.63287224 -0.81557679 0.24153475 1.23515879 #> Hornet Sportabout Valiant Duster 360 Merc 240D #> -0.09537483 1.09436219 -0.09536895 0.08620842 #> Merc 230 Merc 280 Merc 280C Merc 450SE #> 0.09512715 1.08274703 1.12137225 -0.17947784 #> Merc 450SL Merc 450SLC Cadillac Fleetwood Lincoln Continental #> -0.12620688 -0.12450351 -0.53935361 -0.64596525 #> Chrysler Imperial Fiat 128 Honda Civic Toyota Corolla #> -0.67827839 0.20117929 0.40994430 0.28751494 #> Toyota Corona Dodge Challenger AMC Javelin Camaro Z28 #> 0.21446014 -0.09381913 -0.08439431 -0.12504287 #> Pontiac Firebird Fiat X1-9 Porsche 914-2 Lotus Europa #> -0.15299615 0.31935163 -2.59315645 0.45762007 #> Ford Pantera L Ferrari Dino Maserati Bora Volvo 142E #> -0.06384435 -0.70853216 -0.09761985 0.15116709 get_residuals(m, type = \"response\") #> Mazda RX4 Mazda RX4 Wag Datsun 710 Hornet 4 Drive #> -0.181485065 -0.282930670 0.028748195 0.533645229 #> Hornet Sportabout Valiant Duster 360 Merc 240D #> -0.004537852 0.450537255 -0.004537293 0.003709050 #> Merc 230 Merc 280 Merc 280C Merc 450SE #> 0.004514367 0.443545885 0.466735567 -0.015977138 #> Merc 450SL Merc 450SLC Cadillac Fleetwood Lincoln Continental #> -0.007932459 -0.007720604 -0.135367880 -0.188308998 #> Chrysler Imperial Fiat 128 Honda Civic Toyota Corolla #> -0.205490858 0.020033170 0.080593721 0.040489884 #> Toyota Corona Dodge Challenger AMC Javelin Camaro Z28 #> 0.022734170 -0.004391345 -0.003554867 -0.007787380 #> Pontiac Firebird Fiat X1-9 Porsche 914-2 Lotus Europa #> -0.011635687 0.049714423 -0.965342121 0.099412603 #> Ford Pantera L Ferrari Dino Maserati Bora Volvo 142E #> -0.002035975 -0.221984564 -0.004753484 0.011360719"},{"path":"https://easystats.github.io/insight/reference/get_response.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the values from the response variable — get_response","title":"Get the values from the response variable — get_response","text":"Returns values response variable(s) model object. model multivariate response model, data frame values response variables returned.","code":""},{"path":"https://easystats.github.io/insight/reference/get_response.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the values from the response variable — get_response","text":"","code":"get_response(x, ...) # Default S3 method get_response( x, select = NULL, as_proportion = TRUE, source = \"environment\", verbose = TRUE, ... ) # S3 method for class 'nestedLogit' get_response(x, dichotomies = FALSE, source = \"environment\", ...)"},{"path":"https://easystats.github.io/insight/reference/get_response.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the values from the response variable — get_response","text":"x fitted model. ... Currently used. select Optional name(s) response variables extract values. Can used case regression models multiple response variables. as_proportion Logical, TRUE response value proportion (e.g. y1 / y2), returned response value vector result proportion. Else, always data frame returned. source String, indicating data recovered. source = \"environment\" (default), data recovered environment (e.g. data workspace). option usually fastest way getting data ensures original variables used model fitting returned. Note always current data recovered environment. Hence, data modified model fitting (e.g., variables recoded rows filtered), returned data may longer equal model data. source = \"frame\" (\"mf\"), data taken model frame. transformed variables back-transformed, possible. option returns data even available environment, however, certain edge cases back-transforming original data may fail. source = \"environment\" fails recover data, tries extract data model frame; source = \"frame\" data extracted model frame, data recovered environment. ways returns observations missing data variables used model fitting. verbose Toggle warnings. dichotomies Logical, model nestedLogit objects, returns response values dichotomies.","code":""},{"path":"https://easystats.github.io/insight/reference/get_response.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the values from the response variable — get_response","text":"values response variable, vector, data frame x one defined response variable.","code":""},{"path":"https://easystats.github.io/insight/reference/get_response.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the values from the response variable — get_response","text":"","code":"data(cbpp) cbpp$trials <- cbpp$size - cbpp$incidence dat <<- cbpp m <- glm(cbind(incidence, trials) ~ period, data = dat, family = binomial) head(get_response(m)) #> incidence trials #> 1 2 12 #> 2 3 9 #> 3 4 5 #> 4 0 5 #> 5 3 19 #> 6 1 17 get_response(m, select = \"incidence\") #> [1] 2 data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_response(m) #> [1] 21.0 21.0 22.8 21.4 18.7 18.1 14.3 24.4 22.8 19.2 17.8 16.4 17.3 15.2 10.4 #> [16] 10.4 14.7 32.4 30.4 33.9 21.5 15.5 15.2 13.3 19.2 27.3 26.0 30.4 15.8 19.7 #> [31] 15.0 21.4"},{"path":"https://easystats.github.io/insight/reference/get_sigma.html","id":null,"dir":"Reference","previous_headings":"","what":"Get residual standard deviation from models — get_sigma","title":"Get residual standard deviation from models — get_sigma","text":"Returns sigma, corresponds estimated standard deviation residuals. function extends sigma() base R generic models implemented . also computes confidence interval (CI), stored attribute. Sigma key-component regression models, part -called auxiliary parameters estimated. Indeed, linear models instance assume residuals comes normal distribution mean 0 standard deviation sigma. See details section information interpretation calculation.","code":""},{"path":"https://easystats.github.io/insight/reference/get_sigma.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get residual standard deviation from models — get_sigma","text":"","code":"get_sigma(x, ci = NULL, verbose = TRUE)"},{"path":"https://easystats.github.io/insight/reference/get_sigma.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get residual standard deviation from models — get_sigma","text":"x model. ci Scalar, CI level. default (NULL) returns CI. verbose Toggle messages warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/get_sigma.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get residual standard deviation from models — get_sigma","text":"residual standard deviation (sigma), NULL information accessed.","code":""},{"path":"https://easystats.github.io/insight/reference/get_sigma.html","id":"interpretation-of-sigma","dir":"Reference","previous_headings":"","what":"Interpretation of Sigma","title":"Get residual standard deviation from models — get_sigma","text":"residual standard deviation, σ, indicates predicted outcome within +/- σ units linear predictor approximately 68% data points (Gelman, Hill & Vehtari 2020, p.84). words, residual standard deviation indicates accuracy model predict scores, thus can thought \"measure average distance observation falls prediction model\" (Gelman, Hill & Vehtari 2020, p.168). σ can considered measure unexplained variation data, precision inferences regression coefficients.","code":""},{"path":"https://easystats.github.io/insight/reference/get_sigma.html","id":"calculation-of-sigma","dir":"Reference","previous_headings":"","what":"Calculation of Sigma","title":"Get residual standard deviation from models — get_sigma","text":"default, get_sigma() tries extract sigma calling stats::sigma(). model-object sigma() method, next step calculating sigma square-root model-deviance divided residual degrees freedom. Finally, even approach fails, x mixed model, residual standard deviation accessed using square-root get_variance_residual().","code":""},{"path":"https://easystats.github.io/insight/reference/get_sigma.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get residual standard deviation from models — get_sigma","text":"Gelman, ., Hill, J., & Vehtari, . (2020). Regression Stories. Cambridge University Press.","code":""},{"path":"https://easystats.github.io/insight/reference/get_sigma.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get residual standard deviation from models — get_sigma","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_sigma(m) #> [1] 2.608133 #> attr(,\"class\") #> [1] \"insight_aux\" \"numeric\""},{"path":"https://easystats.github.io/insight/reference/get_statistic.html","id":null,"dir":"Reference","previous_headings":"","what":"Get statistic associated with estimates — get_statistic","title":"Get statistic associated with estimates — get_statistic","text":"Returns statistic (t, z, ...) model estimates. cases, related column coef(summary()).","code":""},{"path":"https://easystats.github.io/insight/reference/get_statistic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get statistic associated with estimates — get_statistic","text":"","code":"get_statistic(x, ...) # Default S3 method get_statistic(x, column_index = 3, verbose = TRUE, ...) # S3 method for class 'glmmTMB' get_statistic(x, component = \"all\", ...) # S3 method for class 'emmGrid' get_statistic(x, ci = 0.95, adjust = \"none\", merge_parameters = FALSE, ...) # S3 method for class 'gee' get_statistic(x, robust = FALSE, ...)"},{"path":"https://easystats.github.io/insight/reference/get_statistic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get statistic associated with estimates — get_statistic","text":"x model. ... Currently used. column_index model objects defined get_statistic() method yet, default method called. method tries extract statistic column coef(summary()), index column pulled column_index. Defaults 3, default statistic column models' summary-output. verbose Toggle messages warnings. component String, indicating model component parameters returned. default models \"\", returns requested information available model components. Furthermore, specific options depending model class. component may one : zero-inflated models (gmmTMB, hurdle, zeroinfl, ...) can also \"conditional\" \"zero-inflated\". Note conditional component also called count mean component, depending model. glmmTMB also \"dispersion\" component. models smooth terms, component = \"smooth_terms\" returns test statistic smooth terms. models class mhurdle, may also one \"conditional\", \"zero_inflated\", \"infrequent_purchase\" \"auxiliary\". models class clm2 clmm2, may also \"scale\". models class betareg, betaor betamfx, may also \"precision\". *mfx models (logitmfx, betamfx, ...), may also \"marginal\". models class mvord, may also \"thresholds\" \"correlation\". models class selection, may also \"selection\", \"outcome\" \"auxiliary\". models class glmx, may also \"extra\". models class averaging, may also \"full\". ci Confidence Interval (CI) level. Default 0.95 (95%). Currently applies objects class emmGrid. adjust Character value naming method used adjust p-values confidence intervals. See ?emmeans::summary.emmGrid details. merge_parameters Logical, TRUE x multiple columns parameter names (like emmGrid objects may ), merged single parameter column, parameters names values values. robust Logical, TRUE, test statistic based robust standard errors returned.","code":""},{"path":"https://easystats.github.io/insight/reference/get_statistic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get statistic associated with estimates — get_statistic","text":"data frame model's parameter names related test statistic.","code":""},{"path":"https://easystats.github.io/insight/reference/get_statistic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get statistic associated with estimates — get_statistic","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_statistic(m) #> Parameter Statistic #> 1 (Intercept) 11.3994647 #> 2 wt -4.1204121 #> 3 cyl -2.2234114 #> 4 vs 0.3221477"},{"path":"https://easystats.github.io/insight/reference/get_transformation.html","id":null,"dir":"Reference","previous_headings":"","what":"Return function of transformed response variables — get_transformation","title":"Return function of transformed response variables — get_transformation","text":"functions checks whether transformation, log- exp-transforming, applied response variable (dependent variable) regression formula, returns related function used transformation.","code":""},{"path":"https://easystats.github.io/insight/reference/get_transformation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return function of transformed response variables — get_transformation","text":"","code":"get_transformation(x)"},{"path":"https://easystats.github.io/insight/reference/get_transformation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return function of transformed response variables — get_transformation","text":"x regression model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_transformation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return function of transformed response variables — get_transformation","text":"list two functions: $transformation, function used transform response variable; $inverse, inverse-function $transformation (can used \"back-transformation\"). transformation applied, list-elements $transformation $inverse just return function(x) x. transformation unknown, NULL returned.","code":""},{"path":"https://easystats.github.io/insight/reference/get_transformation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Return function of transformed response variables — get_transformation","text":"","code":"# identity, no transformation model <- lm(Sepal.Length ~ Species, data = iris) get_transformation(model) #> $transformation #> function (x) #> x #> #> #> #> $inverse #> function (x) #> x #> #> #> # log-transformation model <- lm(log(Sepal.Length) ~ Species, data = iris) get_transformation(model) #> $transformation #> function (x, base = exp(1)) .Primitive(\"log\") #> #> $inverse #> function (x) .Primitive(\"exp\") #> # log-function get_transformation(model)$transformation(0.3) #> [1] -1.203973 log(0.3) #> [1] -1.203973 # inverse function is exp() get_transformation(model)$inverse(0.3) #> [1] 1.349859 exp(0.3) #> [1] 1.349859"},{"path":"https://easystats.github.io/insight/reference/get_varcov.html","id":null,"dir":"Reference","previous_headings":"","what":"Get variance-covariance matrix from models — get_varcov","title":"Get variance-covariance matrix from models — get_varcov","text":"Returns variance-covariance, retrieved stats::vcov(), works model objects probably provide vcov()-method.","code":""},{"path":"https://easystats.github.io/insight/reference/get_varcov.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get variance-covariance matrix from models — get_varcov","text":"","code":"get_varcov(x, ...) # Default S3 method get_varcov(x, verbose = TRUE, vcov = NULL, vcov_args = NULL, ...) # S3 method for class 'nestedLogit' get_varcov( x, component = \"all\", verbose = TRUE, vcov = NULL, vcov_args = NULL, ... ) # S3 method for class 'betareg' get_varcov( x, component = c(\"conditional\", \"precision\", \"all\"), verbose = TRUE, ... ) # S3 method for class 'clm2' get_varcov(x, component = c(\"all\", \"conditional\", \"scale\"), ...) # S3 method for class 'truncreg' get_varcov(x, component = c(\"conditional\", \"all\"), verbose = TRUE, ...) # S3 method for class 'hurdle' get_varcov( x, component = c(\"conditional\", \"zero_inflated\", \"zi\", \"all\"), vcov = NULL, vcov_args = NULL, verbose = TRUE, ... ) # S3 method for class 'glmmTMB' get_varcov( x, component = c(\"conditional\", \"zero_inflated\", \"zi\", \"dispersion\", \"all\"), verbose = TRUE, ... ) # S3 method for class 'MixMod' get_varcov( x, effects = c(\"fixed\", \"random\"), component = c(\"conditional\", \"zero_inflated\", \"zi\", \"dispersion\", \"auxiliary\", \"all\"), verbose = TRUE, ... ) # S3 method for class 'brmsfit' get_varcov(x, component = \"conditional\", verbose = TRUE, ...) # S3 method for class 'betamfx' get_varcov( x, component = c(\"conditional\", \"precision\", \"all\"), verbose = TRUE, ... ) # S3 method for class 'aov' get_varcov(x, complete = FALSE, verbose = TRUE, ...) # S3 method for class 'mixor' get_varcov(x, effects = c(\"all\", \"fixed\", \"random\"), verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/get_varcov.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get variance-covariance matrix from models — get_varcov","text":"x model. ... Currently used. verbose Toggle warnings. vcov Variance-covariance matrix used compute uncertainty estimates (e.g., robust standard errors). argument accepts covariance matrix, function returns covariance matrix, string identifies function used compute covariance matrix. covariance matrix function returns covariance matrix (e.g., stats::vcov()) string indicates kind uncertainty estimates return. Heteroskedasticity-consistent: \"vcovHC\", \"HC\", \"HC0\", \"HC1\", \"HC2\", \"HC3\", \"HC4\", \"HC4m\", \"HC5\". See ?sandwich::vcovHC Cluster-robust: \"vcovCR\", \"CR0\", \"CR1\", \"CR1p\", \"CR1S\", \"CR2\", \"CR3\". See ?clubSandwich::vcovCR() Bootstrap: \"vcovBS\", \"xy\", \"residual\", \"wild\", \"mammen\", \"webb\". See ?sandwich::vcovBS sandwich package functions: \"vcovHAC\", \"vcovPC\", \"vcovCL\", \"vcovPL\". vcov_args List arguments passed function identified vcov argument. function typically supplied sandwich clubSandwich packages. Please refer documentation (e.g., ?sandwich::vcovHAC) see list available arguments. estimation type (argument type) given, default type \"HC\" (\"vcovHC\") equals default sandwich package; type \"CR\" (\"vcoCR\"), default set \"CR3\". component complete variance-covariance matrix model returned, specific model components (like count zero-inflated model parts)? Applies models zero-inflated component, models precision (e.g. betareg) component. component may one \"conditional\", \"zi\", \"zero-inflated\", \"dispersion\", \"precision\", \"\". May abbreviated. Note conditional component also called count mean component, depending model. effects complete variance-covariance matrix model returned, specific model parameters ? Currently applies models class mixor. complete Logical, TRUE, aov, returns full variance-covariance matrix.","code":""},{"path":"https://easystats.github.io/insight/reference/get_varcov.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get variance-covariance matrix from models — get_varcov","text":"variance-covariance matrix, matrix-object.","code":""},{"path":"https://easystats.github.io/insight/reference/get_varcov.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Get variance-covariance matrix from models — get_varcov","text":"get_varcov() tries return nearest positive definite matrix case negative eigenvalues variance-covariance matrix. ensures still possible, instance, calculate standard errors model parameters. message shown matrix negative definite corrected matrix returned.","code":""},{"path":"https://easystats.github.io/insight/reference/get_varcov.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get variance-covariance matrix from models — get_varcov","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_varcov(m) #> (Intercept) wt cyl vs #> (Intercept) 11.552774 0.1680680 -1.5843752 -4.7487893 #> wt 0.168068 0.6207461 -0.3301421 -0.2797924 #> cyl -1.584375 -0.3301421 0.3764045 0.7257641 #> vs -4.748789 -0.2797924 0.7257641 2.6475113 # vcov of zero-inflation component from hurdle-model data(\"bioChemists\", package = \"pscl\") mod <- hurdle(art ~ phd + fem | ment, data = bioChemists, dist = \"negbin\") get_varcov(mod, component = \"zero_inflated\") #> (Intercept) ment #> (Intercept) 0.0115917010 -0.0009744732 #> ment -0.0009744732 0.0001561139 # robust vcov of, count component from hurdle-model data(\"bioChemists\", package = \"pscl\") mod <- hurdle(art ~ phd + fem | ment, data = bioChemists, dist = \"negbin\") get_varcov( mod, component = \"conditional\", vcov = \"BS\", vcov_args = list(R = 50) ) #> count_(Intercept) count_phd count_femWomen #> count_(Intercept) 0.041339413 -0.009967283 -0.007235679 #> count_phd -0.009967283 0.003028860 0.001278198 #> count_femWomen -0.007235679 0.001278198 0.011140592"},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":null,"dir":"Reference","previous_headings":"","what":"Get variance components from random effects models — get_variance","title":"Get variance components from random effects models — get_variance","text":"function extracts different variance components mixed model returns result list. Functions like get_variance_residual(x) get_variance_fixed(x) shortcuts get_variance(x, component = \"residual\") etc.","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get variance components from random effects models — get_variance","text":"","code":"get_variance( x, component = c(\"all\", \"fixed\", \"random\", \"residual\", \"distribution\", \"dispersion\", \"intercept\", \"slope\", \"rho01\", \"rho00\"), verbose = TRUE, ... ) get_variance_residual(x, verbose = TRUE, ...) get_variance_fixed(x, verbose = TRUE, ...) get_variance_random(x, verbose = TRUE, tolerance = 1e-05, ...) get_variance_distribution(x, verbose = TRUE, ...) get_variance_dispersion(x, verbose = TRUE, ...) get_variance_intercept(x, verbose = TRUE, ...) get_variance_slope(x, verbose = TRUE, ...) get_correlation_slope_intercept(x, verbose = TRUE, ...) get_correlation_slopes(x, verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get variance components from random effects models — get_variance","text":"x mixed effects model. component Character value, indicating variance component returned. default, variance components returned. distribution-specific (\"distribution\") residual (\"residual\") variance computational intensive components, hence may take seconds calculate. verbose Toggle warnings. ... Currently used. tolerance Tolerance singularity check random effects, decide whether compute random effect variances . Indicates value convergence result accepted. larger tolerance , stricter test . See performance::check_singularity().","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get variance components from random effects models — get_variance","text":"list following elements: var.fixed, variance attributable fixed effects var.random, (mean) variance random effects var.residual, residual variance (sum dispersion distribution) var.distribution, distribution-specific variance var.dispersion, variance due additive dispersion var.intercept, random-intercept-variance, -subject-variance (τ00) var.slope, random-slope-variance (τ11) cor.slope_intercept, random-slope-intercept-correlation (ρ01) cor.slopes, correlation random slopes (ρ00)","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get variance components from random effects models — get_variance","text":"function returns different variance components mixed models, needed, instance, calculate r-squared measures intraclass-correlation coefficient (ICC).","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Get variance components from random effects models — get_variance","text":"function supports models class merMod (including models blme), clmm, cpglmm, glmmadmb, glmmTMB, MixMod, lme, mixed, rlmerMod, stanreg, brmsfit wbm. Support objects class MixMod (GLMMadaptive), lme (nlme) brmsfit (brms) experimental may work models.","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"fixed-effects-variance","dir":"Reference","previous_headings":"","what":"Fixed effects variance","title":"Get variance components from random effects models — get_variance","text":"fixed effects variance, σ2f, variance matrix-multiplication β∗X (parameter vector model matrix).","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"random-effects-variance","dir":"Reference","previous_headings":"","what":"Random effects variance","title":"Get variance components from random effects models — get_variance","text":"random effect variance, σ2i, represents mean random effect variance model. Since variance reflects \"average\" random effects variance mixed models, also appropriate models complex random effects structures, like random slopes nested random effects. Details can found Johnson 2014, particular equation 10. simple random-intercept models, random effects variance equals random-intercept variance.","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"distribution-specific-variance","dir":"Reference","previous_headings":"","what":"Distribution-specific variance","title":"Get variance components from random effects models — get_variance","text":"distribution-specific variance, σ2d, depends model family. Gaussian models, σ2 (.e. sigma(model)^2). models binary outcome, \\(\\pi^2 / 3\\) logit-link, 1 probit-link, \\(\\pi^2 / 6\\) cloglog-links. Models Gamma-families use \\(\\mu^2\\) (obtained family$variance()). models, distribution-specific variance based lognormal approximation, \\(log(1 + var(x) / \\mu^2)\\) (see Nakagawa et al. 2017). expected variance zero-inflated model computed according Zuur et al. 2012, p277.","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"variance-for-the-additive-overdispersion-term","dir":"Reference","previous_headings":"","what":"Variance for the additive overdispersion term","title":"Get variance components from random effects models — get_variance","text":"variance additive overdispersion term, σ2e, represents \"excess variation relative expected certain distribution\" (Nakagawa et al. 2017). (? many?) cases, 0.","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"residual-variance","dir":"Reference","previous_headings":"","what":"Residual variance","title":"Get variance components from random effects models — get_variance","text":"residual variance, σ2ε, simply σ2d + σ2e.","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"random-intercept-variance","dir":"Reference","previous_headings":"","what":"Random intercept variance","title":"Get variance components from random effects models — get_variance","text":"random intercept variance, -subject variance (τ00), obtained VarCorr(). indicates much groups subjects differ , residual variance σ2ε indicates within-subject variance.","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"random-slope-variance","dir":"Reference","previous_headings":"","what":"Random slope variance","title":"Get variance components from random effects models — get_variance","text":"random slope variance (τ11) obtained VarCorr(). measure available mixed models random slopes.","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"random-slope-intercept-correlation","dir":"Reference","previous_headings":"","what":"Random slope-intercept correlation","title":"Get variance components from random effects models — get_variance","text":"random slope-intercept correlation (ρ01) obtained VarCorr(). measure available mixed models random intercepts slopes.","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get variance components from random effects models — get_variance","text":"Johnson, P. C. D. (2014). Extension Nakagawa & Schielzeth’s R2 GLMM random slopes models. Methods Ecology Evolution, 5(9), 944–946. doi:10.1111/2041-210X.12225 Nakagawa, S., Johnson, P. C. D., & Schielzeth, H. (2017). coefficient determination R2 intra-class correlation coefficient generalized linear mixed-effects models revisited expanded. Journal Royal Society Interface, 14(134), 20170213. doi:10.1098/rsif.2017.0213 Zuur, . F., Savel'ev, . ., & Ieno, E. N. (2012). Zero inflated models generalized linear mixed models R. Newburgh, United Kingdom: Highland Statistics.","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get variance components from random effects models — get_variance","text":"","code":"# \\donttest{ library(lme4) data(sleepstudy) m <- lmer(Reaction ~ Days + (1 + Days | Subject), data = sleepstudy) get_variance(m) #> $var.fixed #> [1] 908.9534 #> #> $var.random #> [1] 1698.084 #> #> $var.residual #> [1] 654.94 #> #> $var.distribution #> [1] 654.94 #> #> $var.dispersion #> [1] 0 #> #> $var.intercept #> Subject #> 612.1002 #> #> $var.slope #> Subject.Days #> 35.07171 #> #> $cor.slope_intercept #> Subject #> 0.06555124 #> get_variance_fixed(m) #> var.fixed #> 908.9534 get_variance_residual(m) #> var.residual #> 654.94 # }"},{"path":"https://easystats.github.io/insight/reference/get_weights.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the values from model weights — get_weights","title":"Get the values from model weights — get_weights","text":"Returns weighting variable model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_weights.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the values from model weights — get_weights","text":"","code":"get_weights(x, ...) # Default S3 method get_weights(x, na_rm = FALSE, null_as_ones = FALSE, ...)"},{"path":"https://easystats.github.io/insight/reference/get_weights.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the values from model weights — get_weights","text":"x fitted model. ... Currently used. na_rm Logical, TRUE, removes possible missing values. null_as_ones Logical, TRUE, return vector 1 weights specified model (weights set 1).","code":""},{"path":"https://easystats.github.io/insight/reference/get_weights.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the values from model weights — get_weights","text":"weighting variable, NULL weights specified. weighting variable also returned (instead NULL) weights set 1 (.e. weighting), set null_as_ones = TRUE.","code":""},{"path":"https://easystats.github.io/insight/reference/get_weights.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the values from model weights — get_weights","text":"","code":"data(mtcars) set.seed(123) mtcars$weight <- rnorm(nrow(mtcars), 1, .3) # LMs m <- lm(mpg ~ wt + cyl + vs, data = mtcars, weights = weight) get_weights(m) #> [1] 0.8318573 0.9309468 1.4676125 1.0211525 1.0387863 1.5145195 1.1382749 #> [8] 0.6204816 0.7939441 0.8663014 1.3672245 1.1079441 1.1202314 1.0332048 #> [15] 0.8332477 1.5360739 1.1493551 0.4100149 1.2104068 0.8581626 0.6796529 #> [22] 0.9346075 0.6921987 0.7813326 0.8124882 0.4939920 1.2513361 1.0460119 #> [29] 0.6585589 1.3761445 1.1279393 0.9114786 get_weights(lm(mpg ~ wt, data = mtcars), null_as_ones = TRUE) #> [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 # GLMs m <- glm(vs ~ disp + mpg, data = mtcars, weights = weight, family = quasibinomial) get_weights(m) #> Mazda RX4 Mazda RX4 Wag Datsun 710 Hornet 4 Drive #> 0.8318573 0.9309468 1.4676125 1.0211525 #> Hornet Sportabout Valiant Duster 360 Merc 240D #> 1.0387863 1.5145195 1.1382749 0.6204816 #> Merc 230 Merc 280 Merc 280C Merc 450SE #> 0.7939441 0.8663014 1.3672245 1.1079441 #> Merc 450SL Merc 450SLC Cadillac Fleetwood Lincoln Continental #> 1.1202314 1.0332048 0.8332477 1.5360739 #> Chrysler Imperial Fiat 128 Honda Civic Toyota Corolla #> 1.1493551 0.4100149 1.2104068 0.8581626 #> Toyota Corona Dodge Challenger AMC Javelin Camaro Z28 #> 0.6796529 0.9346075 0.6921987 0.7813326 #> Pontiac Firebird Fiat X1-9 Porsche 914-2 Lotus Europa #> 0.8124882 0.4939920 1.2513361 1.0460119 #> Ford Pantera L Ferrari Dino Maserati Bora Volvo 142E #> 0.6585589 1.3761445 1.1279393 0.9114786 m <- glm(cbind(cyl, gear) ~ mpg, data = mtcars, weights = weight, family = binomial) get_weights(m) #> Mazda RX4 Mazda RX4 Wag Datsun 710 Hornet 4 Drive #> 8.318573 9.309468 11.740900 9.190373 #> Hornet Sportabout Valiant Duster 360 Merc 240D #> 11.426650 13.630675 12.521023 4.963853 #> Merc 230 Merc 280 Merc 280C Merc 450SE #> 6.351553 8.663014 13.672245 12.187386 #> Merc 450SL Merc 450SLC Cadillac Fleetwood Lincoln Continental #> 12.322546 11.365253 9.165724 16.896813 #> Chrysler Imperial Fiat 128 Honda Civic Toyota Corolla #> 12.642907 3.280119 9.683254 6.865301 #> Toyota Corona Dodge Challenger AMC Javelin Camaro Z28 #> 4.757570 10.280683 7.614185 8.594659 #> Pontiac Firebird Fiat X1-9 Porsche 914-2 Lotus Europa #> 8.937370 3.951936 11.262025 9.414107 #> Ford Pantera L Ferrari Dino Maserati Bora Volvo 142E #> 8.561266 15.137589 14.663210 7.291828"},{"path":"https://easystats.github.io/insight/reference/has_intercept.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks if model has an intercept — has_intercept","title":"Checks if model has an intercept — has_intercept","text":"Checks model intercept.","code":""},{"path":"https://easystats.github.io/insight/reference/has_intercept.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks if model has an intercept — has_intercept","text":"","code":"has_intercept(x, verbose = TRUE)"},{"path":"https://easystats.github.io/insight/reference/has_intercept.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks if model has an intercept — has_intercept","text":"x model object. verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/has_intercept.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks if model has an intercept — has_intercept","text":"TRUE x intercept, FALSE otherwise.","code":""},{"path":"https://easystats.github.io/insight/reference/has_intercept.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks if model has an intercept — has_intercept","text":"","code":"model <- lm(mpg ~ 0 + gear, data = mtcars) has_intercept(model) #> [1] FALSE model <- lm(mpg ~ gear, data = mtcars) has_intercept(model) #> [1] TRUE model <- lmer(Reaction ~ 0 + Days + (Days | Subject), data = sleepstudy) has_intercept(model) #> [1] FALSE model <- lmer(Reaction ~ Days + (Days | Subject), data = sleepstudy) has_intercept(model) #> [1] TRUE"},{"path":"https://easystats.github.io/insight/reference/insight-package.html","id":null,"dir":"Reference","previous_headings":"","what":"insight: A Unified Interface to Access Information from Model Objects in R. — insight-package","title":"insight: A Unified Interface to Access Information from Model Objects in R. — insight-package","text":"fitting statistical model, many useful pieces information simultaneously calculated stored beyond coefficient estimates general model fit statistics. Although exist generic functions obtain model information data, many package-specific modelling functions provide methods allow users access valuable information. insight R-package fills important gap providing suite functions support almost model (see list many models supported List Supported Packages Models section). goal insight, , provide tools provide easy, intuitive, consistent access information contained model objects. tools aid applied research virtually field fit, diagnose, present statistical models streamlining access every aspect many model objects via consistent syntax output. References: Lüdecke et al. (2019) doi:10.21105/joss.01412 .","code":""},{"path":[]},{"path":"https://easystats.github.io/insight/reference/insight-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"insight: A Unified Interface to Access Information from Model Objects in R. — insight-package","text":"Maintainer: Daniel Lüdecke d.luedecke@uke.de (ORCID) (@strengejacke) Authors: Dominique Makowski dom.makowski@gmail.com (ORCID) (@Dom_Makowski) [contributor] Indrajeet Patil patilindrajeet.science@gmail.com (ORCID) (@patilindrajeets) [contributor] Philip Waggoner philip.waggoner@gmail.com (ORCID) [contributor] Mattan S. Ben-Shachar matanshm@post.bgu.ac.il (ORCID) [contributor] Brenton M. Wiernik brenton@wiernik.org (ORCID) (@bmwiernik) [contributor] Vincent Arel-Bundock vincent.arel-bundock@umontreal.ca (ORCID) [contributor] Etienne Bacher etienne.bacher@protonmail.com (ORCID) [contributor] contributors: Alex Hayes alexpghayes@gmail.com (ORCID) [reviewer] Grant McDermott grantmcd@uoregon.edu (ORCID) [contributor] Rémi Thériault remi.theriault@mail.mcgill.ca (ORCID) (@rempsyc) [contributor] Alex Reinhart areinhar@stat.cmu.edu (ORCID) [contributor]","code":""},{"path":"https://easystats.github.io/insight/reference/is_converged.html","id":null,"dir":"Reference","previous_headings":"","what":"Convergence test for mixed effects models — is_converged","title":"Convergence test for mixed effects models — is_converged","text":"is_converged() provides alternative convergence test merMod-objects.","code":""},{"path":"https://easystats.github.io/insight/reference/is_converged.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convergence test for mixed effects models — is_converged","text":"","code":"is_converged(x, tolerance = 0.001, ...)"},{"path":"https://easystats.github.io/insight/reference/is_converged.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convergence test for mixed effects models — is_converged","text":"x merMod glmmTMB-object. tolerance Indicates value convergence result accepted. smaller tolerance , stricter test . ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/is_converged.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convergence test for mixed effects models — is_converged","text":"TRUE convergence fine FALSE convergence suspicious. Additionally, convergence value returned attribute.","code":""},{"path":"https://easystats.github.io/insight/reference/is_converged.html","id":"convergence-and-log-likelihood","dir":"Reference","previous_headings":"","what":"Convergence and log-likelihood","title":"Convergence test for mixed effects models — is_converged","text":"Convergence problems typically arise model converged solution log-likelihood true maximum. may result unreliable overly complex (non-estimable) estimates standard errors.","code":""},{"path":"https://easystats.github.io/insight/reference/is_converged.html","id":"inspect-model-convergence","dir":"Reference","previous_headings":"","what":"Inspect model convergence","title":"Convergence test for mixed effects models — is_converged","text":"lme4 performs convergence-check (see ?lme4::convergence), however, discussed suggested one lme4-authors comment, check can strict. is_converged() thus provides alternative convergence test merMod-objects.","code":""},{"path":"https://easystats.github.io/insight/reference/is_converged.html","id":"resolving-convergence-issues","dir":"Reference","previous_headings":"","what":"Resolving convergence issues","title":"Convergence test for mixed effects models — is_converged","text":"Convergence issues easy diagnose. help page ?lme4::convergence provides current advice resolve convergence issues. Another clue might large parameter values, e.g. estimates (scale linear predictor) larger 10 (non-identity link) generalized linear model might indicate complete separation, can addressed regularization, e.g. penalized regression Bayesian regression appropriate priors fixed effects.","code":""},{"path":"https://easystats.github.io/insight/reference/is_converged.html","id":"convergence-versus-singularity","dir":"Reference","previous_headings":"","what":"Convergence versus Singularity","title":"Convergence test for mixed effects models — is_converged","text":"Note different meaning singularity convergence: singularity indicates issue \"true\" best estimate, .e. whether maximum likelihood estimation variance-covariance matrix random effects positive definite semi-definite. Convergence question whether can assume numerical optimization worked correctly .","code":""},{"path":"https://easystats.github.io/insight/reference/is_converged.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convergence test for mixed effects models — is_converged","text":"","code":"data(cbpp) set.seed(1) cbpp$x <- rnorm(nrow(cbpp)) cbpp$x2 <- runif(nrow(cbpp)) model <- glmer( cbind(incidence, size - incidence) ~ period + x + x2 + (1 + x | herd), data = cbpp, family = binomial() ) is_converged(model) #> [1] TRUE #> attr(,\"gradient\") #> [1] 0.0002803063 # \\donttest{ model <- glmmTMB( Sepal.Length ~ poly(Petal.Width, 4) * poly(Petal.Length, 4) + (1 + poly(Petal.Width, 4) | Species), data = iris ) #> Warning: Model convergence problem; non-positive-definite Hessian matrix. See vignette('troubleshooting') #> Warning: Model convergence problem; false convergence (8). See vignette('troubleshooting'), help('diagnose') is_converged(model) #> [1] FALSE # }"},{"path":"https://easystats.github.io/insight/reference/is_empty_object.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if object is empty — is_empty_object","title":"Check if object is empty — is_empty_object","text":"Check object empty","code":""},{"path":"https://easystats.github.io/insight/reference/is_empty_object.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if object is empty — is_empty_object","text":"","code":"is_empty_object(x)"},{"path":"https://easystats.github.io/insight/reference/is_empty_object.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if object is empty — is_empty_object","text":"x list, vector, dataframe.","code":""},{"path":"https://easystats.github.io/insight/reference/is_empty_object.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if object is empty — is_empty_object","text":"logical indicating whether entered object empty.","code":""},{"path":"https://easystats.github.io/insight/reference/is_empty_object.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check if object is empty — is_empty_object","text":"","code":"is_empty_object(c(1, 2, 3, NA)) #> [1] FALSE is_empty_object(list(NULL, c(NA, NA))) #> [1] FALSE is_empty_object(list(NULL, NA)) #> [1] FALSE"},{"path":"https://easystats.github.io/insight/reference/is_gam_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks if a model is a generalized additive model — is_gam_model","title":"Checks if a model is a generalized additive model — is_gam_model","text":"Small helper checks model generalized additive model.","code":""},{"path":"https://easystats.github.io/insight/reference/is_gam_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks if a model is a generalized additive model — is_gam_model","text":"","code":"is_gam_model(x)"},{"path":"https://easystats.github.io/insight/reference/is_gam_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks if a model is a generalized additive model — is_gam_model","text":"x model object.","code":""},{"path":"https://easystats.github.io/insight/reference/is_gam_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks if a model is a generalized additive model — is_gam_model","text":"logical, TRUE x generalized additive model smooth-terms","code":""},{"path":"https://easystats.github.io/insight/reference/is_gam_model.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Checks if a model is a generalized additive model — is_gam_model","text":"function returns TRUE model inherits typical GAM model class smooth terms present model formula. model smooth terms typical gam class, FALSE returned.","code":""},{"path":"https://easystats.github.io/insight/reference/is_gam_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks if a model is a generalized additive model — is_gam_model","text":"","code":"data(iris) model1 <- lm(Petal.Length ~ Petal.Width + Sepal.Length, data = iris) model2 <- mgcv::gam(Petal.Length ~ Petal.Width + s(Sepal.Length), data = iris) is_gam_model(model1) #> [1] FALSE is_gam_model(model2) #> [1] TRUE"},{"path":"https://easystats.github.io/insight/reference/is_mixed_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks if a model is a mixed effects model — is_mixed_model","title":"Checks if a model is a mixed effects model — is_mixed_model","text":"Small helper checks model mixed effects model, .e. model random effects.","code":""},{"path":"https://easystats.github.io/insight/reference/is_mixed_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks if a model is a mixed effects model — is_mixed_model","text":"","code":"is_mixed_model(x)"},{"path":"https://easystats.github.io/insight/reference/is_mixed_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks if a model is a mixed effects model — is_mixed_model","text":"x model object.","code":""},{"path":"https://easystats.github.io/insight/reference/is_mixed_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks if a model is a mixed effects model — is_mixed_model","text":"logical, TRUE x mixed model.","code":""},{"path":"https://easystats.github.io/insight/reference/is_mixed_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks if a model is a mixed effects model — is_mixed_model","text":"","code":"data(mtcars) model <- lm(mpg ~ wt + cyl + vs, data = mtcars) is_mixed_model(model) #> [1] FALSE data(sleepstudy, package = \"lme4\") model <- lme4::lmer(Reaction ~ Days + (1 | Subject), data = sleepstudy) is_mixed_model(model) #> [1] TRUE"},{"path":"https://easystats.github.io/insight/reference/is_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks if an object is a regression model or statistical test object — is_model","title":"Checks if an object is a regression model or statistical test object — is_model","text":"Small helper checks model regression model statistical object. is_regression_model() stricter returns TRUE regression models, , e.g., htest objects.","code":""},{"path":"https://easystats.github.io/insight/reference/is_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks if an object is a regression model or statistical test object — is_model","text":"","code":"is_model(x) is_regression_model(x)"},{"path":"https://easystats.github.io/insight/reference/is_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks if an object is a regression model or statistical test object — is_model","text":"x object.","code":""},{"path":"https://easystats.github.io/insight/reference/is_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks if an object is a regression model or statistical test object — is_model","text":"logical, TRUE x (supported) model object.","code":""},{"path":"https://easystats.github.io/insight/reference/is_model.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Checks if an object is a regression model or statistical test object — is_model","text":"function returns TRUE x model object.","code":""},{"path":"https://easystats.github.io/insight/reference/is_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks if an object is a regression model or statistical test object — is_model","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) is_model(m) #> [1] TRUE is_model(mtcars) #> [1] FALSE test <- t.test(1:10, y = c(7:20)) is_model(test) #> [1] TRUE is_regression_model(test) #> [1] FALSE"},{"path":"https://easystats.github.io/insight/reference/is_model_supported.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks if a regression model object is supported by the insight package — is_model_supported","title":"Checks if a regression model object is supported by the insight package — is_model_supported","text":"Small helper checks model supported (regression) model object. supported_models() prints list currently supported model classes.","code":""},{"path":"https://easystats.github.io/insight/reference/is_model_supported.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks if a regression model object is supported by the insight package — is_model_supported","text":"","code":"is_model_supported(x) supported_models()"},{"path":"https://easystats.github.io/insight/reference/is_model_supported.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks if a regression model object is supported by the insight package — is_model_supported","text":"x object.","code":""},{"path":"https://easystats.github.io/insight/reference/is_model_supported.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks if a regression model object is supported by the insight package — is_model_supported","text":"logical, TRUE x (supported) model object.","code":""},{"path":"https://easystats.github.io/insight/reference/is_model_supported.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Checks if a regression model object is supported by the insight package — is_model_supported","text":"function returns TRUE x model object works package's functions. list supported models can also found : https://github.com/easystats/insight.","code":""},{"path":"https://easystats.github.io/insight/reference/is_model_supported.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks if a regression model object is supported by the insight package — is_model_supported","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) is_model_supported(m) #> [1] TRUE is_model_supported(mtcars) #> [1] FALSE # to see all supported models supported_models() #> [1] \"AKP\" \"Anova.mlm\" #> [3] \"Arima\" \"BBmm\" #> [5] \"BBreg\" \"BFBayesFactor\" #> [7] \"BGGM\" \"DirichletRegModel\" #> [9] \"Gam\" \"Glm\" #> [11] \"HLfit\" \"LORgee\" #> [13] \"MANOVA\" \"MCMCglmm\" #> [15] \"MixMod\" \"PMCMR\" #> [17] \"RM\" \"Rchoice\" #> [19] \"Sarlm\" \"SemiParBIV\" #> [21] \"aareg\" \"afex_aov\" #> [23] \"anova.rms\" \"aov\" #> [25] \"aovlist\" \"averaging\" #> [27] \"bamlss\" \"bamlss.frame\" #> [29] \"bayesQR\" \"bayesx\" #> [31] \"bcplm\" \"betamfx\" #> [33] \"betaor\" \"betareg\" #> [35] \"bfsl\" \"bife\" #> [37] \"bifeAPEs\" \"bigglm\" #> [39] \"biglm\" \"blavaan\" #> [41] \"blrm\" \"bracl\" #> [43] \"brglm\" \"brmsfit\" #> [45] \"brmultinom\" \"btergm\" #> [47] \"censReg\" \"cgam\" #> [49] \"cgamm\" \"cglm\" #> [51] \"clm\" \"clm2\" #> [53] \"clmm\" \"clmm2\" #> [55] \"clogit\" \"coeftest\" #> [57] \"complmrob\" \"confusionMatrix\" #> [59] \"coxme\" \"coxph\" #> [61] \"coxph.penal\" \"coxr\" #> [63] \"cpglm\" \"cpglmm\" #> [65] \"crch\" \"crq\" #> [67] \"crqs\" \"crr\" #> [69] \"dep.effect\" \"draws\" #> [71] \"drc\" \"eglm\" #> [73] \"elm\" \"epi.2by2\" #> [75] \"ergm\" \"feglm\" #> [77] \"feis\" \"felm\" #> [79] \"fitdistr\" \"fixest\" #> [81] \"flac\" \"flexsurvreg\" #> [83] \"flic\" \"gam\" #> [85] \"gamlss\" \"gamm\" #> [87] \"gamm4\" \"garch\" #> [89] \"gbm\" \"gee\" #> [91] \"geeglm\" \"glht\" #> [93] \"glimML\" \"glm\" #> [95] \"glmRob\" \"glmm\" #> [97] \"glmmPQL\" \"glmmTMB\" #> [99] \"glmmadmb\" \"glmrob\" #> [101] \"glmx\" \"gls\" #> [103] \"gmnl\" \"hglm\" #> [105] \"htest\" \"hurdle\" #> [107] \"ivFixed\" \"iv_robust\" #> [109] \"ivprobit\" \"ivreg\" #> [111] \"lavaan\" \"lm\" #> [113] \"lmRob\" \"lm_robust\" #> [115] \"lme\" \"lmerMod\" #> [117] \"lmerModLmerTest\" \"lmodel2\" #> [119] \"lmrob\" \"logistf\" #> [121] \"logitmfx\" \"logitor\" #> [123] \"logitr\" \"lqm\" #> [125] \"lqmm\" \"lrm\" #> [127] \"manova\" \"marginaleffects\" #> [129] \"marginaleffects.summary\" \"margins\" #> [131] \"maxLik\" \"mblogit\" #> [133] \"mclogit\" \"mcmc\" #> [135] \"mcmc.list\" \"mcp1\" #> [137] \"mcp12\" \"mcp2\" #> [139] \"med1way\" \"mediate\" #> [141] \"merMod\" \"merModList\" #> [143] \"meta_bma\" \"meta_fixed\" #> [145] \"meta_random\" \"metaplus\" #> [147] \"mhurdle\" \"mipo\" #> [149] \"mira\" \"mixed\" #> [151] \"mixor\" \"mjoint\" #> [153] \"mle\" \"mle2\" #> [155] \"mlm\" \"mlogit\" #> [157] \"mmclogit\" \"mmlogit\" #> [159] \"mmrm\" \"mmrm_fit\" #> [161] \"mmrm_tmb\" \"model_fit\" #> [163] \"multinom\" \"mvord\" #> [165] \"negbinirr\" \"negbinmfx\" #> [167] \"nestedLogit\" \"ols\" #> [169] \"onesampb\" \"orm\" #> [171] \"pgmm\" \"phyloglm\" #> [173] \"phylolm\" \"plm\" #> [175] \"poissonirr\" \"poissonmfx\" #> [177] \"polr\" \"probitmfx\" #> [179] \"psm\" \"ridgelm\" #> [181] \"riskRegression\" \"rjags\" #> [183] \"rlm\" \"rlmerMod\" #> [185] \"rma\" \"rma.uni\" #> [187] \"robmixglm\" \"robtab\" #> [189] \"rq\" \"rqs\" #> [191] \"rqss\" \"rvar\" #> [193] \"scam\" \"selection\" #> [195] \"sem\" \"semLm\" #> [197] \"semLme\" \"serp\" #> [199] \"slm\" \"speedglm\" #> [201] \"speedlm\" \"stanfit\" #> [203] \"stanmvreg\" \"stanreg\" #> [205] \"summary.lm\" \"survfit\" #> [207] \"survreg\" \"svy_vglm\" #> [209] \"svychisq\" \"svyglm\" #> [211] \"svyolr\" \"t1way\" #> [213] \"tobit\" \"trimcibt\" #> [215] \"truncreg\" \"vgam\" #> [217] \"vglm\" \"wbgee\" #> [219] \"wblm\" \"wbm\" #> [221] \"wmcpAKP\" \"yuen\" #> [223] \"yuend\" \"zcpglm\" #> [225] \"zeroinfl\" \"zerotrunc\""},{"path":"https://easystats.github.io/insight/reference/is_multivariate.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks if an object stems from a multivariate response model — is_multivariate","title":"Checks if an object stems from a multivariate response model — is_multivariate","text":"Small helper checks model multivariate response model, .e. model multiple outcomes.","code":""},{"path":"https://easystats.github.io/insight/reference/is_multivariate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks if an object stems from a multivariate response model — is_multivariate","text":"","code":"is_multivariate(x)"},{"path":"https://easystats.github.io/insight/reference/is_multivariate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks if an object stems from a multivariate response model — is_multivariate","text":"x model object, object returned function package.","code":""},{"path":"https://easystats.github.io/insight/reference/is_multivariate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks if an object stems from a multivariate response model — is_multivariate","text":"logical, TRUE either x model object multivariate response model, TRUE return value function insight multivariate response model.","code":""},{"path":"https://easystats.github.io/insight/reference/is_multivariate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks if an object stems from a multivariate response model — is_multivariate","text":"","code":"# \\donttest{ library(rstanarm) data(\"pbcLong\") model <- suppressWarnings(stan_mvmer( formula = list( logBili ~ year + (1 | id), albumin ~ sex + year + (year | id) ), data = pbcLong, chains = 1, cores = 1, seed = 12345, iter = 1000, show_messages = FALSE, refresh = 0 )) #> Fitting a multivariate glmer model. #> #> Please note the warmup may be much slower than later iterations! f <- find_formula(model) is_multivariate(model) #> [1] TRUE is_multivariate(f) #> [1] TRUE # }"},{"path":"https://easystats.github.io/insight/reference/is_nested_models.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks whether a list of models are nested models — is_nested_models","title":"Checks whether a list of models are nested models — is_nested_models","text":"Checks whether list models nested models, strictly following order passed function.","code":""},{"path":"https://easystats.github.io/insight/reference/is_nested_models.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks whether a list of models are nested models — is_nested_models","text":"","code":"is_nested_models(...)"},{"path":"https://easystats.github.io/insight/reference/is_nested_models.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks whether a list of models are nested models — is_nested_models","text":"... Multiple regression model objects.","code":""},{"path":"https://easystats.github.io/insight/reference/is_nested_models.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks whether a list of models are nested models — is_nested_models","text":"TRUE models nested, FALSE otherwise. models nested, also returns two attributes indicate whether nesting models decreasing increasing order.","code":""},{"path":"https://easystats.github.io/insight/reference/is_nested_models.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Checks whether a list of models are nested models — is_nested_models","text":"term \"nested\" means fixed predictors model contained within fixed predictors larger model (sometimes referred encompassing model). Currently, is_nested_models() ignores random effects parameters.","code":""},{"path":"https://easystats.github.io/insight/reference/is_nested_models.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks whether a list of models are nested models — is_nested_models","text":"","code":"m1 <- lm(Sepal.Length ~ Petal.Width + Species, data = iris) m2 <- lm(Sepal.Length ~ Species, data = iris) m3 <- lm(Sepal.Length ~ Petal.Width, data = iris) m4 <- lm(Sepal.Length ~ 1, data = iris) is_nested_models(m1, m2, m4) #> [1] TRUE #> attr(,\"is_nested_increasing\") #> [1] FALSE #> attr(,\"is_nested_decreasing\") #> [1] TRUE is_nested_models(m4, m2, m1) #> [1] TRUE #> attr(,\"is_nested_increasing\") #> [1] TRUE #> attr(,\"is_nested_decreasing\") #> [1] FALSE is_nested_models(m1, m2, m3) #> [1] FALSE"},{"path":"https://easystats.github.io/insight/reference/is_nullmodel.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks if model is a null-model (intercept-only) — is_nullmodel","title":"Checks if model is a null-model (intercept-only) — is_nullmodel","text":"Checks model null-model (intercept-), .e. conditional part model predictors.","code":""},{"path":"https://easystats.github.io/insight/reference/is_nullmodel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks if model is a null-model (intercept-only) — is_nullmodel","text":"","code":"is_nullmodel(x)"},{"path":"https://easystats.github.io/insight/reference/is_nullmodel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks if model is a null-model (intercept-only) — is_nullmodel","text":"x model object.","code":""},{"path":"https://easystats.github.io/insight/reference/is_nullmodel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks if model is a null-model (intercept-only) — is_nullmodel","text":"TRUE x null-model, FALSE otherwise.","code":""},{"path":"https://easystats.github.io/insight/reference/is_nullmodel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks if model is a null-model (intercept-only) — is_nullmodel","text":"","code":"model <- lm(mpg ~ 1, data = mtcars) is_nullmodel(model) #> [1] TRUE model <- lm(mpg ~ gear, data = mtcars) is_nullmodel(model) #> [1] FALSE data(sleepstudy, package = \"lme4\") model <- lme4::lmer(Reaction ~ 1 + (Days | Subject), data = sleepstudy) is_nullmodel(model) #> [1] TRUE model <- lme4::lmer(Reaction ~ Days + (Days | Subject), data = sleepstudy) is_nullmodel(model) #> [1] FALSE"},{"path":"https://easystats.github.io/insight/reference/link_function.html","id":null,"dir":"Reference","previous_headings":"","what":"Get link-function from model object — link_function","title":"Get link-function from model object — link_function","text":"Returns link-function model object.","code":""},{"path":"https://easystats.github.io/insight/reference/link_function.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get link-function from model object — link_function","text":"","code":"link_function(x, ...) # S3 method for class 'betamfx' link_function(x, what = c(\"mean\", \"precision\"), ...) # S3 method for class 'gamlss' link_function(x, what = c(\"mu\", \"sigma\", \"nu\", \"tau\"), ...) # S3 method for class 'betareg' link_function(x, what = c(\"mean\", \"precision\"), ...) # S3 method for class 'DirichletRegModel' link_function(x, what = c(\"mean\", \"precision\"), ...)"},{"path":"https://easystats.github.io/insight/reference/link_function.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get link-function from model object — link_function","text":"x fitted model. ... Currently used. gamlss models, indicates distribution parameter link (inverse) function returned; betareg DirichletRegModel, can \"mean\" \"precision\".","code":""},{"path":"https://easystats.github.io/insight/reference/link_function.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get link-function from model object — link_function","text":"function, describing link-function model-object. multivariate-response models, list functions returned.","code":""},{"path":"https://easystats.github.io/insight/reference/link_function.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get link-function from model object — link_function","text":"","code":"# example from ?stats::glm counts <- c(18, 17, 15, 20, 10, 20, 25, 13, 12) outcome <- gl(3, 1, 9) treatment <- gl(3, 3) m <- glm(counts ~ outcome + treatment, family = poisson()) link_function(m)(0.3) #> [1] -1.203973 # same as log(0.3) #> [1] -1.203973"},{"path":"https://easystats.github.io/insight/reference/link_inverse.html","id":null,"dir":"Reference","previous_headings":"","what":"Get link-inverse function from model object — link_inverse","title":"Get link-inverse function from model object — link_inverse","text":"Returns link-inverse function model object.","code":""},{"path":"https://easystats.github.io/insight/reference/link_inverse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get link-inverse function from model object — link_inverse","text":"","code":"link_inverse(x, ...) # S3 method for class 'betareg' link_inverse(x, what = c(\"mean\", \"precision\"), ...) # S3 method for class 'DirichletRegModel' link_inverse(x, what = c(\"mean\", \"precision\"), ...) # S3 method for class 'betamfx' link_inverse(x, what = c(\"mean\", \"precision\"), ...) # S3 method for class 'gamlss' link_inverse(x, what = c(\"mu\", \"sigma\", \"nu\", \"tau\"), ...)"},{"path":"https://easystats.github.io/insight/reference/link_inverse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get link-inverse function from model object — link_inverse","text":"x fitted model. ... Currently used. gamlss models, indicates distribution parameter link (inverse) function returned; betareg DirichletRegModel, can \"mean\" \"precision\".","code":""},{"path":"https://easystats.github.io/insight/reference/link_inverse.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get link-inverse function from model object — link_inverse","text":"function, describing inverse-link function model-object. multivariate-response models, list functions returned.","code":""},{"path":"https://easystats.github.io/insight/reference/link_inverse.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get link-inverse function from model object — link_inverse","text":"","code":"# example from ?stats::glm counts <- c(18, 17, 15, 20, 10, 20, 25, 13, 12) outcome <- gl(3, 1, 9) treatment <- gl(3, 3) m <- glm(counts ~ outcome + treatment, family = poisson()) link_inverse(m)(0.3) #> [1] 1.349859 # same as exp(0.3) #> [1] 1.349859"},{"path":"https://easystats.github.io/insight/reference/model_info.html","id":null,"dir":"Reference","previous_headings":"","what":"Access information from model objects — model_info","title":"Access information from model objects — model_info","text":"Retrieve information model objects.","code":""},{"path":"https://easystats.github.io/insight/reference/model_info.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Access information from model objects — model_info","text":"","code":"model_info(x, ...) # Default S3 method model_info(x, verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/model_info.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Access information from model objects — model_info","text":"x fitted model. ... Currently used. verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/model_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Access information from model objects — model_info","text":"list information model, like family, link-function etc. (see 'Details').","code":""},{"path":"https://easystats.github.io/insight/reference/model_info.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Access information from model objects — model_info","text":"model_info() returns list information model many different model objects. Following information returned, values starting is_ logicals. is_binomial: family binomial (negative binomial) is_bernoulli: special case binomial models: family Bernoulli is_poisson: family poisson is_negbin: family negative binomial is_count: model count model (.e. family either poisson negative binomial) is_beta: family beta is_betabinomial: family beta-binomial is_orderedbeta: family ordered beta is_dirichlet: family dirichlet is_exponential: family exponential (e.g. Gamma Weibull) is_logit: model logit link is_probit: model probit link is_linear: family gaussian is_tweedie: family tweedie is_ordinal: family ordinal cumulative link is_cumulative: family ordinal cumulative link is_multinomial: family multinomial categorical link is_categorical: family categorical link is_censored: model censored model (censored response, including survival models) is_truncated: model truncated model (truncated response) is_survival: model survival model is_zero_inflated: model zero-inflation component is_hurdle: model zero-inflation component hurdle-model (truncated family distribution) is_dispersion: model dispersion component (dispersion parameter) is_mixed: model mixed effects model (random effects) is_multivariate: model multivariate response model (currently works brmsfit vglm/vgam objects) is_trial: model response contains additional information trials is_bayesian: model Bayesian model is_gam: model generalized additive model is_anova: model Anova object is_ttest: model object class htest, returned t.test() is_correlation: model object class htest, returned cor.test() is_ranktest: model object class htest, returned cor.test() (Spearman's rank correlation), wilcox.text() kruskal.test(). is_variancetest: model object class htest, returned bartlett.test(), shapiro.test() car::leveneTest(). is_levenetest: model object class anova, returned car::leveneTest(). is_onewaytest: model object class htest, returned oneway.test() is_proptest: model object class htest, returned prop.test() is_binomtest: model object class htest, returned binom.test() is_chi2test: model object class htest, returned chisq.test() is_xtab: model object class htest BFBayesFactor, test-statistic stems contingency table (.e. chisq.test() BayesFactor::contingencyTableBF()). link_function: link-function family: name distributional family model. exceptions (like htest objects), can also name test. n_obs: number observations n_grouplevels: mixed models, returns names numbers random effect groups","code":""},{"path":"https://easystats.github.io/insight/reference/model_info.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Access information from model objects — model_info","text":"","code":"ldose <- rep(0:5, 2) numdead <- c(1, 4, 9, 13, 18, 20, 0, 2, 6, 10, 12, 16) sex <- factor(rep(c(\"M\", \"F\"), c(6, 6))) SF <- cbind(numdead, numalive = 20 - numdead) dat <- data.frame(ldose, sex, SF, stringsAsFactors = FALSE) m <- glm(SF ~ sex * ldose, family = binomial) # logistic regression model_info(m) #> $is_binomial #> [1] TRUE #> #> $is_bernoulli #> [1] FALSE #> #> $is_count #> [1] FALSE #> #> $is_poisson #> [1] FALSE #> #> $is_negbin #> [1] FALSE #> #> $is_beta #> [1] FALSE #> #> $is_betabinomial #> [1] FALSE #> #> $is_orderedbeta #> [1] FALSE #> #> $is_dirichlet #> [1] FALSE #> #> $is_exponential #> [1] FALSE #> #> $is_logit #> [1] TRUE #> #> $is_probit #> [1] FALSE #> #> $is_censored #> [1] FALSE #> #> $is_truncated #> [1] FALSE #> #> $is_survival #> [1] FALSE #> #> $is_linear #> [1] FALSE #> #> $is_tweedie #> [1] FALSE #> #> $is_zeroinf #> [1] FALSE #> #> $is_zero_inflated #> [1] FALSE #> #> $is_dispersion #> [1] FALSE #> #> $is_hurdle #> [1] FALSE #> #> $is_ordinal #> [1] FALSE #> #> $is_cumulative #> [1] FALSE #> #> $is_multinomial #> [1] FALSE #> #> $is_categorical #> [1] FALSE #> #> $is_mixed #> [1] FALSE #> #> $is_multivariate #> [1] FALSE #> #> $is_trial #> [1] FALSE #> #> $is_bayesian #> [1] FALSE #> #> $is_gam #> [1] FALSE #> #> $is_anova #> [1] FALSE #> #> $is_timeseries #> [1] FALSE #> #> $is_ttest #> [1] FALSE #> #> $is_correlation #> [1] FALSE #> #> $is_onewaytest #> [1] FALSE #> #> $is_chi2test #> [1] FALSE #> #> $is_ranktest #> [1] FALSE #> #> $is_levenetest #> [1] FALSE #> #> $is_variancetest #> [1] FALSE #> #> $is_xtab #> [1] FALSE #> #> $is_proptest #> [1] FALSE #> #> $is_binomtest #> [1] FALSE #> #> $is_ftest #> [1] FALSE #> #> $is_meta #> [1] FALSE #> #> $link_function #> [1] \"logit\" #> #> $family #> [1] \"binomial\" #> #> $n_obs #> [1] 12 #> #> $n_grouplevels #> NULL #> # t-test m <- t.test(1:10, y = c(7:20)) model_info(m) #> $is_binomial #> [1] FALSE #> #> $is_bernoulli #> [1] FALSE #> #> $is_count #> [1] FALSE #> #> $is_poisson #> [1] FALSE #> #> $is_negbin #> [1] FALSE #> #> $is_beta #> [1] FALSE #> #> $is_betabinomial #> [1] FALSE #> #> $is_orderedbeta #> [1] FALSE #> #> $is_dirichlet #> [1] FALSE #> #> $is_exponential #> [1] FALSE #> #> $is_logit #> [1] FALSE #> #> $is_probit #> [1] FALSE #> #> $is_censored #> [1] FALSE #> #> $is_truncated #> [1] FALSE #> #> $is_survival #> [1] FALSE #> #> $is_linear #> [1] TRUE #> #> $is_tweedie #> [1] FALSE #> #> $is_zeroinf #> [1] FALSE #> #> $is_zero_inflated #> [1] FALSE #> #> $is_dispersion #> [1] FALSE #> #> $is_hurdle #> [1] FALSE #> #> $is_ordinal #> [1] FALSE #> #> $is_cumulative #> [1] FALSE #> #> $is_multinomial #> [1] FALSE #> #> $is_categorical #> [1] FALSE #> #> $is_mixed #> [1] FALSE #> #> $is_multivariate #> [1] FALSE #> #> $is_trial #> [1] FALSE #> #> $is_bayesian #> [1] FALSE #> #> $is_gam #> [1] FALSE #> #> $is_anova #> [1] FALSE #> #> $is_timeseries #> [1] FALSE #> #> $is_ttest #> [1] TRUE #> #> $is_correlation #> [1] FALSE #> #> $is_onewaytest #> [1] FALSE #> #> $is_chi2test #> [1] FALSE #> #> $is_ranktest #> [1] FALSE #> #> $is_levenetest #> [1] FALSE #> #> $is_variancetest #> [1] FALSE #> #> $is_xtab #> [1] FALSE #> #> $is_proptest #> [1] FALSE #> #> $is_binomtest #> [1] FALSE #> #> $is_ftest #> [1] FALSE #> #> $is_meta #> [1] FALSE #> #> $link_function #> [1] \"identity\" #> #> $family #> [1] \"gaussian\" #> #> $n_obs #> NULL #> #> $n_grouplevels #> NULL #>"},{"path":"https://easystats.github.io/insight/reference/model_name.html","id":null,"dir":"Reference","previous_headings":"","what":"Name the model — model_name","title":"Name the model — model_name","text":"Returns \"name\" (class attribute) model, possibly including information.","code":""},{"path":"https://easystats.github.io/insight/reference/model_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Name the model — model_name","text":"","code":"model_name(x, ...) # Default S3 method model_name(x, include_formula = FALSE, include_call = FALSE, ...)"},{"path":"https://easystats.github.io/insight/reference/model_name.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Name the model — model_name","text":"x model. ... Currently used. include_formula name include model's formula. include_call TRUE, return function call name.","code":""},{"path":"https://easystats.github.io/insight/reference/model_name.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Name the model — model_name","text":"character string name (usually equals model's class attribute).","code":""},{"path":"https://easystats.github.io/insight/reference/model_name.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Name the model — model_name","text":"","code":"m <- lm(Sepal.Length ~ Petal.Width, data = iris) model_name(m) #> [1] \"lm\" model_name(m, include_formula = TRUE) #> [1] \"lm(Sepal.Length ~ Petal.Width)\" model_name(m, include_call = TRUE) #> [1] \"lm(formula = Sepal.Length ~ Petal.Width, data = iris)\" model_name(lme4::lmer(Sepal.Length ~ Sepal.Width + (1 | Species), data = iris)) #> [1] \"lmerMod\""},{"path":"https://easystats.github.io/insight/reference/n_grouplevels.html","id":null,"dir":"Reference","previous_headings":"","what":"Count number of random effect levels in a mixed model — n_grouplevels","title":"Count number of random effect levels in a mixed model — n_grouplevels","text":"Returns number group levels random effects mixed models.","code":""},{"path":"https://easystats.github.io/insight/reference/n_grouplevels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count number of random effect levels in a mixed model — n_grouplevels","text":"","code":"n_grouplevels(x, ...)"},{"path":"https://easystats.github.io/insight/reference/n_grouplevels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count number of random effect levels in a mixed model — n_grouplevels","text":"x mixed model. ... Additional arguments can passed function. Currently, can use data provide model data, available, avoid retrieving model data multiple times.","code":""},{"path":"https://easystats.github.io/insight/reference/n_grouplevels.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Count number of random effect levels in a mixed model — n_grouplevels","text":"number group levels model.","code":""},{"path":"https://easystats.github.io/insight/reference/n_grouplevels.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Count number of random effect levels in a mixed model — n_grouplevels","text":"","code":"data(sleepstudy, package = \"lme4\") set.seed(12345) sleepstudy$grp <- sample(1:5, size = 180, replace = TRUE) sleepstudy$subgrp <- NA for (i in 1:5) { filter_group <- sleepstudy$grp == i sleepstudy$subgrp[filter_group] <- sample(1:30, size = sum(filter_group), replace = TRUE) } model <- lme4::lmer( Reaction ~ Days + (1 | grp / subgrp) + (1 | Subject), data = sleepstudy ) n_grouplevels(model) #> Group | N_levels #> --------------------- #> subgrp | 30 #> grp | 5 #> Subject | 18 #> subgrp:grp | 108"},{"path":"https://easystats.github.io/insight/reference/n_obs.html","id":null,"dir":"Reference","previous_headings":"","what":"Get number of observations from a model — n_obs","title":"Get number of observations from a model — n_obs","text":"method returns number observation used fit model, numeric value.","code":""},{"path":"https://easystats.github.io/insight/reference/n_obs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get number of observations from a model — n_obs","text":"","code":"n_obs(x, ...) # S3 method for class 'glm' n_obs(x, disaggregate = FALSE, ...) # S3 method for class 'svyolr' n_obs(x, weighted = FALSE, ...) # S3 method for class 'afex_aov' n_obs(x, shape = c(\"long\", \"wide\"), ...) # S3 method for class 'stanmvreg' n_obs(x, select = NULL, ...)"},{"path":"https://easystats.github.io/insight/reference/n_obs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get number of observations from a model — n_obs","text":"x fitted model. ... Currently used. disaggregate binomial models aggregated data, n_obs() returns number data rows default. disaggregate = TRUE, total number trials returned instead (determined summing results weights() aggregated data, either weights input proportion success response row sums response matrix matrix response, see 'Examples'). weighted survey designs, returns weighted sample size. shape Return long wide data? applicable repeated measures designs. select Optional name(s) response variables extract values. Can used case regression models multiple response variables.","code":""},{"path":"https://easystats.github.io/insight/reference/n_obs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get number of observations from a model — n_obs","text":"number observations used fit model, NULL information available.","code":""},{"path":"https://easystats.github.io/insight/reference/n_obs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get number of observations from a model — n_obs","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) n_obs(m) #> [1] 32 data(cbpp, package = \"lme4\") m <- glm( cbind(incidence, size - incidence) ~ period, data = cbpp, family = binomial(link = \"logit\") ) n_obs(m) #> [1] 56 n_obs(m, disaggregate = TRUE) #> [1] 842"},{"path":"https://easystats.github.io/insight/reference/n_parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Count number of parameters in a model — n_parameters","title":"Count number of parameters in a model — n_parameters","text":"Returns number parameters (coefficients) model.","code":""},{"path":"https://easystats.github.io/insight/reference/n_parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count number of parameters in a model — n_parameters","text":"","code":"n_parameters(x, ...) # Default S3 method n_parameters(x, remove_nonestimable = FALSE, ...) # S3 method for class 'merMod' n_parameters( x, effects = c(\"fixed\", \"random\"), remove_nonestimable = FALSE, ... ) # S3 method for class 'glmmTMB' n_parameters( x, effects = c(\"fixed\", \"random\"), component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\"), remove_nonestimable = FALSE, ... ) # S3 method for class 'zeroinfl' n_parameters( x, component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\"), remove_nonestimable = FALSE, ... ) # S3 method for class 'gam' n_parameters( x, component = c(\"all\", \"conditional\", \"smooth_terms\"), remove_nonestimable = FALSE, ... ) # S3 method for class 'brmsfit' n_parameters(x, effects = \"all\", component = \"all\", ...)"},{"path":"https://easystats.github.io/insight/reference/n_parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count number of parameters in a model — n_parameters","text":"x statistical model. ... Arguments passed methods. remove_nonestimable Logical, TRUE, removes (.e. count) non-estimable parameters (may occur models rank-deficient model matrix). effects number parameters fixed effects, random effects returned? applies mixed models. May abbreviated. component total number parameters, number parameters conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated.","code":""},{"path":"https://easystats.github.io/insight/reference/n_parameters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Count number of parameters in a model — n_parameters","text":"number parameters model.","code":""},{"path":"https://easystats.github.io/insight/reference/n_parameters.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Count number of parameters in a model — n_parameters","text":"function returns number parameters fixed effects default, returned find_parameters(x, effects = \"fixed\"). include estimated model parameters, .e. auxiliary parameters like sigma dispersion counted. get number estimated parameters, use get_df(x, type = \"model\").","code":""},{"path":"https://easystats.github.io/insight/reference/n_parameters.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Count number of parameters in a model — n_parameters","text":"","code":"data(iris) model <- lm(Sepal.Length ~ Sepal.Width * Species, data = iris) n_parameters(model) #> [1] 6"},{"path":"https://easystats.github.io/insight/reference/null_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute intercept-only model for regression models — null_model","title":"Compute intercept-only model for regression models — null_model","text":"function computes null-model (.e. (y ~ 1)) model. mixed models, null-model takes random effects account.","code":""},{"path":"https://easystats.github.io/insight/reference/null_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute intercept-only model for regression models — null_model","text":"","code":"null_model(model, verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/null_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute intercept-only model for regression models — null_model","text":"model (mixed effects) model. verbose Toggle warnings. ... Arguments passed methods.","code":""},{"path":"https://easystats.github.io/insight/reference/null_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute intercept-only model for regression models — null_model","text":"null-model x","code":""},{"path":"https://easystats.github.io/insight/reference/null_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute intercept-only model for regression models — null_model","text":"","code":"data(sleepstudy) m <- lmer(Reaction ~ Days + (1 + Days | Subject), data = sleepstudy) summary(m) #> Linear mixed model fit by REML ['lmerMod'] #> Formula: Reaction ~ Days + (1 + Days | Subject) #> Data: sleepstudy #> #> REML criterion at convergence: 1743.6 #> #> Scaled residuals: #> Min 1Q Median 3Q Max #> -3.9536 -0.4634 0.0231 0.4634 5.1793 #> #> Random effects: #> Groups Name Variance Std.Dev. Corr #> Subject (Intercept) 612.10 24.741 #> Days 35.07 5.922 0.07 #> Residual 654.94 25.592 #> Number of obs: 180, groups: Subject, 18 #> #> Fixed effects: #> Estimate Std. Error t value #> (Intercept) 251.405 6.825 36.838 #> Days 10.467 1.546 6.771 #> #> Correlation of Fixed Effects: #> (Intr) #> Days -0.138 summary(null_model(m)) #> Linear mixed model fit by REML ['lmerMod'] #> Formula: Reaction ~ (1 + Days | Subject) #> Data: sleepstudy #> #> REML criterion at convergence: 1769.8 #> #> Scaled residuals: #> Min 1Q Median 3Q Max #> -4.0449 -0.4486 0.0089 0.4819 5.2186 #> #> Random effects: #> Groups Name Variance Std.Dev. Corr #> Subject (Intercept) 651.6 25.53 #> Days 142.2 11.93 -0.18 #> Residual 654.9 25.59 #> Number of obs: 180, groups: Subject, 18 #> #> Fixed effects: #> Estimate Std. Error t value #> (Intercept) 257.76 6.76 38.13"},{"path":"https://easystats.github.io/insight/reference/object_has_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Check names and rownames — object_has_names","title":"Check names and rownames — object_has_names","text":"object_has_names() checks specified names present given object. object_has_rownames() checks rownames present dataframe.","code":""},{"path":"https://easystats.github.io/insight/reference/object_has_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check names and rownames — object_has_names","text":"","code":"object_has_names(x, names) object_has_rownames(x)"},{"path":"https://easystats.github.io/insight/reference/object_has_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check names and rownames — object_has_names","text":"x named object (atomic vector, list, dataframe, etc.). names single character vector characters.","code":""},{"path":"https://easystats.github.io/insight/reference/object_has_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check names and rownames — object_has_names","text":"logical vector logicals.","code":""},{"path":"https://easystats.github.io/insight/reference/object_has_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check names and rownames — object_has_names","text":"","code":"# check if specified names are present in the given object object_has_names(mtcars, \"am\") #> [1] TRUE object_has_names(anscombe, c(\"x1\", \"z1\", \"y1\")) #> [1] TRUE FALSE TRUE object_has_names(list(\"x\" = 1, \"y\" = 2), c(\"x\", \"a\")) #> [1] TRUE FALSE # check if a dataframe has rownames object_has_rownames(mtcars) #> [1] TRUE"},{"path":"https://easystats.github.io/insight/reference/print_color.html","id":null,"dir":"Reference","previous_headings":"","what":"Coloured console output — print_color","title":"Coloured console output — print_color","text":"Convenient function allows coloured output console. Mainly implemented reduce package dependencies.","code":""},{"path":"https://easystats.github.io/insight/reference/print_color.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coloured console output — print_color","text":"","code":"print_color(text, color) print_colour(text, colour) color_text(text, color) colour_text(text, colour) color_theme()"},{"path":"https://easystats.github.io/insight/reference/print_color.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coloured console output — print_color","text":"text text print. color, colour Character vector, indicating colour printing. May one \"white\", \"black\", \"red\", \"yellow\", \"green\", \"blue\", \"violet\", \"cyan\" \"grey\". Bright variants colors available adding prefix \"b\" (\"br_\" \"bright_\"), e.g. \"bred\" (\"br_red\" resp. \"bright_red\"). Background colors can set adding prefix \"bg_\" (e.g. \"bg_red\"). Formatting also possible \"bold\" \"italic\".","code":""},{"path":"https://easystats.github.io/insight/reference/print_color.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Coloured console output — print_color","text":"Nothing.","code":""},{"path":"https://easystats.github.io/insight/reference/print_color.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Coloured console output — print_color","text":"function prints text directly console using cat(), string returned. color_text(), however, returns formatted string, without using cat(). color_theme() either returns \"dark\" RStudio used dark color scheme, \"light\" used light theme, NULL theme detected.","code":""},{"path":"https://easystats.github.io/insight/reference/print_color.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Coloured console output — print_color","text":"","code":"print_color(\"I'm blue dabedi dabedei\", \"blue\") #> I'm blue dabedi dabedei"},{"path":"https://easystats.github.io/insight/reference/print_parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Prepare summary statistics of model parameters for printing — print_parameters","title":"Prepare summary statistics of model parameters for printing — print_parameters","text":"function takes data frame, typically data frame information summaries model parameters like bayestestR::describe_posterior(), bayestestR::hdi() parameters::model_parameters(), input splits information several parts, depending model. See details .","code":""},{"path":"https://easystats.github.io/insight/reference/print_parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prepare summary statistics of model parameters for printing — print_parameters","text":"","code":"print_parameters( x, ..., split_by = c(\"Effects\", \"Component\", \"Group\", \"Response\"), format = \"text\", parameter_column = \"Parameter\", keep_parameter_column = TRUE, remove_empty_column = FALSE, titles = NULL, subtitles = NULL )"},{"path":"https://easystats.github.io/insight/reference/print_parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prepare summary statistics of model parameters for printing — print_parameters","text":"x fitted model, data frame returned clean_parameters(). ... One objects (data frames), contain information model parameters related statistics (like confidence intervals, HDI, ROPE, ...). split_by split_by character vector one following elements: \"Effects\", \"Component\", \"Response\" \"Group\". column names returned clean_parameters(), used extract information group component model parameters belong. NULL, merged data frame returned. Else, data frame split list, split values columns defined split_by. format Name output-format, string. NULL (\"text\"), assumed use output basic printing. \"markdown\", markdown-format assumed. affects style title- table-caption attributes, used export_table(). parameter_column String, name column contains parameter names. Usually, data frames returned functions easystats-packages, \"Parameter\". keep_parameter_column Logical, TRUE, data frames returned list \"Cleaned_Parameter\" \"Parameter\" column. FALSE, (unformatted) \"Parameter\" removed, column cleaned parameter names (\"Cleaned_Parameter\") renamed \"Parameter\". remove_empty_column Logical, TRUE, columns completely empty character values removed. titles, subtitles default, names model components (like fixed random effects, count zero-inflated model part) added attributes \"table_title\" \"table_subtitle\" list element returned print_parameters(). attributes extracted used table (sub) titles export_table(). Use titles subtitles override default attribute values \"table_title\" \"table_subtitle\". titles subtitles may length 1 length returned list elements. titles subtitles shorter existing elements, first default attributes overwritten.","code":""},{"path":"https://easystats.github.io/insight/reference/print_parameters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prepare summary statistics of model parameters for printing — print_parameters","text":"data frame list data frames (split_by NULL). list returned, element names reflect model components extracted information data frames belong , e.g. random.zero_inflated.Intercept: persons. data frame contains parameters random effects group-level \"persons\" zero-inflated model component.","code":""},{"path":"https://easystats.github.io/insight/reference/print_parameters.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Prepare summary statistics of model parameters for printing — print_parameters","text":"function prepares data frames contain information model parameters clear printing. First, x required, either model object prepared data frame returned clean_parameters(). x model, clean_parameters() called model object get information model components parameters associated. , ... take one data frames also contain information parameters model, also additional information provided methods. instance, data frame ... might result , instance, bayestestR::describe_posterior(), parameters::model_parameters(), ) Parameter column b) columns parameter values (like CI, HDI, test statistic, etc.). Now data frame model parameters information association different model components, data frame model parameters, summary statistics. print_parameters() merges data frames, parameters statistics interest also associated different model components. data frame split list, clear printing. Users can loop list print component better overview. , parameter names \"cleaned\", necessary, also cleaner print. See also 'Examples'.","code":""},{"path":"https://easystats.github.io/insight/reference/print_parameters.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Prepare summary statistics of model parameters for printing — print_parameters","text":"","code":"# \\donttest{ library(bayestestR) model <- download_model(\"brms_zi_2\") x <- hdi(model, effects = \"all\", component = \"all\") # hdi() returns a data frame; here we use only the # information on parameter names and HDI values tmp <- as.data.frame(x)[, 1:4] tmp #> Parameter CI CI_low CI_high #> 1 b_Intercept 0.95 -1.5750655217 -0.19121613 #> 4 b_persons 0.95 0.6184455532 1.06881424 #> 3 b_child 0.95 -1.3162422984 -0.95758109 #> 2 b_camper 0.95 0.5461831894 0.92611577 #> 8 r_persons[1,Intercept] 0.95 -0.5330733515 0.35294394 #> 9 r_persons[2,Intercept] 0.95 -0.2223371232 0.38996718 #> 10 r_persons[3,Intercept] 0.95 -0.3042515304 0.23075738 #> 11 r_persons[4,Intercept] 0.95 -0.3385211340 0.42306128 #> 16 sd_persons__Intercept 0.95 0.0001646025 0.53508587 #> 5 b_zi_Intercept 0.95 -2.1380522885 0.81535164 #> 7 b_zi_child 0.95 1.2372839351 2.55611481 #> 6 b_zi_camper 0.95 -1.5578690989 -0.13785783 #> 12 r_persons__zi[1,Intercept] 0.95 -0.2851875068 2.79744522 #> 13 r_persons__zi[2,Intercept] 0.95 -1.2294623420 1.76053356 #> 14 r_persons__zi[3,Intercept] 0.95 -1.6701942638 1.34558714 #> 15 r_persons__zi[4,Intercept] 0.95 -2.9688353496 0.08844285 #> 17 sd_persons__zi_Intercept 0.95 0.3711927016 3.06955610 # Based on the \"split_by\" argument, we get a list of data frames that # is split into several parts that reflect the model components. print_parameters(model, tmp) #> $fixed.conditional #> Cleaned_Parameter Parameter CI CI_low CI_high #> 1 (Intercept) b_Intercept 0.95 -1.5750655 -0.1912161 #> 2 persons b_persons 0.95 0.6184456 1.0688142 #> 3 child b_child 0.95 -1.3162423 -0.9575811 #> 4 camper b_camper 0.95 0.5461832 0.9261158 #> #> $fixed.zero_inflated #> Cleaned_Parameter Parameter CI CI_low CI_high #> 10 (Intercept) b_zi_Intercept 0.95 -2.138052 0.8153516 #> 11 child b_zi_child 0.95 1.237284 2.5561148 #> 12 camper b_zi_camper 0.95 -1.557869 -0.1378578 #> #> $`random.conditional.Intercept: persons` #> Cleaned_Parameter Parameter CI CI_low CI_high #> 5 persons.1 r_persons[1,Intercept] 0.95 -0.5330734 0.3529439 #> 6 persons.2 r_persons[2,Intercept] 0.95 -0.2223371 0.3899672 #> 7 persons.3 r_persons[3,Intercept] 0.95 -0.3042515 0.2307574 #> 8 persons.4 r_persons[4,Intercept] 0.95 -0.3385211 0.4230613 #> #> $`random.zero_inflated.Intercept: persons` #> Cleaned_Parameter Parameter CI CI_low CI_high #> 13 persons.1 r_persons__zi[1,Intercept] 0.95 -0.2851875 2.79744522 #> 14 persons.2 r_persons__zi[2,Intercept] 0.95 -1.2294623 1.76053356 #> 15 persons.3 r_persons__zi[3,Intercept] 0.95 -1.6701943 1.34558714 #> 16 persons.4 r_persons__zi[4,Intercept] 0.95 -2.9688353 0.08844285 #> #> $`random.conditional.SD/Cor: persons` #> Cleaned_Parameter Parameter CI CI_low CI_high #> 9 (Intercept) sd_persons__Intercept 0.95 0.0001646025 0.5350859 #> #> $`random.zero_inflated.SD/Cor: persons` #> Cleaned_Parameter Parameter CI CI_low CI_high #> 17 (Intercept) sd_persons__zi_Intercept 0.95 0.3711927 3.069556 #> # This is the standard print()-method for \"bayestestR::hdi\"-objects. # For printing methods, it is easy to print complex summary statistics # in a clean way to the console by splitting the information into # different model components. x #> Highest Density Interval #> #> Parameter | 95% HDI #> ---------------------------- #> (Intercept) | [-1.58, -0.19] #> persons | [ 0.62, 1.07] #> child | [-1.32, -0.96] #> camper | [ 0.55, 0.93] #> #> # Fixed effects (zero-inflated) #> #> Parameter | 95% HDI #> ---------------------------- #> (Intercept) | [-2.14, 0.82] #> child | [ 1.24, 2.56] #> camper | [-1.56, -0.14] #> #> # Random effects (conditional) Intercept: persons #> #> Parameter | 95% HDI #> -------------------------- #> persons.1 | [-0.53, 0.35] #> persons.2 | [-0.22, 0.39] #> persons.3 | [-0.30, 0.23] #> persons.4 | [-0.34, 0.42] #> #> # Random effects (zero-inflated) Intercept: persons #> #> Parameter | 95% HDI #> -------------------------- #> persons.1 | [-0.29, 2.80] #> persons.2 | [-1.23, 1.76] #> persons.3 | [-1.67, 1.35] #> persons.4 | [-2.97, 0.09] #> #> # Random effects (conditional) SD/Cor: persons #> #> Parameter | 95% HDI #> ---------------------------- #> (Intercept) | [ 0.00, 0.54] #> #> # Random effects (zero-inflated) SD/Cor: persons #> #> Parameter | 95% HDI #> ---------------------------- #> (Intercept) | [ 0.37, 3.07] # }"},{"path":"https://easystats.github.io/insight/reference/standardize_column_order.html","id":null,"dir":"Reference","previous_headings":"","what":"Standardize column order — standardize_column_order","title":"Standardize column order — standardize_column_order","text":"Standardizes order columns dataframes objects easystats broom ecosystem packages.","code":""},{"path":"https://easystats.github.io/insight/reference/standardize_column_order.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Standardize column order — standardize_column_order","text":"","code":"standardize_column_order(data, ...) # S3 method for class 'parameters_model' standardize_column_order(data, style = c(\"easystats\", \"broom\"), ...)"},{"path":"https://easystats.github.io/insight/reference/standardize_column_order.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Standardize column order — standardize_column_order","text":"data data frame. particular, objects easystats package functions like parameters::model_parameters() effectsize::effectsize() accepted, also data frames returned broom::tidy() valid objects. ... Currently used. style Standardization can either based naming conventions easystats-project, broom's naming scheme.","code":""},{"path":"https://easystats.github.io/insight/reference/standardize_column_order.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Standardize column order — standardize_column_order","text":"data frame, standardized column order.","code":""},{"path":"https://easystats.github.io/insight/reference/standardize_column_order.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Standardize column order — standardize_column_order","text":"","code":"# easystats conventions df1 <- cbind.data.frame( CI_low = -2.873, t = 5.494, CI_high = -1.088, p = 0.00001, Parameter = -1.980, CI = 0.95, df = 29.234, Method = \"Student's t-test\" ) standardize_column_order(df1, style = \"easystats\") #> Parameter CI CI_low CI_high Method t df p #> 1 -1.98 0.95 -2.873 -1.088 Student's t-test 5.494 29.234 1e-05 # broom conventions df2 <- cbind.data.frame( conf.low = -2.873, statistic = 5.494, conf.high = -1.088, p.value = 0.00001, estimate = -1.980, conf.level = 0.95, df = 29.234, method = \"Student's t-test\" ) standardize_column_order(df2, style = \"broom\") #> estimate conf.level conf.low conf.high method statistic df #> 1 -1.98 0.95 -2.873 -1.088 Student's t-test 5.494 29.234 #> p.value #> 1 1e-05"},{"path":"https://easystats.github.io/insight/reference/standardize_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Standardize column names — standardize_names","title":"Standardize column names — standardize_names","text":"Standardize column names data frames, particular objects returned parameters::model_parameters(), column names consistent model object.","code":""},{"path":"https://easystats.github.io/insight/reference/standardize_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Standardize column names — standardize_names","text":"","code":"standardize_names(data, ...) # S3 method for class 'parameters_model' standardize_names( data, style = c(\"easystats\", \"broom\"), ignore_estimate = FALSE, ... )"},{"path":"https://easystats.github.io/insight/reference/standardize_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Standardize column names — standardize_names","text":"data data frame. particular, objects easystats package functions like parameters::model_parameters() effectsize::effectsize() accepted, also data frames returned broom::tidy() valid objects. ... Currently used. style Standardization can either based naming conventions easystats-project, broom's naming scheme. ignore_estimate Logical, TRUE, column names like \"mean\" \"median\" converted \"Coefficient\" resp. \"estimate\".","code":""},{"path":"https://easystats.github.io/insight/reference/standardize_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Standardize column names — standardize_names","text":"data frame, standardized column names.","code":""},{"path":"https://easystats.github.io/insight/reference/standardize_names.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Standardize column names — standardize_names","text":"method particular useful package developers users use, e.g., parameters::model_parameters() code functions retrieve model parameters processing. model_parameters() returns data frame varying column names (depending input), accessing required information probably quite straightforward. cases, standardize_names() can used get consistent, .e. always column names, matter kind model used model_parameters(). style = \"broom\", column names renamed match broom's naming scheme, .e. Parameter renamed term, Coefficient becomes estimate . style = \"easystats\", data object broom::tidy(), column names converted \"broom\"-style \"easystats\"-style.","code":""},{"path":"https://easystats.github.io/insight/reference/standardize_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Standardize column names — standardize_names","text":"","code":"model <- lm(mpg ~ wt + cyl, data = mtcars) mp <- model_parameters(model) as.data.frame(mp) #> Parameter Coefficient SE CI CI_low CI_high t #> 1 (Intercept) 39.686261 1.7149840 0.95 36.178725 43.1937976 23.140893 #> 2 wt -3.190972 0.7569065 0.95 -4.739020 -1.6429245 -4.215808 #> 3 cyl -1.507795 0.4146883 0.95 -2.355928 -0.6596622 -3.635972 #> df_error p #> 1 29 3.043182e-20 #> 2 29 2.220200e-04 #> 3 29 1.064282e-03 standardize_names(mp) #> Parameter Coefficient SE CI CI_low CI_high Statistic df #> 1 (Intercept) 39.686261 1.7149840 0.95 36.178725 43.1937976 23.140893 29 #> 2 wt -3.190972 0.7569065 0.95 -4.739020 -1.6429245 -4.215808 29 #> 3 cyl -1.507795 0.4146883 0.95 -2.355928 -0.6596622 -3.635972 29 #> p #> 1 3.043182e-20 #> 2 2.220200e-04 #> 3 1.064282e-03 standardize_names(mp, style = \"broom\") #> term estimate std.error conf.level conf.low conf.high statistic #> 1 (Intercept) 39.686261 1.7149840 0.95 36.178725 43.1937976 23.140893 #> 2 wt -3.190972 0.7569065 0.95 -4.739020 -1.6429245 -4.215808 #> 3 cyl -1.507795 0.4146883 0.95 -2.355928 -0.6596622 -3.635972 #> df.error p.value #> 1 29 3.043182e-20 #> 2 29 2.220200e-04 #> 3 29 1.064282e-03"},{"path":"https://easystats.github.io/insight/reference/text_remove_backticks.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove backticks from a string — text_remove_backticks","title":"Remove backticks from a string — text_remove_backticks","text":"function removes backticks string.","code":""},{"path":"https://easystats.github.io/insight/reference/text_remove_backticks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove backticks from a string — text_remove_backticks","text":"","code":"text_remove_backticks(x, ...) # S3 method for class 'data.frame' text_remove_backticks(x, column = \"Parameter\", verbose = FALSE, ...)"},{"path":"https://easystats.github.io/insight/reference/text_remove_backticks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove backticks from a string — text_remove_backticks","text":"x character vector, data frame matrix. matrix, backticks removed column row names, values character vector. ... Currently used. column x data frame, specify column character vectors, backticks removed. NULL, character vectors processed. verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/text_remove_backticks.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Remove backticks from a string — text_remove_backticks","text":"x, backticks removed.","code":""},{"path":"https://easystats.github.io/insight/reference/text_remove_backticks.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Remove backticks from a string — text_remove_backticks","text":"x character vector data frame, backticks removed elements character vector (character vectors data frame.) x matrix, behaviour slightly differs: case, backticks removed column row names. reason behaviour function mainly serves formatting coefficient names. vcov() (matrix), row column names equal coefficient names therefore manipulated .","code":""},{"path":"https://easystats.github.io/insight/reference/text_remove_backticks.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove backticks from a string — text_remove_backticks","text":"","code":"# example model data(iris) iris$`a m` <- iris$Species iris$`Sepal Width` <- iris$Sepal.Width model <- lm(`Sepal Width` ~ Petal.Length + `a m`, data = iris) # remove backticks from string names(coef(model)) #> [1] \"(Intercept)\" \"Petal.Length\" \"`a m`versicolor\" \"`a m`virginica\" text_remove_backticks(names(coef(model))) #> [1] \"(Intercept)\" \"Petal.Length\" \"a mversicolor\" \"a mvirginica\" # remove backticks from character variable in a data frame # column defaults to \"Parameter\". d <- data.frame( Parameter = names(coef(model)), Estimate = unname(coef(model)) ) d #> Parameter Estimate #> 1 (Intercept) 2.991869 #> 2 Petal.Length 0.298311 #> 3 `a m`versicolor -1.492674 #> 4 `a m`virginica -1.674092 text_remove_backticks(d) #> Parameter Estimate #> 1 (Intercept) 2.991869 #> 2 Petal.Length 0.298311 #> 3 a mversicolor -1.492674 #> 4 a mvirginica -1.674092"},{"path":"https://easystats.github.io/insight/reference/trim_ws.html","id":null,"dir":"Reference","previous_headings":"","what":"Small helper functions — trim_ws","title":"Small helper functions — trim_ws","text":"Collection small helper functions. trim_ws() efficient function trim leading trailing whitespaces character vectors strings. n_unique() returns number unique values vector. has_single_value() equivalent n_unique() == 1 faster. safe_deparse() comparable deparse1(), .e. can safely deparse long expressions single string. safe_deparse_symbol() deparses substituted expressions possible, can much faster deparse(substitute()) cases substitute() returns valid object name.","code":""},{"path":"https://easystats.github.io/insight/reference/trim_ws.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Small helper functions — trim_ws","text":"","code":"trim_ws(x, ...) # S3 method for class 'data.frame' trim_ws(x, character_only = TRUE, ...) n_unique(x, ...) # Default S3 method n_unique(x, na.rm = TRUE, ...) safe_deparse(x, ...) safe_deparse_symbol(x) has_single_value(x, na.rm = FALSE)"},{"path":"https://easystats.github.io/insight/reference/trim_ws.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Small helper functions — trim_ws","text":"x (character) vector, functions may also data frame. ... Currently used. character_only Logical, TRUE x data frame list, processes character vectors. na.rm Logical, missing values removed input.","code":""},{"path":"https://easystats.github.io/insight/reference/trim_ws.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Small helper functions — trim_ws","text":"n_unique(): vector, n_unique always returns integer value, even input NULL (return value 0 ). data frames lists, n_unique() returns named numeric vector, number unique values element. has_single_value(): TRUE x one unique value, FALSE otherwise. trim_ws(): character vector, trailing leading white spaces removed. safe_deparse(): character string unevaluated expression symbol. safe_deparse_symbol(): character string unevaluated expression symbol, x symbol. x symbol (.e. .name(x) return FALSE), NULL returned.","code":""},{"path":"https://easystats.github.io/insight/reference/trim_ws.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Small helper functions — trim_ws","text":"","code":"trim_ws(\" no space! \") #> [1] \"no space!\" n_unique(iris$Species) #> [1] 3 has_single_value(c(1, 1, 2)) #> [1] FALSE # safe_deparse_symbol() compared to deparse(substitute()) safe_deparse_symbol(as.name(\"test\")) #> [1] \"test\" deparse(substitute(as.name(\"test\"))) #> [1] \"as.name(\\\"test\\\")\""},{"path":[]},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-19-11","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.19.11","text":"informative error message get_varcov() requested vcov-function failed.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-11","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.11","text":"Fixed issue get_data() coxme models sourcewas set \"modelframe\".","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-01910","dir":"Changelog","previous_headings":"","what":"insight 0.19.10","title":"insight 0.19.10","text":"CRAN release: 2024-03-22","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-10","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.10","text":"Functions like find_variables() clean_names() now support multi-membership formulas models brms. Updated tests work latest changes glmmTMB 1.1.9.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0199","dir":"Changelog","previous_headings":"","what":"insight 0.19.9","title":"insight 0.19.9","text":"CRAN release: 2024-03-15","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-models-0-19-9","dir":"Changelog","previous_headings":"","what":"New supported models","title":"insight 0.19.9","text":"Support models class serp (package serp).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-19-9","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.19.9","text":"standardize_names() now also recognizes column s.value objects package marginaleffects.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-9","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.9","text":"Fixed issue find_predictors() models splines (s()), number dimensions indicated variable, number. format_ci() now works factors character vectors . Fixed issues latest release tinytable. Fixed issues latest release PROreg.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0198","dir":"Changelog","previous_headings":"","what":"insight 0.19.8","title":"insight 0.19.8","text":"CRAN release: 2024-01-31","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-19-8","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.19.8","text":"Removed deprecated arguments get_data.mmrm(). Improved support models class rqs (package quantreg). Revised test address forthcoming changes pscl package.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-8","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.8","text":"Fixed issue get_loglikelihood() glm-models binary outcome, levels defined reversed order. Fixed issue find_formula() models class glmmPQL (package MASS). Fixed issue find_formula() models class gam (package mgcv) \"gaulss\" family. Fixed issue get_variance() glmmTMB models family = \"ordbeta\". Fixed issue model_info() correctly detecting multivariate vgam/vglm models.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0197","dir":"Changelog","previous_headings":"","what":"insight 0.19.7","title":"insight 0.19.7","text":"CRAN release: 2023-11-26","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-19-7","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.19.7","text":"Support objects class ggcomparisons ggeffects::hypothesis_test(). brms::gr() now supported, meaning functions like get_data() find_predictors() now also work models group-specific random effects. Fix CRAN check issues due last fixest update.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-19-7","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.19.7","text":"get_varcov() models class pgmm (package plm) now also supported robust variance-covariance matrices (.e. argument vcov).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-7","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.7","text":"Fixed issue find_predictors() survival models strata(), containing one variable. Fixed issue model_info(), cases logistic regression models erroneously considered \"bernoulli\" models. Fixed issue find_formula() models class gamlss random() function used namespace formula (.e. ... + gamlss::random()). model_info() now detects models zero-inflation part package glmmTMB models truncated-families ziformula.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0196","dir":"Changelog","previous_headings":"","what":"insight 0.19.6","title":"insight 0.19.6","text":"CRAN release: 2023-10-12","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-19-6","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.19.6","text":"Improved documentation get_predicted_ci().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-19-6","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.19.6","text":"model_info() now recognized ordered beta families. find_formula get_response nestedLogit models gain dichotomies argument, return values dichotomies used fit model.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-6","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.6","text":"find_transformation() better detects power-transformation response variable. Corrected return value find_statistic nnet::multinom() models. clean_parameters() return \"clean_parameters\" class attributes object. caused issued upstream packages. Fixed issue model_info(), correctly detect “Bernoulli” property models classes (like glmmTMB glmerMod).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0195","dir":"Changelog","previous_headings":"","what":"insight 0.19.5","title":"insight 0.19.5","text":"CRAN release: 2023-09-13","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-5","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.5","text":"Fixed critical issue check_if_installed() old R releases.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0194","dir":"Changelog","previous_headings":"","what":"insight 0.19.4","title":"insight 0.19.4","text":"CRAN release: 2023-09-10","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-19-4","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.19.4","text":"get_predicted() now accepts predict = \"link\" gaussian models log-link (.e. glm(..., family = gaussian(\"log\"))), return predictions link scale. check_if_installed() now automatically checks package DESCRIPTION file determine correct minimum version required.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-4","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.4","text":"Fixed issue invalid multibyte strings trim_ws(). Fixed issue find_statistic() models package fixest.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0193","dir":"Changelog","previous_headings":"","what":"insight 0.19.3","title":"insight 0.19.3","text":"CRAN release: 2023-06-29","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"breaking-changes-0-19-3","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"insight 0.19.3","text":"standardize_column_order() changed position re-ordering Bayes factors, ROPEs ESS / Rhat (mainly relevant Bayesian models).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-19-3","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.19.3","text":"standardize_names() standardize_column_order() now also recognize \"response.level\" column name. get_data() lavaan models now stable retrieving model data available environment. find_terms() gets as_term_labels argument, extract model terms formula’s \"term.labels\" attribute. closer behaviour stats::terms(), may insufficient, e.g. mixed models.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-3","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.3","text":"get_random() now returns observations get_data() correctly removes missing values data returning . find_parameters() marginal effects ignores \"s.value\" column (added recent update). Fixed issue get_response() brms models trunc() function response variable.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0192","dir":"Changelog","previous_headings":"","what":"insight 0.19.2","title":"insight 0.19.2","text":"CRAN release: 2023-05-23","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"breaking-changes-0-19-2","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"insight 0.19.2","text":"minimum needed R version bumped 3.6. download_model() longer errors model object downloaded, instead returns NULL. prevents test failures, allows skip tests return value download_model() NULL.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-19-2","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.19.2","text":"Improved support mclogit models (package mclogit) mipo objects (package mice) models ordinal categorical response.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-models-0-19-2","dir":"Changelog","previous_headings":"","what":"New supported models","title":"insight 0.19.2","text":"phylolm phyloglm (package phylolm), nestedLogit (package nestedLogit).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.2","text":"Fixed issue get_variance() glmmTMB models rank deficient coefficients. Fixed issues get_weights() glm models without weights na.action set default model call. clean_names() now also removes relevel() pattern. Fixed issue model_info() models class gamlss. Fixed problems preventing get_data() locating data defined non-global environments. Fixed issue get_predicted() variables class numeric matrix created scale(), correctly handled get_data() failed find data appropriate environment. Fixed issue model_info() gee models binomial families.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0191","dir":"Changelog","previous_headings":"","what":"insight 0.19.1","title":"insight 0.19.1","text":"CRAN release: 2023-03-18","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-models-0-19-1","dir":"Changelog","previous_headings":"","what":"New supported models","title":"insight 0.19.1","text":"hglm (package hglm).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-19-1","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.19.1","text":"Minor improvements get_data() t.test(). format_value() gets lead_zero argument, keep drop leading zero formatted value, well arguments style_positive style_negative style positive negative numbers. format_table() now also formats columns named SGPV (second generation p-values) p-values. Functions models class clm (like find_formula(), find_variables(), get_data() etc.) now also include variables defined scale nominal component.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.1","text":"Fixed issue get_data() results kruskal.test(). Fixed issue find_weights() models class lme gls. Fixed issue get_datagrid() models multiple weight variables.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0190","dir":"Changelog","previous_headings":"","what":"insight 0.19.0","title":"insight 0.19.0","text":"CRAN release: 2023-01-30","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-models-0-19-0","dir":"Changelog","previous_headings":"","what":"New supported models","title":"insight 0.19.0","text":"mmrm (package mmrm), flac flic (logistf)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"breaking-changes-0-19-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"insight 0.19.0","text":"get_data() revised now always tries recover data used fit model environment. fails, falls back recovering data model frame (former default behaviour). Furthermore, source argument can used explicitly force old behaviour: source = \"mf\" try recover data model frame first, possibly falling back look environment.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-19-0","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.19.0","text":"n_grouplevels(), return random effect groups number group levels mixed models.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-19-0","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.19.0","text":"get_datagrid() preserves factor levels factors hold constant reference level. required work together get_modelmatrix() calculating standard errors get_predicted().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.0","text":"Fixed get_modelmatrix() handling incomplete factors sometimes downstream implications numerical results uncertainty estimates produced get_predicted(). Fixed minor issues HTML tables export_table() model parameters grouped. Fixed issue incorrect back-transforming get_data() models log-transformed variables. Fixes issue compact_list(). has_single_value() now returns FALSE object NA na.rm = TRUE. Fixed issue get_parameters() gam-models without smooth terms, smooth terms removed intercept.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0188","dir":"Changelog","previous_headings":"","what":"insight 0.18.8","title":"insight 0.18.8","text":"CRAN release: 2022-11-24","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-18-8","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.18.8","text":"Fixed test due changes performance package.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0187","dir":"Changelog","previous_headings":"","what":"insight 0.18.7","title":"insight 0.18.7","text":"CRAN release: 2022-11-18","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-18-7","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.18.7","text":"Minor revisions get_predicted.glmmTMB() due changes behaviour predict.glmmTMB() truncated-family models since glmmTMB 1.1.5. New function has_single_value() equivalent length(unique()) == 1 (n_unique() == 1) faster.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-18-7","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.18.7","text":"ellipses_info() now includes attribute $is_binomial, TRUE model binomial family.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-18-7","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.18.7","text":"Fixed behaviour argument get_datagrid(). Fixed issue accessing model data get_datagrid() edge cases.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0186","dir":"Changelog","previous_headings":"","what":"insight 0.18.6","title":"insight 0.18.6","text":"CRAN release: 2022-10-23","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-models-0-18-6","dir":"Changelog","previous_headings":"","what":"New supported models","title":"insight 0.18.6","text":"Support logitr package: get_data(), find_variables() .","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-18-6","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.18.6","text":"Better detection unicode-support, avoid failures building vignettes. get_predicted() now correctly handles variables class numeric matrix created scale(), fixes bug performance::check_model() (easystats/performance#432). Fixed issue iterations argument get_predicted() brms models.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0185","dir":"Changelog","previous_headings":"","what":"insight 0.18.5","title":"insight 0.18.5","text":"CRAN release: 2022-10-12","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"breaking-0-18-5","dir":"Changelog","previous_headings":"","what":"Breaking","title":"insight 0.18.5","text":"get_df(type = \"satterthwaite\") lmerMod objects now return degrees freedom per parameter, longer per observation. Use df_per_obs TRUE return degrees freedom per observation.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-18-5","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.18.5","text":"safe_deparse_symbol() deparses substituted expressions possible,increases performance case many calls deparse(substitute()).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-18-5","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.18.5","text":"format_table() gets use_symbols argument. TRUE, column names refer particular effectsizes (like Phi, Omega Epsilon) include related unicode-character instead written name. works Windows R >= 4.2, OS X Linux R >= 4.0. stars argument format_table() can now also character vector, naming columns include stars significant values. especially useful Bayesian models, might multiple columns significant values, e.g. \"BF\" Bayes factor \"pd\" probability direction. get_df() gets type options return different type degrees freedom (namely, \"wald\" \"normal\", mixed models, \"ml1\", \"betwithin\", \"satterthwaite\" \"kenward-roger\"). standardize_names() now recognized classes package marginaleffects. Minor improvements find_parameters() models nonlinear formula. Minor speed improvements.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-18-5","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.18.5","text":"Fixed issue get_data() models class plm, accidentally converted factors character vectors. Fixed issue column alignment export_table() data frame print contained unicode-characters longer 1 byte. Correctly extract predictors fixest::(f1, .f2) interactions (#649 @grantmcdermott).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0184","dir":"Changelog","previous_headings":"","what":"insight 0.18.4","title":"insight 0.18.4","text":"CRAN release: 2022-09-20","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-18-4","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.18.4","text":"model_info() now includes information htest objects shapiro.test() bartlett.test() (return $is_variancetest = TRUE).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-18-4","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.18.4","text":"Fixed issue get_data() correctly backtransform original data terms log-transformations log(1 + x) log(x + 1). Fixed CRAN check issues.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0183","dir":"Changelog","previous_headings":"","what":"insight 0.18.3","title":"insight 0.18.3","text":"CRAN release: 2022-09-18","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-18-3","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.18.3","text":"format_alert(), format_warning() format_error(), convenient wrappers around message(), warning() stop() combination format_message(). can use funcionts format messages, warnings errors.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-18-3","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.18.3","text":"get_predicted() models class clm now includes confidence intervals predictions. format_message() gets additional formatting features. See ‘Details’ ?format_message information current limitations. format_message() gets indent argument, specify indention string subsequent lines. format_table() now merges IC IC weights columns one column (e.g., former columns \"AIC\" \"AIC_wt\" now printed one column, named \"AIC (weights)\"). Furthermore, ic_digits argument added control number significant digits IC values. print_color() color_text() now support bright variants colors background colors. get_datagrid() gets options range, provide control generate reference grid. get_data() models class geeglm fixestnow reliably retrieves model data.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-models-0-18-3","dir":"Changelog","previous_headings":"","what":"New supported models","title":"insight 0.18.3","text":"Support models class mblogit mclogit.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-18-3","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.18.3","text":"Fixed issues wrong attribute adjusted_for insight::get_datagrid(). Fixed issue (resp. implemented workaround) get_data.iv_robust(), failed due bug estimatr package. Fixed issue get_predicted() failed data contains factors one incomplete levels. Fixed issue get_predicted() models class mlm. Fixed issue get_predicted() failed compute confidence intervals predictions model contained matrix-alike response columns, e.g. response variable created cbind().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0182","dir":"Changelog","previous_headings":"","what":"insight 0.18.2","title":"insight 0.18.2","text":"CRAN release: 2022-08-10","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-18-2","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.18.2","text":"format_percent() short-cut format_value(as_percent = TRUE). is_converged(), check whether mixed model converged .","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-18-2","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.18.2","text":"format_table() gains exact argument, either report exact rounded Bayes factors. get_predicted() gets method models class gamlss (thereby, get_loglikelihood() now also works model classes). get_predicted() now better handles models class polr, multinom rlm.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-18-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.18.2","text":"Fixed test failures. Minor fixes address changes packages.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0180","dir":"Changelog","previous_headings":"","what":"insight 0.18.0","title":"insight 0.18.0","text":"CRAN release: 2022-07-05","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"breaking-changes-0-18-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"insight 0.18.0","text":"ci argument get_predicted() now defaults NULL. One reason make function faster confidence intervals required, case many downstream usages function. Please set ci explicitly compute confidence intervals predictions. get_data() longer returns logical types numeric variables converted logicals --fly within formulas (like y ~ .logical(x)). Instead, numeric variable coerced logical within formula gets logical attribute (set TRUE), returned data frame gets logicals attribute including names affected variables. parameters_table(), alias format_table(), removed.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-18-0","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.18.0","text":"find_transformation() get_transformation() now also work models response transformed using log2() log10().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-18-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.18.0","text":"get_sigma() models package VGAM returned wrong sigma-parameter. find_predictors() models package fixest contained interaction terms endogenous formula part correctly return instruments. Fixed formatting HTML table footers export_table(). Several fixes get_predicted() models mgcv::gam(). component argument find_parameters() stanmvreg models accept \"location\" value. null_model() consider offset-terms specified inside formulas. Argument allow.new.levels passed predict() get_predicted.glmmTMB(). clean_names() now works correctly several variables specified s() (#573, @etiennebacher).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0171","dir":"Changelog","previous_headings":"","what":"insight 0.17.1","title":"insight 0.17.1","text":"CRAN release: 2022-05-13","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-17-1","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.17.1","text":"deltaMethod (car), marginaleffects, marginaleffects.summary (marginaleffects)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-17-1","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.17.1","text":"get_predicted() now supports models class iv_robust ivreg. get_predicted(), type predict given, type overwrite predict. Note print message, predict preferred argument. get_varcov() gains vcov vcov_args arguments, specify variance-covariance matrix used compute uncertainty estimates (e.g., robust standard errors). get_loglikehood() improved handling models package estimator.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-17-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.17.1","text":"Fixed bug get_data() model objects whose data needs recovered environment, data name reserved word (e.g., named like R function). matrix returned get_varcov() models class bife now returns row column names. find_offset() find offset-terms merMod objects offset specified offset argument function call.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0170","dir":"Changelog","previous_headings":"","what":"insight 0.17.0","title":"insight 0.17.0","text":"CRAN release: 2022-03-29","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"breaking-changes-0-17-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"insight 0.17.0","text":"Arguments vcov_estimation vcov_type get_predicted(), get_predicted_se() get_predicted_ci() replaced vcov vcov_args, simplified common interface control robust covariance matrix estimation.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-17-0","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.17.0","text":"Improved performance various functions, particular get_data() model_info().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-17-0","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.17.0","text":"check names: object_has_names() object_has_rownames() work lists: is_empty_object() compact_list() work strings: compact_character() utility functions safe_deparse(), trim_ws() n_unique().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-17-0","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.17.0","text":"export_table() now better checks invalid values caption footer tables HTML format, silently removes, e.g., ansi-colour codes work text-format. get_data.coxph() returns original data frame instead data type coercion. get_loglikelihood() gets check_response argument, check model transformed response variable (like log() sqrt() transformation), , returns corrected log-likelihood. get_modelmatrix() now supports BayesFactor models. get_loglikelihood() get_df() now support model classes. get_predicted() improved multinomial models brms. get_variance() improved cover edge cases (complex) random effect structures. get_data() now includes variables returned data frame used subset argument regression functions (like lm()). edge cases, get_data() unable retrieve data used fit model, now informative error printed. ellipses_info() now also accepts list model objects, stable returns information provided models (like fixed random effects across models, models mixed models null-models, etc.) check_if_installed() now works interactively lets user prompt whether automatically update install packages.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-17-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.17.0","text":"Fixed incorrect column name conversion standardize_names() certain columns returned broom::glance(). Fixed issue correctly detecting Tweedie-models model_info(). Fixed issue get_datagrid() brms models monotonic factors. Fixed issue find_formula() argument correlation defined outside lme() gls() (@etiennebacher, #525). Fixed issue get_data() back-transforming data predictors used cos(), sin() tan() transformations.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0160","dir":"Changelog","previous_headings":"","what":"insight 0.16.0","title":"insight 0.16.0","text":"CRAN release: 2022-02-16","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-16-0","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.16.0","text":"get_datagrid(), generate reference grid, usually used computing adjusted predictions marginal means regression models.","code":""},{"path":[]},{"path":"https://easystats.github.io/insight/news/index.html","id":"get_predicted-0-16-0","dir":"Changelog","previous_headings":"Changes to functions","what":"get_predicted()","title":"insight 0.16.0","text":"get_predicted() revised. Beside four core options predict argument, now also possible use value valid model’s predict() method’s type argument. get_predicted() now supports models (e.g., packages like GLMMadaptive survival). get_predicted() now robust calculating standard errors predictions.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"other-functions-0-16-0","dir":"Changelog","previous_headings":"Changes to functions","what":"Other functions","title":"insight 0.16.0","text":"get_statistic() find_statistic() now support htest objects.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-16-0","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.16.0","text":"Various minor improvements.","code":""},{"path":[]},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-15-1","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.15.1","text":"Improved speed performance, especially get_data().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-15-1","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.15.1","text":"get_data() coxph models now returns original factor levels variables transformed strata() inside formulas.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0150","dir":"Changelog","previous_headings":"","what":"insight 0.15.0","title":"insight 0.15.0","text":"CRAN release: 2022-01-07","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"breaking-changes-0-15-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"insight 0.15.0","text":"Data management functions (like reshape_longer(), data_match()) moved datawizard package. get_data() longer returns factor types numeric variables converted factors --fly within formulas (like y ~ .factor(x)). Instead, numeric variable coerced factor within formula gets factor attribute (set TRUE), returned data frame gets factors attribute including names affected variables.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-15-0","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.15.0","text":"Support bfsl (bfsl)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-15-0","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.15.0","text":"New standardize_column_order() function can used standardize column order output dataframes.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-15-0","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.15.0","text":"Improved speed performance functions. Improved handling table captions footers export_table(). See also new vignette exporting data frames human readable tables : https://easystats.github.io/insight/articles/export.html Revised width argument export_table(), now allows set different column widths across table columns. See examples ?export_table. export_table() gets table_width argument split wide tables two parts. get_varcov() MixMod (package GLMMadaptive) revised, now allows return robust variance-covariance matrix. Added get_df() methods.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-15-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.15.0","text":"Fixed issues manual sigma computation handle dispersion models get_sigma(). Fixed issue find_formula() BayesFactor::lmBF() multiple random effects. Fixed issue get_parameters.BFBayesFactor() wrong sign difference estimate t-tests. Argument width format_value() ignored formatting integer values protect_integers set TRUE.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0145","dir":"Changelog","previous_headings":"","what":"insight 0.14.5","title":"insight 0.14.5","text":"CRAN release: 2021-10-16","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-14-5","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.14.5","text":"find_transformation() get_transformation() find get function used transform response variable regression model.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-14-5","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.14.5","text":"Improved support models class sampleSelection. Improved documentation. get_modelmatrix() now supports: rms::lrm get_predicted() supports: MASS::polr, MASS::rlm, rms::lrm, fixest, bife::bife, ordinal::clm. get_predicted() standard errors often much faster compute. get_predicted() supports models “grouped” “level” outcomes (e.g., multinomial logit). get_predicted() handles factors better. Improved documentation","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-14-5","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.14.5","text":"check_if_installed() gains quietly argument, neither stopping warning message non-installed packages requested. get_predicted()’s predict argument now accepts values: “link”, “expectation”, “prediction”, “classification”, NULL. get_predicted() accepts predict=NULL, allows users push type argument ... ellipsis, forward predict() method modelling package.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-14-5","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.14.5","text":"Fixed issue parameter names emmeans objects get_parameters(). Fixed issues unknown arguments get_predicted().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0144","dir":"Changelog","previous_headings":"","what":"insight 0.14.4","title":"insight 0.14.4","text":"CRAN release: 2021-09-02","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-14-4","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.14.4","text":"Fixed issues due latest brms update.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0143","dir":"Changelog","previous_headings":"","what":"insight 0.14.3","title":"insight 0.14.3","text":"CRAN release: 2021-08-17","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-14-3","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.14.3","text":"systemfit (systemfit)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-14-3","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.14.3","text":"Minor improvements functions support printing outputs.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-14-3","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.14.3","text":"get_predicted() gains new option, predict = \"response\" binomial models. Improved stability get_variance() computing random-slope-intercept correlation categorical random slopes. Improved get_priors() brms models.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-14-3","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.14.3","text":"Fixed issue get_data() brms models auxiliary parameters. Fixed issue find_formula() brms models auxiliary parameters. Fixed issue get_data() htest objects always preserve factors. Fixed issue format_table() ci-levels longer fractional part.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0142","dir":"Changelog","previous_headings":"","what":"insight 0.14.2","title":"insight 0.14.2","text":"CRAN release: 2021-06-22","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-14-2","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.14.2","text":"check_if_installed() gains minimum_version argument, check installed package older specified version number. package argument check_if_installed() now vectorized, can check multiple packages one function call. Value formatting functions (like format_value() format_ci()) can now round significant digits using digits = \"signif\".","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-14-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.14.2","text":"Fixed issue model_info() stan_polr() models. Fixed issue find_parameters() brms model contained parameters priors sigma. Fixed issue n_obs() stats4::mle() models. Fixed failing tests due latest fixest update. Fixed issues due latest epiR update.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0141","dir":"Changelog","previous_headings":"","what":"insight 0.14.1","title":"insight 0.14.1","text":"CRAN release: 2021-05-28","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-14-1","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.14.1","text":"Added several data management preparation functions: data_to_long(), data_match(), data_relocate(), data_restoretype(), force_numeric().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-14-1","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.14.1","text":"Support pgmm (plm)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-14-1","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.14.1","text":"Improved handling auxiliary parameters stanreg models.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-14-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.14.1","text":"Stability improvements get_predicted(). Fixed issues accessing information afex_aov model empty aov slot (anticipation afex v.1.0.0). Fixed issue model_info() stanreg object non-standard model-family specification.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0140","dir":"Changelog","previous_headings":"","what":"insight 0.14.0","title":"insight 0.14.0","text":"CRAN release: 2021-05-07","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-14-0","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.14.0","text":"Better support accessing auxiliary parameters (via get_sigma() get_auxiliary(), well get_parameters(component = \"\")) brmsfit models.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-14-0","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.14.0","text":"get_modelmatrix() robust alternative model.matrix() different model classes. format_message() format warnings messages adjusting maximum line_length, possibly width console window. format_string() shorten string maximum length. check_if_installed() see needed package installed.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-14-0","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.14.0","text":"Support mvord (mvord), SemiParBIV (GJRM), selection (sampleSelection)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-14-0","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.14.0","text":"find_formula() now warns data name present formula, since can result unexpected behaviour package functions. model_info() returns is_bernoulli = TRUE Bernoulli models. Add get_statistic() lavaan models. get_df() supports models/objects. get_sigma() supports models/objects. get_sigma() get_deviance() lrm models (package rms) now return one value, sigma deviance model intercept predictors. get_deviance() now works glmerMod, MixMod glmmTMB models. behaviour documentation effects component arguments, particular brmsfit models, revised consistent. export_table() now correctly prints footer input list data frames.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-14-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.14.0","text":"Fixed issue (warning) get_loglikelihood() binomial models non-numeric response variables. find_statistic() correctly distinguishes t- z-statistic emmGrid objects. Fixed issue model_info() BGGM mgcv::gam(). Fixed issue find_formula() gamlss models random() function formula. Fixed issue find_parameters() brmsfit models auxiliary parameters directly modelled. Fixed issue get_parameters() find_parameters() multi-group blavaan models. Fixed issue ellipsis_info() detecting nested models poly-terms. Fixed issue find_response() brmsfit models used resp_thres() function model formula. Fixed issue get_predicted_ci() models rank-deficient model matrix. Argument zap_small format_value() work properly vectorized vectors.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0132","dir":"Changelog","previous_headings":"","what":"insight 0.13.2","title":"insight 0.13.2","text":"CRAN release: 2021-04-01","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-13-2","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.13.2","text":"get_predicted() revamped new API stable output form (vector). course revision, new function get_predicted_ci() calculate uncertainty intervals model predictions. Improved support orm (rms).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-13-2","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.13.2","text":"Support svy_vglm (svyVGAM), mjoint (joineRML), mhurdle (mhurdle), sarlm (spatialreg), model_fit (tidymodels)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-13-2","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.13.2","text":"is_gam_model() small helper check model generalized additive model smooth terms.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-13-2","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.13.2","text":"Added iterations argument get_predicted() control number draws returned Bayesian models. model_info() now returns $is_gam model generalized additive model smooth terms. format_table() export_table() now check valid input (e.g., non-empty data frame) give informative message. Improved support MixMod (GLMMadaptive) get_variance(). Improved print_parameters(), allow flexibility better cope different output formats. get_parameters(), find_parameters() clean_parameters() emmGrid emm_list objects revised now better match actual parameter names (also contrasts).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-13-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.13.2","text":"Fixed issue get_variance() models without intercept. Fixed labelling issue get_parameters() clean_parameters() blavaan models. clean_parameters() MCMCglmm objects include random parameters. Fixed minor issue unintended sub-titles print_html(). Fixed issue get_prior() rstanarm::R2() priors.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0131","dir":"Changelog","previous_headings":"","what":"insight 0.13.1","title":"insight 0.13.1","text":"CRAN release: 2021-02-22","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-13-1","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.13.1","text":"Improved handling GAMs.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-13-1","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.13.1","text":"Support elm, eglm (eflm)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-13-1","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.13.1","text":"get_residuals(..., weighted = TRUE) doesn’t throw warnings weights 1 (weights specified). n_parameters() gains only_estimable argument, remove non-estimable parameters counting number parameters models rank-deficient model matrix. format_ci() also gains zap_small argument.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixed-0-13-1","dir":"Changelog","previous_headings":"","what":"Bug fixed","title":"insight 0.13.1","text":"Fix disable failing tests Mac OS. Fixed issues get_variance() non-correlated random-slope-intercepts lme4 models.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0130","dir":"Changelog","previous_headings":"","what":"insight 0.13.0","title":"insight 0.13.0","text":"CRAN release: 2021-02-15","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-13-0","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.13.0","text":"Roll-back R dependency R >= 3.4.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-13-0","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.13.0","text":"Support crr (cmprsk), ergm (ergm), btergm (btergm), Rchoice (Rchoice), garch (tseries)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-13-0","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.13.0","text":"Slightly improved handling different CI-columns format_table(). model_info() now returns $is_leventest model object returned car::leveneTest(). get_parameters() supports htest objects.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-13-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.13.0","text":"get_varcov() properly remove NA rank-deficient models. Fixed issue/warning get_data() htest objects, environment properly evaluated. Fixed issue format_table() p-value formatting, input data frame contained column named \"p\", numeric. (Hopefully) fixed issue failing CRAN checks.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0120","dir":"Changelog","previous_headings":"","what":"insight 0.12.0","title":"insight 0.12.0","text":"CRAN release: 2021-01-14","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"breaking-changes-0-12-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"insight 0.12.0","text":"format_table() alias parameters_table(), longer referring export_table().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-12-0","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.12.0","text":"Support coxr (coxrobust), coeftest (lmtest), ivFixed (ivFixed), ivprobit (ivprobit), riskRegression (riskRegression). summary.lm, lmodel2 (lmodel2), improved support bamlss (bamlss).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-12-0","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.12.0","text":"Added get_deviance() function returns model deviance robust alternative stats::deviance(). Added model_name() function returns model’s “name”. Added format() method find_formula() output flatten . Added null_as_ones = TRUE argument get_weights() return vector 1s instead NULL. Added get_intercept() helper function easily retrieve value intercept. Added get_df() robust alternative stats::df.residuals(). Added get_predicted() robust alternative stats::fitted(). Added get_loglikelihood() (alias loglikelihood()) function robust alternative stats::logLik(). Added get_residuals() robust alternative extract model residuals. Added ellipsis_info() specify nature ellipsis (...) inputs. Added is_nested_models() check multiple regression models nested (decreasing increasing). Added generic print_html(), allow packages create tables HTML format (via export_table()) printing output console. Added is_mixed_model(), safely check model mixed effects model. function also works multivariate response models. n_parameters() moved parameters insight.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-12-0","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.12.0","text":"find_formula(), find_predictor(), find_random() related functions now also return names random effects generalized additive mixed models (gamm, gamm4, stan_gamm4). Added support BFBayesFactor objects. model_info() now returns $is_xtab chisq.test() BayesFactor::contingencyTableBF(). Furthermore, $family element objects set \"categorical\". n_obs() now handles number observations models binomial family correctly matrix-columns response variable.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-12-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.12.0","text":"Fixed issue find_statistic() fixest models, return correct value \"t-statistic\" feols(). Fixes inconsistencies get_priors() (linear) BFBayesFactor models.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0111","dir":"Changelog","previous_headings":"","what":"insight 0.11.1","title":"insight 0.11.1","text":"CRAN release: 2020-12-08","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-11-1","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.11.1","text":"Warnings formerly printed using print_color() now use warning(), better suppress warning messages required.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-11-1","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.11.1","text":"find_smooth(), return particular smooth terms used model.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-11-1","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.11.1","text":"get_variance() get_variance_random() gain tolerance-argument, set tolerance level singularity checks computing random effect variances. parameters_table() formats objects easystats packages, like ROPE-range p_rope(). find_statistic() now supports models class scam. get_data() now also supports htest-object, possible.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-11-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.11.1","text":"Fix CRAN check issues. find_formula() stan_gamm4() now correctly includes random effects.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0110","dir":"Changelog","previous_headings":"","what":"insight 0.11.0","title":"insight 0.11.0","text":"CRAN release: 2020-11-24","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"breaking-changes-0-11-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"insight 0.11.0","text":"model_info() now also detects models oneway.test(), binom.test() chisq.test(), mcnemar.test() prop.test(). Furthermore, model_info() better deals objects BFBayesFactor, censored regression models longer return TRUE $is_linear. format_table() going renamed future update. Please use alias export_table().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-11-0","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.11.0","text":"Support scam (scam), meta_random meta_fixed (metaBMA), Glm (rms), ridgelm (MASS), mediate (mediation). Partial support mcmc.list (e.g. bayesGARCH)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-function-0-11-0","dir":"Changelog","previous_headings":"","what":"New function","title":"insight 0.11.0","text":"parameters_table(), moved package parameters insight. Note function going renamed format_table() future update. find_offset(), find name offset-terms. Added generics display() print_md(), allow packages create tables formats printing output console.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-11-0","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.11.0","text":"standardize_names() tries loyal broom-naming conventions possible. function brackets-argument format_ci() changed. now also possible provide length-two character vector, define brackets encompass CI-values. Related change format_ci(), function brackets-argument parameters_table() changed accordingly. Furthermore, parameters_table() gains preserve_attributes-argument, preserve attributes input data frame. export_table() gains several new arguments allows create tables markdown-format. print_parameters() gains keep_parameter_column-argument, keep (default) \"Cleaned_Parameter\" \"Parameter\" columns, - FALSE - use \"Cleaned_Parameter\" new \"Parameter\" column.","code":""},{"path":[]},{"path":"https://easystats.github.io/insight/news/index.html","id":"get_data-0-11-0","dir":"Changelog","previous_headings":"Bug fixes","what":"get_data()","title":"insight 0.11.0","text":"Fixed issue get_data() MixMod objects, caused due internal changes GLMMadaptive. get_data() zero-inflated models pscl include offset-term cases offset defined argument, inside model formula. Fixed issue get_data() coxph models survival-objects event-argument response. Fixed edge case get_data() column name response values log-transformed using log(x+1).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"other-bug-fixes-0-11-0","dir":"Changelog","previous_headings":"Bug fixes","what":"Other bug fixes","title":"insight 0.11.0","text":"Fixed issue survreg models included strata() formula. Fixed warning CRAN checks forthcoming R-devel.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0100","dir":"Changelog","previous_headings":"","what":"insight 0.10.0","title":"insight 0.10.0","text":"CRAN release: 2020-10-22","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-function-0-10-0","dir":"Changelog","previous_headings":"","what":"New function","title":"insight 0.10.0","text":"get_sigma() return residual standard deviation. standardize_names(), moved package parameters insight.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-10-0","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.10.0","text":"Support maov (stats), HLfit (spaMM), preliminary support margins (margins), merModList (merTools).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-10-0","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.10.0","text":"Better support (weighted) multivariate response models class mlm functions like get_varcov() clean_parameters(). Make find_formula() work t-tests BayesFactor. Improved handling mira objects.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-10-0","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.10.0","text":"format_bf() gains na_reference argument, set “reference” Bayes factor values NA, exact argument returning scientific formatted extreme values. format_value() gains zap_small argument, prevent scientific printing numbers decimal places indicated digits. get_weights() now also returns NULL weights 1. get_parameters() BFBayesFactor objects gets verbose argument. get_parameters() emmGrid emm_list objects gets summary argument, either return full posterior samples summarized centrality indices Bayesian models. find_formula() MuMIn::model.avg() now tries retrieve random effects part formula, present. get_weights() gains na_rm argument remove possible missing values.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-10-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.10.0","text":"Fix issues one-sample Bayesian t-tests ( https://github.com/easystats/parameters/issues/297 ). Fix issue format_value() printed \"100%\" \"1e+02%\". Removed unnecessary white-spaces format_ci() upper lower interval larger 1e+5. has_intercept() work correctly intercept removed formula using -1. find_terms() now shows removal intercept formula using -1 term \"-1\". Fix issues get_statistic() vgam models.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-096","dir":"Changelog","previous_headings":"","what":"insight 0.9.6","title":"insight 0.9.6","text":"CRAN release: 2020-09-20","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-9-6","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.9.6","text":"get_data() now works models afex_aov(). get_parameters() returns informative message BFBayesFactor objects first model indexed. clean_names() now also removes exp()-pattern. clean_names() character-objects now works “interaction patterns” (like clean_names(\"scale():scale(b)\")). format_bf() gains protect_ratio argument, print numbers smaller 1 ratios.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-9-6","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.9.6","text":"Fix issues CRAN checks. get_priors() now works complex BFBayesFactor objects multiple custom priors.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-095","dir":"Changelog","previous_headings":"","what":"insight 0.9.5","title":"insight 0.9.5","text":"CRAN release: 2020-09-07","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"breaking-changes-0-9-5","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"insight 0.9.5","text":"get_data() always “back-transform” log-transformed scaled variables return original values. Now bug fixed, get_data() return variables original scale (variables transformed), stated docs.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-9-5","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.9.5","text":"get_data() now returns correct original data “empty” polynomials (.e. poly(x, 1)). Fix CRAN check issues due latest estimatr update.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-091","dir":"Changelog","previous_headings":"","what":"insight 0.9.1","title":"insight 0.9.1","text":"CRAN release: 2020-08-26","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-9-1","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.9.1","text":"Support mipo (mice), lqmm lqm (lqmm). Preliminary support semLME (smicd), mle (stats4) mle2 (bbmle).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-9-1","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.9.1","text":"model_info() returns $is_meta = TRUE brms-meta-analysis models. Make find_statistic() work mgcv::bam(). get_variance() now also support truncated_nbinom2() family glmmTMB.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-9-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.9.1","text":"Fixed issue correctly detecting sigma-parameters find_parameters() multiple-response brmsfit-models. Fixed issue find_formula() models stan_nlmer(). Fixed issues find_terms() response variable included namespace, like survival::Surv(). Fixed issues get_priors() stanreg models, probably caused latest update rstanarm 2.21.2. Fixed issues get_variance() brmsfit models. Fixed issues around crq objects (package quantreg).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-090","dir":"Changelog","previous_headings":"","what":"insight 0.9.0","title":"insight 0.9.0","text":"CRAN release: 2020-07-20","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-9-0","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.9.0","text":"BGGM (BGGM), metaplus (metaplus), glht (multcomp), glmm (glmm), improved support manova (stats)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-9-0","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.9.0","text":"Value formatting functions format_bf(), format_pd(), format_p(), format_rope() format_number() moved package parameters insight.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-9-0","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.9.0","text":"get_variance() now also returns correlation among random slopes. get_variance() now also (partially) supports brmsfit models. get_parameters() models return (posterior simulated) samples model parameters gains summary-argument, - TRUE - returns point-estimate (mean samples) instead full samples. format_p() returns \"> .999\" p-values equal greater 0.999.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-9-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.9.0","text":"Fixed issue find_formula() properly work models random effects formula (lme4 notation), random effects fixed effects parts. get_variance() return variance components random effects null-models random slopes. Fixed issue get_variance() lme-models categorical random slope. Fixed issue occurred since R 4.0.0 find_weights() function call weights-argument. Fixed issue get_data() models cbind()-response variables matrix-like variables model frame (e.g. using poly()). Fixed issues PROreg::BBmm(), due changes latest package update.","code":""}] +[{"path":[]},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement d.luedecke@uke.de. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://easystats.github.io/insight/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://easystats.github.io/insight/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to insight","title":"Contributing to insight","text":"outlines propose change insight.","code":""},{"path":"https://easystats.github.io/insight/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"","what":"Fixing typos","title":"Contributing to insight","text":"Small typos grammatical errors documentation may edited directly using GitHub web interface, long changes made source file. want fix typos documentation, please edit related .R file R/ folder. edit .Rd file man/.","code":""},{"path":"https://easystats.github.io/insight/CONTRIBUTING.html","id":"filing-an-issue","dir":"","previous_headings":"","what":"Filing an issue","title":"Contributing to insight","text":"easiest way propose change new feature file issue. ’ve found bug, may also create associated issue. possible, try illustrate proposal bug minimal reproducible example.","code":""},{"path":"https://easystats.github.io/insight/CONTRIBUTING.html","id":"pull-requests","dir":"","previous_headings":"","what":"Pull requests","title":"Contributing to insight","text":"Please create Git branch pull request (PR). contributed code roughly follow R style guide, particular easystats convention code-style. insight uses roxygen2, Markdown syntax, documentation. insight uses testthat. Adding tests PR makes easier merge PR code base. PR user-visible change, may add bullet top NEWS.md describing changes made. may optionally add GitHub username, links relevant issue(s)/PR(s).","code":""},{"path":"https://easystats.github.io/insight/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to insight","text":"Please note project released Contributor Code Conduct. participating project agree abide terms.","code":""},{"path":"https://easystats.github.io/insight/SUPPORT.html","id":null,"dir":"","previous_headings":"","what":"Getting help with {insight}","title":"Getting help with {insight}","text":"Thanks using insight. filing issue, places explore pieces put together make process smooth possible. Start making minimal reproducible example using reprex package. haven’t heard used reprex , ’re treat! Seriously, reprex make R-question-asking endeavors easier (pretty insane ROI five ten minutes ’ll take learn ’s ). additional reprex pointers, check Get help! resource used tidyverse team. Armed reprex, next step figure ask: ’s question: start StackOverflow. people answer questions. ’s bug: ’re right place, file issue. ’re sure: let’s discuss try figure ! problem bug feature request, can easily return report . opening new issue, sure search issues pull requests make sure bug hasn’t reported /already fixed development version. default, search pre-populated :issue :open. can edit qualifiers (e.g. :pr, :closed) needed. example, ’d simply remove :open search issues repo, open closed. Thanks help!","code":""},{"path":"https://easystats.github.io/insight/articles/display.html","id":"the-difference-between-a-dataframe-and-its-render","dir":"Articles","previous_headings":"","what":"The difference between a dataframe and its render","title":"Formatting, printing and exporting tables","text":"objects encountered throughout {easystats} packages “tables”, .e., 2D matrix columns rows. R, objects often, core, data frames. Let’s create one use example: display console (calling object - e.g. df - actually equivalent calling print(df)), output looks alright, improved. packages, {knitr}, functions create nicer output. instance, markdown, can nicely rendered markdown documents copied: HTML, makes look great HTML files (webpage ’re reading):","code":"library(insight) df <- data.frame( Variable = c(1, 3, 5, 3, 1), Group = c(\"A\", \"A\", \"A\", \"B\", \"B\"), CI = c(0.95, 0.95, 0.95, 0.95, 0.95), CI_low = c(3.35, 2.425, 6.213, 12.1, 1.23), CI_high = c(4.23, 5.31, 7.123, 13.5, 3.61), p = c(0.001, 0.0456, 0.45, 0.0042, 0.34) ) df #> Variable Group CI CI_low CI_high p #> 1 1 A 0.95 3.350 4.230 0.0010 #> 2 3 A 0.95 2.425 5.310 0.0456 #> 3 5 A 0.95 6.213 7.123 0.4500 #> 4 3 B 0.95 12.100 13.500 0.0042 #> 5 1 B 0.95 1.230 3.610 0.3400 knitr::kable(df, format = \"markdown\") | Variable|Group | CI| CI_low| CI_high| p| |--------:|:-----|----:|------:|-------:|------:| | 1|A | 0.95| 3.350| 4.230| 0.0010| | 3|A | 0.95| 2.425| 5.310| 0.0456| | 5|A | 0.95| 6.213| 7.123| 0.4500| | 3|B | 0.95| 12.100| 13.500| 0.0042| | 1|B | 0.95| 1.230| 3.610| 0.3400| knitr::kable(df, format = \"html\")"},{"path":"https://easystats.github.io/insight/articles/display.html","id":"the-insight-workflow","dir":"Articles","previous_headings":"","what":"The insight workflow","title":"Formatting, printing and exporting tables","text":"{insight} package also contains function improve “printing”, rendering, tables. design dissociates two separate independent steps: formatting exporting.","code":""},{"path":"https://easystats.github.io/insight/articles/display.html","id":"formatting","dir":"Articles","previous_headings":"The insight workflow","what":"Formatting","title":"Formatting, printing and exporting tables","text":"purpose formatting improve given table, still keeping regular R data frame, can instance modified user. can see, format_table() modifies columns, turning number characters (amount digits), detecting confidence intervals. usually combined column-specific formatting functions, like format_p():","code":"format_table(df) #> Variable Group 95% CI p #> 1 1.00 A [ 3.35, 4.23] 0.001 #> 2 3.00 A [ 2.42, 5.31] 0.046 #> 3 5.00 A [ 6.21, 7.12] 0.450 #> 4 3.00 B [12.10, 13.50] 0.004 #> 5 1.00 B [ 1.23, 3.61] 0.340 df %>% mutate(p = format_p(p, stars = TRUE)) %>% format_table() #> Variable Group 95% CI p #> 1 1.00 A [ 3.35, 4.23] p = 0.001** #> 2 3.00 A [ 2.42, 5.31] p = 0.046* #> 3 5.00 A [ 6.21, 7.12] p = 0.450 #> 4 3.00 B [12.10, 13.50] p = 0.004** #> 5 1.00 B [ 1.23, 3.61] p = 0.340"},{"path":"https://easystats.github.io/insight/articles/display.html","id":"using-unicode-symbols-as-effect-size-names","dir":"Articles","previous_headings":"","what":"Using unicode symbols as effect size names","title":"Formatting, printing and exporting tables","text":"use_symbols = TRUE, possible render certain effect size names symbols, used column names. Note works OS X Linux, Windows R 4.2 higher. combination export_table() (see next section), give nicely formatted tables.","code":"x <- data.frame( phi_adjusted = 0.3, Glass_delta = 0.4, Epsilon2 = 0.7, R2 = 0.4 ) # standard output format_table(x) # column names of effect sizes as symbols format_table(x, use_symbols = TRUE) export_table(format_table(x, use_symbols = TRUE))"},{"path":"https://easystats.github.io/insight/articles/display.html","id":"exporting","dir":"Articles","previous_headings":"Using unicode symbols as effect size names","what":"Exporting","title":"Formatting, printing and exporting tables","text":"next step exporting, takes data frame renders given format, looks good console, markdown, HTML latex. markdown HTML, simply change format argument markdown (“md”)… …HTML format. can combined format_table(). TODO: display?","code":"export_table(df) #> Variable | Group | CI | CI_low | CI_high | p #> ----------------------------------------------------- #> 1 | A | 0.95 | 3.35 | 4.23 | 1.00e-03 #> 3 | A | 0.95 | 2.42 | 5.31 | 0.05 #> 5 | A | 0.95 | 6.21 | 7.12 | 0.45 #> 3 | B | 0.95 | 12.10 | 13.50 | 4.20e-03 #> 1 | B | 0.95 | 1.23 | 3.61 | 0.34 export_table(df, format = \"md\") export_table(df, format = \"html\") df %>% format_table(ci_brackets = c(\"(\", \")\")) %>% export_table(format = \"html\")"},{"path":"https://easystats.github.io/insight/articles/export.html","id":"exporting-data-frames-into-nice-tables","dir":"Articles","previous_headings":"","what":"Exporting data frames into nice tables","title":"Exporting tables with captions and footers","text":"export_table() functions creates nicely formatted tables text, markdown HTML format. can add (coloured) captions footer lines table well, can even create multiple tables list data frames. vignette shows examples (focusing text output). Note export_table() returns formatted string, prints nicely (essentially just uses cat()). Note: vignettes includes example coloured text output. coloured text rendered vignette. Rather, try examples look results console!","code":"library(insight) x <- iris[1:3, c(1, 2, 5)] # the table as \"readable\" output export_table(x) #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa # see the underlying string unclass(export_table(x)) #> [1] \"Sepal.Length | Sepal.Width | Species\\n------------------------------------\\n 5.10 | 3.50 | setosa\\n 4.90 | 3.00 | setosa\\n 4.70 | 3.20 | setosa\\n\""},{"path":"https://easystats.github.io/insight/articles/export.html","id":"adding-coloured-titles","dir":"Articles","previous_headings":"","what":"Adding (coloured) titles","title":"Exporting tables with captions and footers","text":"title can added either using caption argument, adding string table_caption attribute. caption can also character vector length 2, first element caption, second name colour (see ?print_colour available options). helpful printing coloured table captions. Since coloured text rendered, provide screenshot example :","code":"# a simple caption export_table(x, caption = \"Title\") #> Title #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa # we use a new object, so \"x\" has no attributes yet out <- x attr(out, \"table_caption\") <- \"Another title\" export_table(out) #> Another title #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa # A red caption export_table(x, caption = c(\"# Title\", \"red\")) #> # Title #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa # same for attribute out <- x attr(out, \"table_caption\") <- c(\"*A green title*\", \"green\") export_table(out) #> *A green title* #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa"},{"path":"https://easystats.github.io/insight/articles/export.html","id":"adding-coloured-table-footers","dir":"Articles","previous_headings":"","what":"Adding (coloured) table footers","title":"Exporting tables with captions and footers","text":"Use footer argument add footer line table. also possible add string table_footer attribute. Coloured footers can added way captions.","code":"# colored caption, simple footer export_table( x, caption = c(\"# Title\", \"red\"), footer = \"Footer line\" ) #> # Title #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> Footer line # as attribute out <- x attr(out, \"table_caption\") <- c(\"*A green title*\", \"green\") attr(out, \"table_footer\") <- \"A simple footer\" export_table(out) #> *A green title* #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> A simple footer # colored caption and footer export_table( x, caption = c(\"# Title\", \"red\"), footer = c(\"Footer line in blue\", \"blue\") ) #> # Title #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> Footer line in blue # as attribute out <- x attr(out, \"table_caption\") <- c(\"*A green title*\", \"green\") attr(out, \"table_footer\") <- c(\"Footer line in blue\", \"blue\") export_table(out) #> *A green title* #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> Footer line in blue"},{"path":"https://easystats.github.io/insight/articles/export.html","id":"adding-subtitles","dir":"Articles","previous_headings":"","what":"Adding subtitles","title":"Exporting tables with captions and footers","text":"Subtitles can added using subtitle argument, table_subtitle attribute. Note must take care adding new-line characters.","code":"# colored caption, subtitle and footer export_table( x, caption = c(\"# Title\", \"red\"), subtitle = c(\"\\n A subtitle in yellow\", \"yellow\"), footer = c(\"Footer line in blue\", \"blue\") ) #> # Title #> A subtitle in yellow #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> Footer line in blue # as attribute out <- x attr(out, \"table_caption\") <- c(\"*A green title*\", \"green\") attr(out, \"table_subtitle\") <- c(\"\\nA yellow subtitle\", \"yellow\") attr(out, \"table_footer\") <- c(\"Footer line in blue\", \"blue\") export_table(out) #> *A green title* #> A yellow subtitle #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> Footer line in blue"},{"path":"https://easystats.github.io/insight/articles/export.html","id":"exporting-multiple-data-frames-into-multiple-tables","dir":"Articles","previous_headings":"","what":"Exporting multiple data frames into multiple tables","title":"Exporting tables with captions and footers","text":"Multiple data frames saved list() can used create multiple tables .","code":"x <- list( data.frame(iris[1:3, c(1, 2, 5)]), data.frame(iris[51:53, c(1, 3, 5)]), data.frame(iris[111:113, c(1, 4, 5)]) ) # three different tables export_table(x) #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> #> Sepal.Length | Petal.Length | Species #> ---------------------------------------- #> 7.00 | 4.70 | versicolor #> 6.40 | 4.50 | versicolor #> 6.90 | 4.90 | versicolor #> #> Sepal.Length | Petal.Width | Species #> -------------------------------------- #> 6.50 | 2.00 | virginica #> 6.40 | 1.90 | virginica #> 6.80 | 2.10 | virginica"},{"path":"https://easystats.github.io/insight/articles/export.html","id":"adding-table-captions-and-footers","dir":"Articles","previous_headings":"","what":"Adding table captions and footers","title":"Exporting tables with captions and footers","text":"multiple tables, also possible add caption table. Simply use list() strings caption argument, add table_caption attribute. data frame list. way can add multiple footers. Note, however, take care adding new-line characters. Finally, can even add multiple footer lines table, giving different color. case, list element character vector length 2 (first element caption, second name colour).","code":"# one caption for each table export_table(x, caption = list(\"Table 1\", \"Table 2\", \"Table 3\")) #> Table 1 #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> #> Table 2 #> #> Sepal.Length | Petal.Length | Species #> ---------------------------------------- #> 7.00 | 4.70 | versicolor #> 6.40 | 4.50 | versicolor #> 6.90 | 4.90 | versicolor #> #> Table 3 #> #> Sepal.Length | Petal.Width | Species #> -------------------------------------- #> 6.50 | 2.00 | virginica #> 6.40 | 1.90 | virginica #> 6.80 | 2.10 | virginica # add attribute to *each* data frame out <- x for (i in seq_along(out)) { attr(out[[i]], \"table_caption\") <- paste(\"Table\", i) } export_table(out) #> Table 1 #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> #> Table 2 #> #> Sepal.Length | Petal.Length | Species #> ---------------------------------------- #> 7.00 | 4.70 | versicolor #> 6.40 | 4.50 | versicolor #> 6.90 | 4.90 | versicolor #> #> Table 3 #> #> Sepal.Length | Petal.Width | Species #> -------------------------------------- #> 6.50 | 2.00 | virginica #> 6.40 | 1.90 | virginica #> 6.80 | 2.10 | virginica # add captions and footers for each table export_table( x, caption = list(\"Table 1\", \"Table 2\", \"Table 3\"), footer = list(\"Footer 1\\n\\n\", \"Footer 2\\n\\n\", \"Footer 3\\n\\n\") ) #> Table 1 #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> Footer 1 #> #> #> Table 2 #> #> Sepal.Length | Petal.Length | Species #> ---------------------------------------- #> 7.00 | 4.70 | versicolor #> 6.40 | 4.50 | versicolor #> 6.90 | 4.90 | versicolor #> Footer 2 #> #> #> Table 3 #> #> Sepal.Length | Petal.Width | Species #> -------------------------------------- #> 6.50 | 2.00 | virginica #> 6.40 | 1.90 | virginica #> 6.80 | 2.10 | virginica #> Footer 3 out <- x for (i in seq_along(out)) { attr(out[[i]], \"table_caption\") <- paste(\"Table\", i) attr(out[[i]], \"table_footer\") <- paste(\"Footer\", i, \"\\n\\n\") } export_table(out) #> Table 1 #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> Footer 1 #> #> #> Table 2 #> #> Sepal.Length | Petal.Length | Species #> ---------------------------------------- #> 7.00 | 4.70 | versicolor #> 6.40 | 4.50 | versicolor #> 6.90 | 4.90 | versicolor #> Footer 2 #> #> #> Table 3 #> #> Sepal.Length | Petal.Width | Species #> -------------------------------------- #> 6.50 | 2.00 | virginica #> 6.40 | 1.90 | virginica #> 6.80 | 2.10 | virginica #> Footer 3 # Colored table captions and multiple footers per table export_table( x, caption = list( c(\"Red Table 1\", \"red\"), c(\"Blue Table 2\", \"bue\"), c(\"Green Table 3\", \"green\") ), footer = list( list(c(\"Footer line 1\\n\", \"green\"), c(\"Second line\\n\\n\", \"red\")), list(c(\"Footer line A\\n\", \"blue\"), c(\"Second line\\n\\n\", \"green\")), list(c(\"Footer line I\\n\", \"yellow\"), c(\"Second line\\n\\n\", \"blue\")) ) ) #> Red Table 1 #> #> Sepal.Length | Sepal.Width | Species #> ------------------------------------ #> 5.10 | 3.50 | setosa #> 4.90 | 3.00 | setosa #> 4.70 | 3.20 | setosa #> Footer line 1 #> Second line #> #> #> Blue Table 2 #> #> Sepal.Length | Petal.Length | Species #> ---------------------------------------- #> 7.00 | 4.70 | versicolor #> 6.40 | 4.50 | versicolor #> 6.90 | 4.90 | versicolor #> Footer line A #> Second line #> #> #> Green Table 3 #> #> Sepal.Length | Petal.Width | Species #> -------------------------------------- #> 6.50 | 2.00 | virginica #> 6.40 | 1.90 | virginica #> 6.80 | 2.10 | virginica #> Footer line I #> Second line"},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"overview-of-core-functions","dir":"Articles","previous_headings":"","what":"Overview of Core Functions","title":"Getting Started with Accessing Model Information","text":"statistical model object describing relationship variables. Although lot different types models, specificities, also share common components. goal {insight} help retrieve components. get_* prefix extracts values (data) associated model-specific objects (e.g., parameters variables), find_* prefix lists model-specific objects (e.g., priors predictors). powerful families functions allowing great flexibility use, whether high, descriptive level (find_*) narrower level statistical inspection reporting (get_*). point users package documentation complementary package website, https://easystats.github.io/insight/, detailed list arguments associated function well returned values function.","code":""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"definition-of-model-components","dir":"Articles","previous_headings":"","what":"Definition of Model Components","title":"Getting Started with Accessing Model Information","text":"functions {insight} address different components model. effort avoid confusion specific “targets” function, section provide short explanation {insight}’s definitions regression model components.","code":""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"data","dir":"Articles","previous_headings":"Definition of Model Components","what":"Data","title":"Getting Started with Accessing Model Information","text":"dataset used fit model.","code":""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"parameters","dir":"Articles","previous_headings":"Definition of Model Components","what":"Parameters","title":"Getting Started with Accessing Model Information","text":"Values estimated learned data capture relationship variables. regression models, usually referred coefficients.","code":""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"response-and-predictors","dir":"Articles","previous_headings":"Definition of Model Components","what":"Response and Predictors","title":"Getting Started with Accessing Model Information","text":"response: outcome response variable (dependent variable) regression model. predictor: independent variables (fixed part ) regression model. mixed models, variables random effects part (.e. grouping factors) model returned predictors default. However, can included using additional arguments function call, treating predictors “unique”. , variable appears fixed effect random slope, treated one () predictor.","code":""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"variables","dir":"Articles","previous_headings":"Definition of Model Components","what":"Variables","title":"Getting Started with Accessing Model Information","text":"unique variable names appear regression model, e.g., response variable, predictors random effects. “variable” relates unique occurrence term, term name. instance, expression x + poly(x, 2) variable x.","code":""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"terms","dir":"Articles","previous_headings":"Definition of Model Components","what":"Terms","title":"Getting Started with Accessing Model Information","text":"Terms consist variable factor names separated operators, involve arithmetic expressions. instance, expression x + poly(x, 2) one variable x, two terms x poly(x, 2).","code":""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"random-effects","dir":"Articles","previous_headings":"Definition of Model Components","what":"Random Effects","title":"Getting Started with Accessing Model Information","text":"random slopes: variables specified random slopes mixed effects model. random grouping factors: variables specified grouping variables mixed effects model.","code":""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"examples","dir":"Articles","previous_headings":"","what":"Examples","title":"Getting Started with Accessing Model Information","text":"Aren’t predictors, terms, parameters thing? cases, yes. cases, sometimes useful “bare” variable names (terms), sometimes also useful information possible transformation variables. main reason functions cover similar aspects model object (like find_terms() find_predictors() find_variables()). examples demonstrate differences function: Finally, find_parameters(). Parameters also known coefficients, find_parameters() exactly : returns model coefficients.","code":"library(insight) library(lme4) data(sleepstudy) sleepstudy$mygrp <- sample(1:5, size = 180, replace = TRUE) sleepstudy$mysubgrp <- NA sleepstudy$Weeks <- sleepstudy$Days / 7 sleepstudy$cat <- as.factor(sample(letters[1:4], nrow(sleepstudy), replace = TRUE)) for (i in 1:5) { filter_group <- sleepstudy$mygrp == i sleepstudy$mysubgrp[filter_group] <- sample(1:30, size = sum(filter_group), replace = TRUE) } model <- suppressWarnings(lmer( Reaction ~ Days + I(Days^2) + log1p(Weeks) + cat + (1 | mygrp / mysubgrp) + (1 + Days | Subject), data = sleepstudy )) # find the response variable find_response(model) #> [1] \"Reaction\" # find all predictors, fixed part by default find_predictors(model) #> $conditional #> [1] \"Days\" \"Weeks\" \"cat\" # find random effects, grouping factors only find_random(model) #> $random #> [1] \"mysubgrp:mygrp\" \"mygrp\" \"Subject\" # find random slopes find_random_slopes(model) #> $random #> [1] \"Days\" # find all predictors, including random effects find_predictors(model, effects = \"all\", component = \"all\") #> $conditional #> [1] \"Days\" \"Weeks\" \"cat\" #> #> $random #> [1] \"mysubgrp\" \"mygrp\" \"Subject\" # find all terms, including response and random effects # this is essentially the same as the previous example plus response find_terms(model) #> $response #> [1] \"Reaction\" #> #> $conditional #> [1] \"Days\" \"I(Days^2)\" \"log1p(Weeks)\" \"cat\" #> #> $random #> [1] \"mysubgrp\" \"mygrp\" \"Days\" \"Subject\" # find all variables, i.e. also quadratic or log-transformed predictors find_variables(model) #> $response #> [1] \"Reaction\" #> #> $conditional #> [1] \"Days\" \"Weeks\" \"cat\" #> #> $random #> [1] \"mysubgrp\" \"mygrp\" \"Subject\" # find model parameters, i.e. coefficients find_parameters(model) #> $conditional #> [1] \"(Intercept)\" \"Days\" \"I(Days^2)\" \"log1p(Weeks)\" \"catb\" #> [6] \"catc\" \"catd\" #> #> $random #> $random$`mysubgrp:mygrp` #> [1] \"(Intercept)\" #> #> $random$Subject #> [1] \"(Intercept)\" \"Days\" #> #> $random$mygrp #> [1] \"(Intercept)\""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"examples-of-use-cases-in-r","dir":"Articles","previous_headings":"","what":"Examples of Use Cases in R","title":"Getting Started with Accessing Model Information","text":"now like provide examples use cases {insight} package. examples probably cover typical real-world problems, serve illustration core idea package: unified interface access model information. {insight} help users package developers order reduce hassle many exceptions various modelling packages accessing model information.","code":""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"making-predictions-at-specific-values-of-a-term-of-interest","dir":"Articles","previous_headings":"Examples of Use Cases in R","what":"Making Predictions at Specific Values of a Term of Interest","title":"Getting Started with Accessing Model Information","text":"Say, goal make predictions certain term, holding remaining co-variates constant. achieved calling predict() feeding newdata-argument values term interest well “constant” values remaining co-variates. functions get_data() find_predictors() used get information, can used call predict(). example, fit simple linear model, replaced (m)models, approach “universal” applies many different model objects.","code":"library(insight) m <- lm( Sepal.Length ~ Species + Petal.Width + Sepal.Width, data = iris ) dat <- get_data(m) pred <- find_predictors(m, flatten = TRUE) l <- lapply(pred, function(x) { if (is.numeric(dat[[x]])) mean(dat[[x]]) else unique(dat[[x]]) }) names(l) <- pred l <- as.data.frame(l) cbind(l, predictions = predict(m, newdata = l)) #> Species Petal.Width Sepal.Width predictions #> 1 setosa 1.199333 3.057333 5.101427 #> 2 versicolor 1.199333 3.057333 6.089557 #> 3 virginica 1.199333 3.057333 6.339015"},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"printing-model-coefficients","dir":"Articles","previous_headings":"Examples of Use Cases in R","what":"Printing Model Coefficients","title":"Getting Started with Accessing Model Information","text":"next example emphasize possibilities generalize functions many different model objects using {insight}. aim simply print coefficients complete, human readable sentence. first approach uses functions available , obviously models, access information model coefficients. can see, function fails gam-models. access models depends type model R ecosystem, need create specific functions models types. {insight}, users can write function without worry model type.","code":"print_params <- function(model){ paste0( \"My parameters are \", paste0(row.names(summary(model)$coefficients), collapse = \", \"), \", thank you for your attention!\" ) } m1 <- lm(Sepal.Length ~ Petal.Width, data = iris) print_params(m1) #> [1] \"My parameters are (Intercept), Petal.Width, thank you for your attention!\" # obviously, something is missing in the output m2 <- mgcv::gam(Sepal.Length ~ Petal.Width + s(Petal.Length), data = iris) print_params(m2) #> [1] \"My parameters are , thank you for your attention!\" print_params <- function(model){ paste0( \"My parameters are \", paste0(insight::find_parameters(model, flatten = TRUE), collapse = \", \"), \", thank you for your attention!\" ) } m1 <- lm(Sepal.Length ~ Petal.Width, data = iris) print_params(m1) #> [1] \"My parameters are (Intercept), Petal.Width, thank you for your attention!\" m2 <- mgcv::gam(Sepal.Length ~ Petal.Width + s(Petal.Length), data = iris) print_params(m2) #> [1] \"My parameters are (Intercept), Petal.Width, s(Petal.Length), thank you for your attention!\""},{"path":"https://easystats.github.io/insight/articles/insight.html","id":"examples-of-use-cases-in-r-packages","dir":"Articles","previous_headings":"","what":"Examples of Use Cases in R packages","title":"Getting Started with Accessing Model Information","text":"{insight} already used different packages solve problems typically occur users’ inputs different model objects varying complexity. example, {ggeffects}, package computes visualizes marginal effects regression models, requires extraction data (get_data()) used fit models, also retrieval model predictors (find_predictors()) decide covariates held constant computing marginal effects. information required order create data frame predict(newdata=). Furthermore, models’ link-functions (link_function()) resp. link-inverse-functions (link_inverse()) required obtain predictors model’s response scale. {sjPlot}-package creates plots summary tables regression models, uses {insight}-functions get model-information (model_info() find_response()), used build components final plot table. information helps, example, labeling table columns providing information effect type (odds ratio, incidence rate ratio, etc.) different model components, split plots tables “conditional” “zero-inflated” parts model, cases models zero-inflation. {bayestestR} mainly relies get_priors() get_parameters() retrieve necessary information compute various indices statistics Bayesian models (like HDI, Credible Interval, MCSE, effective sample size, Bayes factors, etc.). advantage get_parameters() context regardless number parameters posterior distribution , necessary data can easily accessed model objects. need write original, complicated code regular expressions. last example {performance}-package, provides functions computing measures assess model quality. Many indices (e.g. check overdispersion zero-inflation, predictive accuracy, logloss, RMSE, etc.) require number observations (n_obs()) data response-variable (get_response()). , context, functions {insight} helpful, offer unified access information.","code":""},{"path":"https://easystats.github.io/insight/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Daniel Lüdecke. Author, maintainer. @strengejacke Dominique Makowski. Author, contributor. @Dom_Makowski Indrajeet Patil. Author, contributor. @patilindrajeets Philip Waggoner. Author, contributor. Mattan S. Ben-Shachar. Author, contributor. Brenton M. Wiernik. Author, contributor. @bmwiernik Vincent Arel-Bundock. Author, contributor. Etienne Bacher. Author, contributor. Alex Hayes. Reviewer. Grant McDermott. Contributor. Rémi Thériault. Contributor. @rempsyc Alex Reinhart. Contributor.","code":""},{"path":"https://easystats.github.io/insight/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Lüdecke D, Waggoner P, Makowski D (2019). “insight: Unified Interface Access Information Model Objects R.” Journal Open Source Software, 4(38), 1412. doi:10.21105/joss.01412.","code":"@Article{, title = {{insight}: A Unified Interface to Access Information from Model Objects in {R}.}, volume = {4}, doi = {10.21105/joss.01412}, number = {38}, journal = {Journal of Open Source Software}, author = {Daniel Lüdecke and Philip Waggoner and Dominique Makowski}, year = {2019}, pages = {1412}, }"},{"path":"https://easystats.github.io/insight/index.html","id":"insight-","dir":"","previous_headings":"","what":"Easy Access to Model Information for Various Model Objects","title":"Easy Access to Model Information for Various Model Objects","text":"Gain insight models! fitting statistical model, many useful pieces information simultaneously calculated stored beyond coefficient estimates general model fit statistics. Although exist generic functions obtain model information data, many package-specific modelling functions provide methods allow users access valuable information. insight R-package fills important gap providing suite functions support almost model (see list many models supported List Supported Packages Models section). goal insight, , provide tools provide easy, intuitive, consistent access information contained model objects. tools aid applied research virtually field fit, diagnose, present statistical models streamlining access every aspect many model objects via consistent syntax output.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Easy Access to Model Information for Various Model Objects","text":"insight package available CRAN, latest development version available R-universe (rOpenSci) GitHub. downloaded package, can load using: Tip Instead library(insight), use library(easystats). make features easystats-ecosystem available. stay updated, use easystats::install_latest().","code":"library(\"insight\")"},{"path":"https://easystats.github.io/insight/index.html","id":"documentation","dir":"","previous_headings":"","what":"Documentation","title":"Easy Access to Model Information for Various Model Objects","text":"Built non-programmers mind, insight offers broad toolbox making model data information easily accessible. insight offers many useful functions working understanding model objects (discussed ), suggest users start model_info(), function provides clean consistent overview model objects (e.g., functional form model, model family, link function, number observations, variables included specification, etc.). clear understanding model introduced, users able adapt functions nuanced exploration interaction virtually model object.Please visit https://easystats.github.io/insight/ documentation.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"definition-of-model-components","dir":"","previous_headings":"Documentation","what":"Definition of Model Components","title":"Easy Access to Model Information for Various Model Objects","text":"functions insight address different components model. effort avoid confusion specific “targets” function, section provide short explanation insight’s definitions regression model components.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"data","dir":"","previous_headings":"Documentation > Definition of Model Components","what":"Data","title":"Easy Access to Model Information for Various Model Objects","text":"dataset used fit model.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"parameters","dir":"","previous_headings":"Documentation > Definition of Model Components","what":"Parameters","title":"Easy Access to Model Information for Various Model Objects","text":"Values estimated learned data capture relationship variables. regression models, usually referred coefficients.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"response-and-predictors","dir":"","previous_headings":"Documentation > Definition of Model Components","what":"Response and Predictors","title":"Easy Access to Model Information for Various Model Objects","text":"response: outcome response variable (dependent variable) regression model. predictor: independent variables (fixed part ) regression model. mixed models, variables random effects part (.e. grouping factors) model returned predictors default. However, can included using additional arguments function call, treating predictors “unique”. , variable appears fixed effect random slope, treated one () predictor.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"variables","dir":"","previous_headings":"Documentation > Definition of Model Components","what":"Variables","title":"Easy Access to Model Information for Various Model Objects","text":"unique variable names appear regression model, e.g., response variable, predictors random effects. “variable” relates unique occurence term, term name. instance, expression x + poly(x, 2) variable x.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"terms","dir":"","previous_headings":"Documentation > Definition of Model Components","what":"Terms","title":"Easy Access to Model Information for Various Model Objects","text":"Terms consist variable factor names separated operators, involve arithmetic expressions. instance, expression x + poly(x, 2) one variable x, two terms x poly(x, 2).","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"random-effects","dir":"","previous_headings":"Documentation > Definition of Model Components","what":"Random Effects","title":"Easy Access to Model Information for Various Model Objects","text":"random slopes: variables specified random slopes mixed effects model. random grouping factors: variables specified grouping variables mixed effects model. Aren’t predictors, terms parameters thing? cases, yes. cases. Find clicking access documentation.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"functions","dir":"","previous_headings":"Documentation","what":"Functions","title":"Easy Access to Model Information for Various Model Objects","text":"package revolves around two key prefixes: get_* find_*. get_* prefix extracts values (data) associated model-specific objects (e.g., parameters variables), find_* prefix lists model-specific objects (e.g., priors predictors). powerful families functions allowing great flexibility use, whether high, descriptive level (find_*) narrower level statistical inspection reporting (get_*). total, insight package includes 16 core functions: get_data(), get_priors(), get_variance(), get_parameters(), get_predictors(), get_random(), get_response(), find_algorithm(), find_formula(), find_variables(), find_terms(), find_parameters(), find_predictors(), find_random(), find_response(), model_info(). cases, users must supply minimum, name model fit object. several functions, additional arguments allow targeted returns model information. example, find_terms() function’s effects argument allows extraction “fixed effects” terms, “random effects” terms, default, “” terms model object. point users package documentation complementary package website, https://easystats.github.io/insight/, detailed list arguments associated function well returned values function.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"examples-of-use-cases-in-r","dir":"","previous_headings":"Documentation","what":"Examples of Use Cases in R","title":"Easy Access to Model Information for Various Model Objects","text":"now like provide examples use cases insight package. examples probably cover typical real-world problems, serve illustration core idea package: unified interface access model information. insight help users package developers order reduce hassle many exceptions various modelling packages accessing model information.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"making-predictions-at-specific-values-of-a-term-of-interest","dir":"","previous_headings":"Documentation > Examples of Use Cases in R","what":"Making Predictions at Specific Values of a Term of Interest","title":"Easy Access to Model Information for Various Model Objects","text":"Say, goal make predictions certain term, holding remaining co-variates constant. achieved calling predict() feeding newdata-argument values term interest well “constant” values remaining co-variates. functions get_data() find_predictors() used get information, can used call predict(). example, fit simple linear model, replaced (m)models, approach “universal” applies many different model objects.","code":"library(insight) m <- lm( Sepal.Length ~ Species + Petal.Width + Sepal.Width, data = iris ) dat <- get_data(m) pred <- find_predictors(m, flatten = TRUE) l <- lapply(pred, function(x) { if (is.numeric(dat[[x]])) { mean(dat[[x]]) } else { unique(dat[[x]]) } }) names(l) <- pred l <- as.data.frame(l) cbind(l, predictions = predict(m, newdata = l)) #> Species Petal.Width Sepal.Width predictions #> 1 setosa 1.2 3.1 5.1 #> 2 versicolor 1.2 3.1 6.1 #> 3 virginica 1.2 3.1 6.3"},{"path":"https://easystats.github.io/insight/index.html","id":"printing-model-coefficients","dir":"","previous_headings":"Documentation > Examples of Use Cases in R","what":"Printing Model Coefficients","title":"Easy Access to Model Information for Various Model Objects","text":"next example emphasize possibilities generalize functions many different model objects using insight. aim simply print coefficients complete, human readable sentence. first approach uses functions available , obviously models, access information model coefficients. can see, function fails gam-models. access models depends type model R ecosystem, need create specific functions models types. insight, users can write function without worry model type.","code":"print_params <- function(model) { paste0( \"My parameters are \", toString(row.names(summary(model)$coefficients)), \", thank you for your attention!\" ) } m1 <- lm(Sepal.Length ~ Petal.Width, data = iris) print_params(m1) #> [1] \"My parameters are (Intercept), Petal.Width, thank you for your attention!\" # obviously, something is missing in the output m2 <- mgcv::gam(Sepal.Length ~ Petal.Width + s(Petal.Length), data = iris) print_params(m2) #> [1] \"My parameters are , thank you for your attention!\" print_params <- function(model) { paste0( \"My parameters are \", toString(insight::find_parameters(model, flatten = TRUE)), \", thank you for your attention!\" ) } m1 <- lm(Sepal.Length ~ Petal.Width, data = iris) print_params(m1) #> [1] \"My parameters are (Intercept), Petal.Width, thank you for your attention!\" m2 <- mgcv::gam(Sepal.Length ~ Petal.Width + s(Petal.Length), data = iris) print_params(m2) #> [1] \"My parameters are (Intercept), Petal.Width, s(Petal.Length), thank you for your attention!\""},{"path":"https://easystats.github.io/insight/index.html","id":"contributing-and-support","dir":"","previous_headings":"","what":"Contributing and Support","title":"Easy Access to Model Information for Various Model Objects","text":"case want file issue contribute another way package, please follow guide. questions functionality, may either contact us via email also file issue.","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"list-of-supported-models-by-class","dir":"","previous_headings":"","what":"List of Supported Models by Class","title":"Easy Access to Model Information for Various Model Objects","text":"Currently, 226 model classes supported. Didn’t find model? File issue request additional model-support insight!","code":"supported_models() #> [1] \"aareg\" \"afex_aov\" #> [3] \"AKP\" \"Anova.mlm\" #> [5] \"anova.rms\" \"aov\" #> [7] \"aovlist\" \"Arima\" #> [9] \"averaging\" \"bamlss\" #> [11] \"bamlss.frame\" \"bayesQR\" #> [13] \"bayesx\" \"BBmm\" #> [15] \"BBreg\" \"bcplm\" #> [17] \"betamfx\" \"betaor\" #> [19] \"betareg\" \"BFBayesFactor\" #> [21] \"bfsl\" \"BGGM\" #> [23] \"bife\" \"bifeAPEs\" #> [25] \"bigglm\" \"biglm\" #> [27] \"blavaan\" \"blrm\" #> [29] \"bracl\" \"brglm\" #> [31] \"brmsfit\" \"brmultinom\" #> [33] \"btergm\" \"censReg\" #> [35] \"cgam\" \"cgamm\" #> [37] \"cglm\" \"clm\" #> [39] \"clm2\" \"clmm\" #> [41] \"clmm2\" \"clogit\" #> [43] \"coeftest\" \"complmrob\" #> [45] \"confusionMatrix\" \"coxme\" #> [47] \"coxph\" \"coxph.penal\" #> [49] \"coxr\" \"cpglm\" #> [51] \"cpglmm\" \"crch\" #> [53] \"crq\" \"crqs\" #> [55] \"crr\" \"dep.effect\" #> [57] \"DirichletRegModel\" \"draws\" #> [59] \"drc\" \"eglm\" #> [61] \"elm\" \"epi.2by2\" #> [63] \"ergm\" \"feglm\" #> [65] \"feis\" \"felm\" #> [67] \"fitdistr\" \"fixest\" #> [69] \"flac\" \"flexsurvreg\" #> [71] \"flic\" \"gam\" #> [73] \"Gam\" \"gamlss\" #> [75] \"gamm\" \"gamm4\" #> [77] \"garch\" \"gbm\" #> [79] \"gee\" \"geeglm\" #> [81] \"glht\" \"glimML\" #> [83] \"glm\" \"Glm\" #> [85] \"glmm\" \"glmmadmb\" #> [87] \"glmmPQL\" \"glmmTMB\" #> [89] \"glmrob\" \"glmRob\" #> [91] \"glmx\" \"gls\" #> [93] \"gmnl\" \"hglm\" #> [95] \"HLfit\" \"htest\" #> [97] \"hurdle\" \"iv_robust\" #> [99] \"ivFixed\" \"ivprobit\" #> [101] \"ivreg\" \"lavaan\" #> [103] \"lm\" \"lm_robust\" #> [105] \"lme\" \"lmerMod\" #> [107] \"lmerModLmerTest\" \"lmodel2\" #> [109] \"lmrob\" \"lmRob\" #> [111] \"logistf\" \"logitmfx\" #> [113] \"logitor\" \"logitr\" #> [115] \"LORgee\" \"lqm\" #> [117] \"lqmm\" \"lrm\" #> [119] \"manova\" \"MANOVA\" #> [121] \"marginaleffects\" \"marginaleffects.summary\" #> [123] \"margins\" \"maxLik\" #> [125] \"mblogit\" \"mclogit\" #> [127] \"mcmc\" \"mcmc.list\" #> [129] \"MCMCglmm\" \"mcp1\" #> [131] \"mcp12\" \"mcp2\" #> [133] \"med1way\" \"mediate\" #> [135] \"merMod\" \"merModList\" #> [137] \"meta_bma\" \"meta_fixed\" #> [139] \"meta_random\" \"metaplus\" #> [141] \"mhurdle\" \"mipo\" #> [143] \"mira\" \"mixed\" #> [145] \"MixMod\" \"mixor\" #> [147] \"mjoint\" \"mle\" #> [149] \"mle2\" \"mlm\" #> [151] \"mlogit\" \"mmclogit\" #> [153] \"mmlogit\" \"mmrm\" #> [155] \"mmrm_fit\" \"mmrm_tmb\" #> [157] \"model_fit\" \"multinom\" #> [159] \"mvord\" \"negbinirr\" #> [161] \"negbinmfx\" \"nestedLogit\" #> [163] \"ols\" \"onesampb\" #> [165] \"orm\" \"pgmm\" #> [167] \"phyloglm\" \"phylolm\" #> [169] \"plm\" \"PMCMR\" #> [171] \"poissonirr\" \"poissonmfx\" #> [173] \"polr\" \"probitmfx\" #> [175] \"psm\" \"Rchoice\" #> [177] \"ridgelm\" \"riskRegression\" #> [179] \"rjags\" \"rlm\" #> [181] \"rlmerMod\" \"RM\" #> [183] \"rma\" \"rma.uni\" #> [185] \"robmixglm\" \"robtab\" #> [187] \"rq\" \"rqs\" #> [189] \"rqss\" \"rvar\" #> [191] \"Sarlm\" \"scam\" #> [193] \"selection\" \"sem\" #> [195] \"SemiParBIV\" \"semLm\" #> [197] \"semLme\" \"serp\" #> [199] \"slm\" \"speedglm\" #> [201] \"speedlm\" \"stanfit\" #> [203] \"stanmvreg\" \"stanreg\" #> [205] \"summary.lm\" \"survfit\" #> [207] \"survreg\" \"svy_vglm\" #> [209] \"svychisq\" \"svyglm\" #> [211] \"svyolr\" \"t1way\" #> [213] \"tobit\" \"trimcibt\" #> [215] \"truncreg\" \"vgam\" #> [217] \"vglm\" \"wbgee\" #> [219] \"wblm\" \"wbm\" #> [221] \"wmcpAKP\" \"yuen\" #> [223] \"yuend\" \"zcpglm\" #> [225] \"zeroinfl\" \"zerotrunc\""},{"path":"https://easystats.github.io/insight/index.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Easy Access to Model Information for Various Model Objects","text":"package helped , please consider citing follows: Lüdecke D, Waggoner P, Makowski D. insight: Unified Interface Access Information Model Objects R. Journal Open Source Software 2019;4:1412. doi: 10.21105/joss.01412","code":""},{"path":"https://easystats.github.io/insight/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Easy Access to Model Information for Various Model Objects","text":"Please note insight project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://easystats.github.io/insight/reference/all_models_equal.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks if all objects are models of same class — all_models_equal","title":"Checks if all objects are models of same class — all_models_equal","text":"Small helper checks objects supported (regression) model objects class.","code":""},{"path":"https://easystats.github.io/insight/reference/all_models_equal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks if all objects are models of same class — all_models_equal","text":"","code":"all_models_equal(..., verbose = FALSE) all_models_same_class(..., verbose = FALSE)"},{"path":"https://easystats.github.io/insight/reference/all_models_equal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks if all objects are models of same class — all_models_equal","text":"... list objects. verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/all_models_equal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks if all objects are models of same class — all_models_equal","text":"logical, TRUE x supported model objects class.","code":""},{"path":"https://easystats.github.io/insight/reference/all_models_equal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks if all objects are models of same class — all_models_equal","text":"","code":"data(mtcars) data(sleepstudy, package = \"lme4\") m1 <- lm(mpg ~ wt + cyl + vs, data = mtcars) m2 <- lm(mpg ~ wt + cyl, data = mtcars) m3 <- lme4::lmer(Reaction ~ Days + (1 | Subject), data = sleepstudy) m4 <- glm(formula = vs ~ wt, family = binomial(), data = mtcars) all_models_same_class(m1, m2) #> [1] TRUE all_models_same_class(m1, m2, m3) #> [1] FALSE all_models_same_class(m1, m4, m2, m3, verbose = TRUE) #> Following objects are not identical with m1 (of class \"lm\"): m4 (\"glm\"), #> m3 (\"lmerMod\") #> [1] FALSE all_models_same_class(m1, m4, mtcars, m2, m3, verbose = TRUE) #> Following objects are no (supported) models: mtcars #> Following objects are not identical with m1 (of class \"lm\"): m4 (\"glm\"), #> mtcars (\"data.frame\"), m3 (\"lmerMod\") #> [1] FALSE"},{"path":"https://easystats.github.io/insight/reference/check_if_installed.html","id":null,"dir":"Reference","previous_headings":"","what":"Checking if needed package is installed — check_if_installed","title":"Checking if needed package is installed — check_if_installed","text":"Checking needed package installed","code":""},{"path":"https://easystats.github.io/insight/reference/check_if_installed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checking if needed package is installed — check_if_installed","text":"","code":"check_if_installed( package, reason = \"for this function to work\", stop = TRUE, minimum_version = NULL, quietly = FALSE, prompt = interactive(), ... )"},{"path":"https://easystats.github.io/insight/reference/check_if_installed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checking if needed package is installed — check_if_installed","text":"package character vector naming package(s), whose installation needs checked libraries. reason phrase describing package needed. default generic description. stop Logical decides whether function stop needed package installed. minimum_version character vector, representing minimum package version required package. length package. NULL, automatically check DESCRIPTION file correct minimum version. using minimum_version one package, NA used instead NULL packages specific version necessary. quietly Logical, TRUE, invisibly returns vector logicals (TRUE installed package, FALSE otherwise), stop throw warning. quietly = TRUE, arguments stop prompt ignored. Use argument internally check package dependencies without stopping warnings. prompt TRUE, prompt user install needed package(s). Ignored quietly = TRUE. ... Currently ignored","code":""},{"path":"https://easystats.github.io/insight/reference/check_if_installed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checking if needed package is installed — check_if_installed","text":"stop = TRUE, package yet installed, function stops throws error. Else, named logical vector returned, indicating packages installed, .","code":""},{"path":"https://easystats.github.io/insight/reference/check_if_installed.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checking if needed package is installed — check_if_installed","text":"","code":"# \\donttest{ check_if_installed(\"insight\") try(check_if_installed(\"datawizard\", stop = FALSE)) try(check_if_installed(\"rstanarm\", stop = FALSE)) try(check_if_installed(\"nonexistent_package\", stop = FALSE)) #> Warning: Package `nonexistent_package` required for this function to work. #> Please install it by running `install.packages(\"nonexistent_package\")`. try(check_if_installed(\"insight\", minimum_version = \"99.8.7\")) #> Error : Package `insight` is installed, but package version `99.8.7` is #> required. #> Please update it by running `install.packages(\"insight\")`. try(check_if_installed(c(\"nonexistent\", \"also_not_here\"), stop = FALSE)) #> Warning: Packages `nonexistent` and `also_not_here` required for this function to #> work. #> Please install them by running `install.packages(\"nonexistent\", #> \"also_not_here\")`. try(check_if_installed(c(\"datawizard\", \"rstanarm\"), stop = FALSE)) try(check_if_installed(c(\"datawizard\", \"rstanarm\"), minimum_version = c(NA, \"2.21.1\"), stop = FALSE )) # }"},{"path":"https://easystats.github.io/insight/reference/clean_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Get clean names of model terms — clean_names","title":"Get clean names of model terms — clean_names","text":"function \"cleans\" names model terms (character vector names) removing patterns like log() .factor() etc.","code":""},{"path":"https://easystats.github.io/insight/reference/clean_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get clean names of model terms — clean_names","text":"","code":"clean_names(x, ...) # S3 method for class 'character' clean_names(x, include_names = FALSE, ...)"},{"path":"https://easystats.github.io/insight/reference/clean_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get clean names of model terms — clean_names","text":"x fitted model, character vector. ... Currently used. include_names Logical, TRUE, returns named vector names original values x.","code":""},{"path":"https://easystats.github.io/insight/reference/clean_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get clean names of model terms — clean_names","text":"\"cleaned\" variable names character vector, .e. pattern like s() splines log() removed model terms.","code":""},{"path":"https://easystats.github.io/insight/reference/clean_names.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Get clean names of model terms — clean_names","text":"Typically, method intended work character vectors, order remove patterns obscure variable names. convenience reasons also possible call clean_names() also model object. x regression model, function (almost) equal calling find_variables(). main difference clean_names() always returns character vector, find_variables() returns list character vectors, unless flatten = TRUE. See 'Examples'.","code":""},{"path":"https://easystats.github.io/insight/reference/clean_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get clean names of model terms — clean_names","text":"","code":"# example from ?stats::glm counts <- c(18, 17, 15, 20, 10, 20, 25, 13, 12) outcome <- as.numeric(gl(3, 1, 9)) treatment <- gl(3, 3) m <- glm(counts ~ log(outcome) + as.factor(treatment), family = poisson()) clean_names(m) #> [1] \"counts\" \"outcome\" \"treatment\" # difference \"clean_names()\" and \"find_variables()\" data(cbpp, package = \"lme4\") m <- lme4::glmer( cbind(incidence, size - incidence) ~ period + (1 | herd), data = cbpp, family = binomial ) clean_names(m) #> [1] \"incidence\" \"size\" \"period\" \"herd\" find_variables(m) #> $response #> [1] \"incidence\" \"size\" #> #> $conditional #> [1] \"period\" #> #> $random #> [1] \"herd\" #> find_variables(m, flatten = TRUE) #> [1] \"incidence\" \"size\" \"period\" \"herd\""},{"path":"https://easystats.github.io/insight/reference/clean_parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Get clean names of model parameters — clean_parameters","title":"Get clean names of model parameters — clean_parameters","text":"function \"cleans\" names model parameters removing patterns like \"r_\" \"b[]\" (mostly applicable Stan models) adding columns information group component parameters belong (.e. fixed random, count zero-inflated...) main purpose function easily filter select model parameters, particular - limited - posterior samples Stan models, depending certain characteristics. might useful selective results reported results parameters filtered return certain results (see print_parameters()).","code":""},{"path":"https://easystats.github.io/insight/reference/clean_parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get clean names of model parameters — clean_parameters","text":"","code":"clean_parameters(x, ...)"},{"path":"https://easystats.github.io/insight/reference/clean_parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get clean names of model parameters — clean_parameters","text":"x fitted model. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/clean_parameters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get clean names of model parameters — clean_parameters","text":"data frame \"cleaned\" parameter names information effects, component group parameters belong . consistent across different models, returned data frame always least four columns Parameter, Effects, Component Cleaned_Parameter. See 'Details'.","code":""},{"path":"https://easystats.github.io/insight/reference/clean_parameters.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get clean names of model parameters — clean_parameters","text":"Effects column indicate parameter fixed random effect. Component can either conditional zero_inflated. models random effects, Group column indicates grouping factor random effects. multivariate response models brms rstanarm, additional Response column included, indicate parameters belong response formula. Furthermore, Cleaned_Parameter column returned contains \"human readable\" parameter names (mostly identical Parameter, except models brms rstanarm, specific terms like smooth- spline-terms).","code":""},{"path":"https://easystats.github.io/insight/reference/clean_parameters.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get clean names of model parameters — clean_parameters","text":"","code":"# \\donttest{ model <- download_model(\"brms_zi_2\") clean_parameters(model) #> Parameter Effects Component Group #> 1 b_Intercept fixed conditional #> 2 b_persons fixed conditional #> 3 b_child fixed conditional #> 4 b_camper fixed conditional #> 5 r_persons[1,Intercept] random conditional Intercept: persons #> 6 r_persons[2,Intercept] random conditional Intercept: persons #> 7 r_persons[3,Intercept] random conditional Intercept: persons #> 8 r_persons[4,Intercept] random conditional Intercept: persons #> 9 sd_persons__Intercept random conditional SD/Cor: persons #> 10 b_zi_Intercept fixed zero_inflated #> 11 b_zi_child fixed zero_inflated #> 12 b_zi_camper fixed zero_inflated #> 13 r_persons__zi[1,Intercept] random zero_inflated Intercept: persons #> 14 r_persons__zi[2,Intercept] random zero_inflated Intercept: persons #> 15 r_persons__zi[3,Intercept] random zero_inflated Intercept: persons #> 16 r_persons__zi[4,Intercept] random zero_inflated Intercept: persons #> 17 sd_persons__zi_Intercept random zero_inflated SD/Cor: persons #> Cleaned_Parameter #> 1 (Intercept) #> 2 persons #> 3 child #> 4 camper #> 5 persons.1 #> 6 persons.2 #> 7 persons.3 #> 8 persons.4 #> 9 (Intercept) #> 10 (Intercept) #> 11 child #> 12 camper #> 13 persons.1 #> 14 persons.2 #> 15 persons.3 #> 16 persons.4 #> 17 (Intercept) # }"},{"path":"https://easystats.github.io/insight/reference/color_if.html","id":null,"dir":"Reference","previous_headings":"","what":"Color-formatting for data columns based on condition — color_if","title":"Color-formatting for data columns based on condition — color_if","text":"Convenient function formats columns data frames color codes, color chosen based certain conditions. Columns printed color console.","code":""},{"path":"https://easystats.github.io/insight/reference/color_if.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Color-formatting for data columns based on condition — color_if","text":"","code":"color_if( x, columns, predicate = `>`, value = 0, color_if = \"green\", color_else = \"red\", digits = 2 ) colour_if( x, columns, predicate = `>`, value = 0, colour_if = \"green\", colour_else = \"red\", digits = 2 )"},{"path":"https://easystats.github.io/insight/reference/color_if.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Color-formatting for data columns based on condition — color_if","text":"x data frame columns Character vector column names x formatted. predicate function takes columns value input return TRUE FALSE, based condition (comparison value) met. value comparator. May used conjunction predicate quickly set function compares elements colums value. May ignored predicate function internally computes comparisons. See 'Examples'. color_if, colour_if Character vector, indicating color code used format values x meet condition predicate value. May one \"red\", \"yellow\", \"green\", \"blue\", \"violet\", \"cyan\" \"grey\". Formatting also possible \"bold\" \"italic\". color_else, colour_else See color_if, conditions met. digits Digits rounded values.","code":""},{"path":"https://easystats.github.io/insight/reference/color_if.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Color-formatting for data columns based on condition — color_if","text":"x, columns matched predicate wrapped color codes.","code":""},{"path":"https://easystats.github.io/insight/reference/color_if.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Color-formatting for data columns based on condition — color_if","text":"predicate-function simply works like : (predicate(x[, columns], value))","code":""},{"path":"https://easystats.github.io/insight/reference/color_if.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Color-formatting for data columns based on condition — color_if","text":"","code":"# all values in Sepal.Length larger than 5 in green, all remaining in red x <- color_if(iris[1:10, ], columns = \"Sepal.Length\", predicate = `>`, value = 5) x #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 \\033[32m 5.10\\033[39m 3.5 1.4 0.2 setosa #> 2 \\033[31m 4.90\\033[39m 3.0 1.4 0.2 setosa #> 3 \\033[31m 4.70\\033[39m 3.2 1.3 0.2 setosa #> 4 \\033[31m 4.60\\033[39m 3.1 1.5 0.2 setosa #> 5 \\033[31m 5.00\\033[39m 3.6 1.4 0.2 setosa #> 6 \\033[32m 5.40\\033[39m 3.9 1.7 0.4 setosa #> 7 \\033[31m 4.60\\033[39m 3.4 1.4 0.3 setosa #> 8 \\033[31m 5.00\\033[39m 3.4 1.5 0.2 setosa #> 9 \\033[31m 4.40\\033[39m 2.9 1.4 0.2 setosa #> 10 \\033[31m 4.90\\033[39m 3.1 1.5 0.1 setosa cat(x$Sepal.Length) #> 5.10 4.90 4.70 4.60 5.00 5.40 4.60 5.00 4.40 4.90 # all levels \"setosa\" in Species in green, all remaining in red x <- color_if(iris, columns = \"Species\", predicate = `==`, value = \"setosa\") cat(x$Species) #> setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor versicolor virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica virginica # own function, argument \"value\" not needed here p <- function(x, y) { x >= 4.9 & x <= 5.1 } # all values in Sepal.Length between 4.9 and 5.1 in green, all remaining in red x <- color_if(iris[1:10, ], columns = \"Sepal.Length\", predicate = p) cat(x$Sepal.Length) #> 5.10 4.90 4.70 4.60 5.00 5.40 4.60 5.00 4.40 4.90"},{"path":"https://easystats.github.io/insight/reference/compact_character.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove empty strings from character — compact_character","title":"Remove empty strings from character — compact_character","text":"Remove empty strings character","code":""},{"path":"https://easystats.github.io/insight/reference/compact_character.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove empty strings from character — compact_character","text":"","code":"compact_character(x)"},{"path":"https://easystats.github.io/insight/reference/compact_character.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove empty strings from character — compact_character","text":"x single character vector characters.","code":""},{"path":"https://easystats.github.io/insight/reference/compact_character.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Remove empty strings from character — compact_character","text":"character character vector empty strings removed.","code":""},{"path":"https://easystats.github.io/insight/reference/compact_character.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove empty strings from character — compact_character","text":"","code":"compact_character(c(\"x\", \"y\", NA)) #> [1] \"x\" \"y\" compact_character(c(\"x\", \"NULL\", \"\", \"y\")) #> [1] \"x\" \"y\""},{"path":"https://easystats.github.io/insight/reference/compact_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove empty elements from lists — compact_list","title":"Remove empty elements from lists — compact_list","text":"Remove empty elements lists","code":""},{"path":"https://easystats.github.io/insight/reference/compact_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove empty elements from lists — compact_list","text":"","code":"compact_list(x, remove_na = FALSE)"},{"path":"https://easystats.github.io/insight/reference/compact_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove empty elements from lists — compact_list","text":"x list vector. remove_na Logical decide NAs removed.","code":""},{"path":"https://easystats.github.io/insight/reference/compact_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove empty elements from lists — compact_list","text":"","code":"compact_list(list(NULL, 1, c(NA, NA))) #> [[1]] #> [1] 1 #> #> [[2]] #> [1] NA NA #> compact_list(c(1, NA, NA)) #> [1] 1 NA NA compact_list(c(1, NA, NA), remove_na = TRUE) #> [1] 1"},{"path":"https://easystats.github.io/insight/reference/display.html","id":null,"dir":"Reference","previous_headings":"","what":"Generic export of data frames into formatted tables — display","title":"Generic export of data frames into formatted tables — display","text":"display() generic function export data frames various table formats (like plain text, markdown, ...). print_md() usually convenient wrapper display(format = \"markdown\"). Similar, print_html() shortcut display(format = \"html\"). See documentation specific objects' classes.","code":""},{"path":"https://easystats.github.io/insight/reference/display.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generic export of data frames into formatted tables — display","text":"","code":"display(object, ...) print_md(x, ...) print_html(x, ...) # S3 method for class 'data.frame' display(object, format = \"markdown\", ...) # S3 method for class 'data.frame' print_md(x, ...) # S3 method for class 'data.frame' print_html(x, ...)"},{"path":"https://easystats.github.io/insight/reference/display.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generic export of data frames into formatted tables — display","text":"object, x data frame. ... Arguments passed methods. format String, indicating output format. Can \"markdown\" \"html\".","code":""},{"path":"https://easystats.github.io/insight/reference/display.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generic export of data frames into formatted tables — display","text":"Depending format, either object class gt_tbl character vector class knitr_kable.","code":""},{"path":"https://easystats.github.io/insight/reference/display.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generic export of data frames into formatted tables — display","text":"","code":"display(iris[1:5, ]) #> #> #> | Sepal.Length| Sepal.Width| Petal.Length| Petal.Width| Species| #> |------------:|-----------:|------------:|-----------:|-------:| #> | 5.10| 3.50| 1.40| 0.20| setosa| #> | 4.90| 3.00| 1.40| 0.20| setosa| #> | 4.70| 3.20| 1.30| 0.20| setosa| #> | 4.60| 3.10| 1.50| 0.20| setosa| #> | 5.00| 3.60| 1.40| 0.20| setosa|"},{"path":"https://easystats.github.io/insight/reference/dot-colour_detect.html","id":null,"dir":"Reference","previous_headings":"","what":"Detect coloured cells — .colour_detect","title":"Detect coloured cells — .colour_detect","text":"Detect coloured cells","code":""},{"path":"https://easystats.github.io/insight/reference/dot-colour_detect.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Detect coloured cells — .colour_detect","text":"","code":".colour_detect(x)"},{"path":"https://easystats.github.io/insight/reference/download_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Download circus models — download_model","title":"Download circus models — download_model","text":"Downloads pre-compiled models circus-repository. circus-repository contains variety fitted models help systematic testing packages","code":""},{"path":"https://easystats.github.io/insight/reference/download_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download circus models — download_model","text":"","code":"download_model(name, url = NULL)"},{"path":"https://easystats.github.io/insight/reference/download_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download circus models — download_model","text":"name Model name. url String URL download model data. Optional, used case repository-URL changing. default, models downloaded https://raw.github.com/easystats/circus/master/data/.","code":""},{"path":"https://easystats.github.io/insight/reference/download_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download circus models — download_model","text":"model circus-repository, NULL model downloaded (e.g., due server problems).","code":""},{"path":"https://easystats.github.io/insight/reference/download_model.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download circus models — download_model","text":"code generated model available https://easystats.github.io/circus/reference/index.html.","code":""},{"path":"https://easystats.github.io/insight/reference/download_model.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Download circus models — download_model","text":"https://easystats.github.io/circus/","code":""},{"path":"https://easystats.github.io/insight/reference/ellipsis_info.html","id":null,"dir":"Reference","previous_headings":"","what":"Gather information about objects in ellipsis (dot dot dot) — ellipsis_info","title":"Gather information about objects in ellipsis (dot dot dot) — ellipsis_info","text":"Provides information regarding models entered ellipsis. detects whether models, regressions, nested regressions etc., assigning different classes list objects.","code":""},{"path":"https://easystats.github.io/insight/reference/ellipsis_info.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Gather information about objects in ellipsis (dot dot dot) — ellipsis_info","text":"","code":"ellipsis_info(objects, ...) # Default S3 method ellipsis_info(..., only_models = TRUE, verbose = TRUE)"},{"path":"https://easystats.github.io/insight/reference/ellipsis_info.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Gather information about objects in ellipsis (dot dot dot) — ellipsis_info","text":"objects, ... Arbitrary number objects. May also list model objects. only_models keep supported models (default TRUE). verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/ellipsis_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Gather information about objects in ellipsis (dot dot dot) — ellipsis_info","text":"list objects passed function, including additional information attributes (e.g. models response nested).","code":""},{"path":"https://easystats.github.io/insight/reference/ellipsis_info.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Gather information about objects in ellipsis (dot dot dot) — ellipsis_info","text":"","code":"m1 <- lm(Sepal.Length ~ Petal.Width + Species, data = iris) m2 <- lm(Sepal.Length ~ Species, data = iris) m3 <- lm(Sepal.Length ~ Petal.Width, data = iris) m4 <- lm(Sepal.Length ~ 1, data = iris) m5 <- lm(Petal.Width ~ 1, data = iris) objects <- ellipsis_info(m1, m2, m3, m4) class(objects) #> [1] \"ListNonNestedRegressions\" \"ListRegressions\" #> [3] \"ListModels\" \"list\" objects <- ellipsis_info(m1, m2, m4) attributes(objects)$is_nested #> [1] TRUE objects <- ellipsis_info(m1, m2, m5) attributes(objects)$same_response #> [1] FALSE"},{"path":"https://easystats.github.io/insight/reference/export_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Data frame and Tables Pretty Formatting — apply_table_theme","title":"Data frame and Tables Pretty Formatting — apply_table_theme","text":"Data frame Tables Pretty Formatting","code":""},{"path":"https://easystats.github.io/insight/reference/export_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data frame and Tables Pretty Formatting — apply_table_theme","text":"","code":"apply_table_theme(out, x, theme = \"default\", sub_header_positions = NULL) export_table( x, sep = \" | \", header = \"-\", cross = NULL, empty_line = NULL, digits = 2, protect_integers = TRUE, missing = \"\", width = NULL, format = NULL, title = NULL, caption = title, subtitle = NULL, footer = NULL, align = NULL, group_by = NULL, zap_small = FALSE, table_width = NULL, verbose = TRUE, ... )"},{"path":"https://easystats.github.io/insight/reference/export_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Data frame and Tables Pretty Formatting — apply_table_theme","text":"tinytable object. x data frame. May also list data frames, export multiple data frames multiple tables. theme theme apply table. One \"default\", \"grid\", \"striped\", \"bootstrap\", \"void\", \"tabular\", \"darklines\". sub_header_positions vector row positions apply border . Currently particular internal use easystats packages. sep Column separator. header Header separator. Can NULL. cross Character used separator header lines cross. empty_line Separator used empty lines. NULL, line remains empty (.e. filled whitespaces). digits Number digits rounding significant figures. May also \"signif\" return significant figures \"scientific\" return scientific notation. Control number digits adding value suffix, e.g. digits = \"scientific4\" scientific notation 4 decimal places, digits = \"signif5\" 5 significant figures (see also signif()). protect_integers integers kept integers (.e., without decimals)? missing Value NA values replaced. default, empty string (.e. \"\") returned NA. width Refers width columns (numeric values). Can either NULL, number named numeric vector. NULL, width column adjusted minimum required width. number, columns numeric values minimum width specified width. named numeric vector, value names matched column names, match, specified width used (see 'Examples'). applies text-format (see format). format Name output-format, string. NULL (\"text\"), returned output used basic printing. Can one NULL (default) resp. \"text\" plain text, \"markdown\" (\"md\") markdown \"html\" HTML output. title, caption, subtitle Table title (caption) subtitle, strings. NULL, title subtitle printed, unless stored attributes (table_title, alias table_caption, table_subtitle). x list data frames, caption may list table captions, one table. footer Table footer, string. markdown-formatted tables, table footers, due limitation markdown rendering, actually just new text line table. x list data frames, footer may list table captions, one table. align Column alignment. markdown-formatted tables, default align = NULL right-align numeric columns, columns left-aligned. format = \"html\", default left-align first column center remaining. May string indicate alignment rules complete table, like \"left\", \"right\", \"center\" \"firstleft\" (left-align first column, center remaining); maybe string abbreviated alignment characters, length string must equal number columns, instance, align = \"lccrl\" left-align first column, center second third, right-align column four left-align fifth column. HTML-tables, may one \"center\", \"left\" \"right\". group_by Name column x indicates grouping tables. applies format = \"html\". group_by passed gt::gt(groupname_col = group_by). zap_small Logical, TRUE, small values rounded digits decimal places. FALSE, values decimal places digits printed scientific notation. table_width Numeric, \"auto\", indicating width complete table. table_width = \"auto\" table wider current width (.e. line length) console (source textual output, like markdown files), table split two parts. Else, table_width numeric table rows larger table_width, table split two parts. verbose Toggle messages warnings. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/export_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Data frame and Tables Pretty Formatting — apply_table_theme","text":"data frame character format.","code":""},{"path":"https://easystats.github.io/insight/reference/export_table.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Data frame and Tables Pretty Formatting — apply_table_theme","text":"values caption, subtitle footer can also provided attributes x, e.g. caption = NULL x attribute table_caption, value attribute used table caption. table_subtitle attribute subtitle, table_footer footer.","code":""},{"path":[]},{"path":"https://easystats.github.io/insight/reference/export_table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Data frame and Tables Pretty Formatting — apply_table_theme","text":"","code":"export_table(head(iris)) #> Sepal.Length | Sepal.Width | Petal.Length | Petal.Width | Species #> ----------------------------------------------------------------- #> 5.10 | 3.50 | 1.40 | 0.20 | setosa #> 4.90 | 3.00 | 1.40 | 0.20 | setosa #> 4.70 | 3.20 | 1.30 | 0.20 | setosa #> 4.60 | 3.10 | 1.50 | 0.20 | setosa #> 5.00 | 3.60 | 1.40 | 0.20 | setosa #> 5.40 | 3.90 | 1.70 | 0.40 | setosa export_table(head(iris), cross = \"+\") #> Sepal.Length | Sepal.Width | Petal.Length | Petal.Width | Species #> -------------+-------------+--------------+-------------+-------- #> 5.10 | 3.50 | 1.40 | 0.20 | setosa #> 4.90 | 3.00 | 1.40 | 0.20 | setosa #> 4.70 | 3.20 | 1.30 | 0.20 | setosa #> 4.60 | 3.10 | 1.50 | 0.20 | setosa #> 5.00 | 3.60 | 1.40 | 0.20 | setosa #> 5.40 | 3.90 | 1.70 | 0.40 | setosa export_table(head(iris), sep = \" \", header = \"*\", digits = 1) #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> ********************************************************* #> 5.1 3.5 1.4 0.2 setosa #> 4.9 3.0 1.4 0.2 setosa #> 4.7 3.2 1.3 0.2 setosa #> 4.6 3.1 1.5 0.2 setosa #> 5.0 3.6 1.4 0.2 setosa #> 5.4 3.9 1.7 0.4 setosa # split longer tables export_table(head(iris), table_width = 30) #> Sepal.Length | Sepal.Width #> -------------------------- #> 5.10 | 3.50 #> 4.90 | 3.00 #> 4.70 | 3.20 #> 4.60 | 3.10 #> 5.00 | 3.60 #> 5.40 | 3.90 #> #> Sepal.Length | Petal.Length #> --------------------------- #> 5.10 | 1.40 #> 4.90 | 1.40 #> 4.70 | 1.30 #> 4.60 | 1.50 #> 5.00 | 1.40 #> 5.40 | 1.70 #> #> Sepal.Length | Petal.Width | Species #> ------------------------------------ #> 5.10 | 0.20 | setosa #> 4.90 | 0.20 | setosa #> 4.70 | 0.20 | setosa #> 4.60 | 0.20 | setosa #> 5.00 | 0.20 | setosa #> 5.40 | 0.40 | setosa # \\donttest{ # colored footers data(iris) x <- as.data.frame(iris[1:5, ]) attr(x, \"table_footer\") <- c(\"This is a yellow footer line.\", \"yellow\") export_table(x) #> Sepal.Length | Sepal.Width | Petal.Length | Petal.Width | Species #> ----------------------------------------------------------------- #> 5.10 | 3.50 | 1.40 | 0.20 | setosa #> 4.90 | 3.00 | 1.40 | 0.20 | setosa #> 4.70 | 3.20 | 1.30 | 0.20 | setosa #> 4.60 | 3.10 | 1.50 | 0.20 | setosa #> 5.00 | 3.60 | 1.40 | 0.20 | setosa #> This is a yellow footer line. attr(x, \"table_footer\") <- list( c(\"\\nA yellow line\", \"yellow\"), c(\"\\nAnd a red line\", \"red\"), c(\"\\nAnd a blue line\", \"blue\") ) export_table(x) #> Sepal.Length | Sepal.Width | Petal.Length | Petal.Width | Species #> ----------------------------------------------------------------- #> 5.10 | 3.50 | 1.40 | 0.20 | setosa #> 4.90 | 3.00 | 1.40 | 0.20 | setosa #> 4.70 | 3.20 | 1.30 | 0.20 | setosa #> 4.60 | 3.10 | 1.50 | 0.20 | setosa #> 5.00 | 3.60 | 1.40 | 0.20 | setosa #> #> A yellow line #> And a red line #> And a blue line attr(x, \"table_footer\") <- list( c(\"Without the \", \"yellow\"), c(\"new-line character \", \"red\"), c(\"we can have multiple colors per line.\", \"blue\") ) export_table(x) #> Sepal.Length | Sepal.Width | Petal.Length | Petal.Width | Species #> ----------------------------------------------------------------- #> 5.10 | 3.50 | 1.40 | 0.20 | setosa #> 4.90 | 3.00 | 1.40 | 0.20 | setosa #> 4.70 | 3.20 | 1.30 | 0.20 | setosa #> 4.60 | 3.10 | 1.50 | 0.20 | setosa #> 5.00 | 3.60 | 1.40 | 0.20 | setosa #> Without the new-line character we can have multiple colors per line. # } # column-width d <- data.frame( x = c(1, 2, 3), y = c(100, 200, 300), z = c(10000, 20000, 30000) ) export_table(d) #> x | y | z #> --------------- #> 1 | 100 | 10000 #> 2 | 200 | 20000 #> 3 | 300 | 30000 export_table(d, width = 8) #> x | y | z #> ------------------------------ #> 1 | 100 | 10000 #> 2 | 200 | 20000 #> 3 | 300 | 30000 export_table(d, width = c(x = 5, z = 10)) #> x | y | z #> ------------------------ #> 1 | 100 | 10000 #> 2 | 200 | 20000 #> 3 | 300 | 30000 export_table(d, width = c(x = 5, y = 5, z = 10), align = \"lcr\") #> x | y | z #> -------------------------- #> 1 | 100 | 10000 #> 2 | 200 | 20000 #> 3 | 300 | 30000"},{"path":"https://easystats.github.io/insight/reference/find_algorithm.html","id":null,"dir":"Reference","previous_headings":"","what":"Find sampling algorithm and optimizers — find_algorithm","title":"Find sampling algorithm and optimizers — find_algorithm","text":"Returns information sampling estimation algorithm well optimization functions, Bayesian model information chains, iterations warmup-samples.","code":""},{"path":"https://easystats.github.io/insight/reference/find_algorithm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find sampling algorithm and optimizers — find_algorithm","text":"","code":"find_algorithm(x, ...)"},{"path":"https://easystats.github.io/insight/reference/find_algorithm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find sampling algorithm and optimizers — find_algorithm","text":"x fitted model. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/find_algorithm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find sampling algorithm and optimizers — find_algorithm","text":"list elements depending model. frequentist models: algorithm, instance \"OLS\" \"ML\" optimizer, name optimizing function, applies specific models (like gam) frequentist mixed models: algorithm, instance \"REML\" \"ML\" optimizer, name optimizing function Bayesian models: algorithm, algorithm chains, number chains iterations, number iterations per chain warmup, number warmups per chain","code":""},{"path":"https://easystats.github.io/insight/reference/find_algorithm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find sampling algorithm and optimizers — find_algorithm","text":"","code":"data(sleepstudy, package = \"lme4\") m <- lme4::lmer(Reaction ~ Days + (1 | Subject), data = sleepstudy) find_algorithm(m) #> $algorithm #> [1] \"REML\" #> #> $optimizer #> [1] \"nloptwrap\" #> # \\donttest{ data(sleepstudy, package = \"lme4\") m <- suppressWarnings(rstanarm::stan_lmer( Reaction ~ Days + (1 | Subject), data = sleepstudy, refresh = 0 )) find_algorithm(m) #> $algorithm #> [1] \"sampling\" #> #> $chains #> [1] 4 #> #> $iterations #> [1] 2000 #> #> $warmup #> [1] 1000 #> # }"},{"path":"https://easystats.github.io/insight/reference/find_formula.html","id":null,"dir":"Reference","previous_headings":"","what":"Find model formula — find_formula","title":"Find model formula — find_formula","text":"Returns formula(s) different parts model (like fixed random effects, zero-inflated component, ...). formula_ok() checks model formula valid syntax regarding writing TRUE instead T inside poly() data names used (.e. data$variable, rather variable).","code":""},{"path":"https://easystats.github.io/insight/reference/find_formula.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find model formula — find_formula","text":"","code":"find_formula(x, ...) formula_ok(x, verbose = TRUE, ...) # Default S3 method find_formula(x, verbose = TRUE, ...) # S3 method for class 'nestedLogit' find_formula(x, dichotomies = FALSE, verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/find_formula.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find model formula — find_formula","text":"x fitted model. ... Currently used. verbose Toggle warnings. dichotomies Logical, model nestedLogit objects, returns formulas dichotomies.","code":""},{"path":"https://easystats.github.io/insight/reference/find_formula.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find model formula — find_formula","text":"list formulas describe model. simple models, one list-element, conditional, returned. complex models, returned list may following elements: conditional, \"fixed effects\" part model (context fixed-effects instrumental variable regression, also called regressors) . One exception DirichletRegModel models DirichletReg, two three components, depending model. random, \"random effects\" part model (id gee-models similar) zero_inflated, \"fixed effects\" part zero-inflation component model zero_inflated_random, \"random effects\" part zero-inflation component model dispersion, dispersion formula instruments, fixed-effects instrumental variable regressions like ivreg::ivreg(), lfe::felm() plm::plm(), instrumental variables cluster, fixed-effects regressions like lfe::felm(), cluster specification correlation, models correlation-component like nlme::gls(), formula describes correlation structure scale, distributional models mgcv::gaulss() family fitted mgcv::gam(), formula describes scale parameter slopes, fixed-effects individual-slope models like feisr::feis(), formula slope parameters precision, DirichletRegModel models DirichletReg, parametrization (.e. model) \"alternative\".","code":""},{"path":"https://easystats.github.io/insight/reference/find_formula.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Find model formula — find_formula","text":"models class lme gls correlation-component returned, explicitly defined named argument (form), e.g. corAR1(form = ~1 | Mare)","code":""},{"path":"https://easystats.github.io/insight/reference/find_formula.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find model formula — find_formula","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_formula(m) #> $conditional #> mpg ~ wt + cyl + vs #> #> #> attr(,\"class\") #> [1] \"insight_formula\" \"list\" m <- lme4::lmer(Sepal.Length ~ Sepal.Width + (1 | Species), data = iris) f <- find_formula(m) f #> $conditional #> Sepal.Length ~ Sepal.Width #> #> #> $random #> ~1 | Species #> #> #> attr(,\"class\") #> [1] \"insight_formula\" \"list\" format(f) #> [1] \"Sepal.Length ~ Sepal.Width + (~1 | Species)\""},{"path":"https://easystats.github.io/insight/reference/find_interactions.html","id":null,"dir":"Reference","previous_headings":"","what":"Find interaction terms from models — find_interactions","title":"Find interaction terms from models — find_interactions","text":"Returns lowest highest order interaction terms model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_interactions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find interaction terms from models — find_interactions","text":"","code":"find_interactions( x, component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\", \"dispersion\", \"instruments\"), flatten = FALSE )"},{"path":"https://easystats.github.io/insight/reference/find_interactions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find interaction terms from models — find_interactions","text":"x fitted model. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed.","code":""},{"path":"https://easystats.github.io/insight/reference/find_interactions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find interaction terms from models — find_interactions","text":"list character vectors represent interaction terms. Depending component, returned list following elements (NULL, model interaction term): conditional, interaction terms belong \"fixed effects\" terms model zero_inflated, interaction terms belong \"fixed effects\" terms zero-inflation component model instruments, fixed-effects regressions like ivreg, felm plm, interaction terms belong instrumental variables","code":""},{"path":"https://easystats.github.io/insight/reference/find_interactions.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find interaction terms from models — find_interactions","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_interactions(m) #> NULL m <- lm(mpg ~ wt * cyl + vs * hp * gear + carb, data = mtcars) find_interactions(m) #> $conditional #> [1] \"wt:cyl\" \"vs:hp\" \"vs:gear\" \"hp:gear\" \"vs:hp:gear\" #>"},{"path":"https://easystats.github.io/insight/reference/find_offset.html","id":null,"dir":"Reference","previous_headings":"","what":"Find possible offset terms in a model — find_offset","title":"Find possible offset terms in a model — find_offset","text":"Returns character vector name(s) offset terms.","code":""},{"path":"https://easystats.github.io/insight/reference/find_offset.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find possible offset terms in a model — find_offset","text":"","code":"find_offset(x)"},{"path":"https://easystats.github.io/insight/reference/find_offset.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find possible offset terms in a model — find_offset","text":"x fitted model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_offset.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find possible offset terms in a model — find_offset","text":"character vector name(s) offset terms.","code":""},{"path":"https://easystats.github.io/insight/reference/find_offset.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find possible offset terms in a model — find_offset","text":"","code":"# Generate some zero-inflated data set.seed(123) N <- 100 # Samples x <- runif(N, 0, 10) # Predictor off <- rgamma(N, 3, 2) # Offset variable yhat <- -1 + x * 0.5 + log(off) # Prediction on log scale dat <- data.frame(y = NA, x, logOff = log(off)) dat$y <- rpois(N, exp(yhat)) # Poisson process dat$y <- ifelse(rbinom(N, 1, 0.3), 0, dat$y) # Zero-inflation process m1 <- zeroinfl(y ~ offset(logOff) + x | 1, data = dat, dist = \"poisson\") find_offset(m1) #> [1] \"logOff\" m2 <- zeroinfl(y ~ x | 1, data = dat, offset = logOff, dist = \"poisson\") find_offset(m2) #> [1] \"logOff\""},{"path":"https://easystats.github.io/insight/reference/find_parameters.BGGM.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of model parameters from Bayesian models — find_parameters.BGGM","title":"Find names of model parameters from Bayesian models — find_parameters.BGGM","text":"Returns names model parameters, like typically appear summary() output. Bayesian models, parameter names equal column names posterior samples coercion .data.frame().","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.BGGM.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of model parameters from Bayesian models — find_parameters.BGGM","text":"","code":"# S3 method for class 'BGGM' find_parameters( x, component = c(\"correlation\", \"conditional\", \"intercept\", \"all\"), flatten = FALSE, ... ) # S3 method for class 'BFBayesFactor' find_parameters( x, effects = c(\"all\", \"fixed\", \"random\"), component = c(\"all\", \"extra\"), flatten = FALSE, ... ) # S3 method for class 'MCMCglmm' find_parameters(x, effects = c(\"all\", \"fixed\", \"random\"), flatten = FALSE, ...) # S3 method for class 'bamlss' find_parameters( x, flatten = FALSE, component = c(\"all\", \"conditional\", \"location\", \"distributional\", \"auxiliary\"), parameters = NULL, ... ) # S3 method for class 'brmsfit' find_parameters( x, effects = \"all\", component = \"all\", flatten = FALSE, parameters = NULL, ... ) # S3 method for class 'bayesx' find_parameters( x, component = c(\"all\", \"conditional\", \"smooth_terms\"), flatten = FALSE, parameters = NULL, ... ) # S3 method for class 'stanreg' find_parameters( x, effects = c(\"all\", \"fixed\", \"random\"), component = c(\"location\", \"all\", \"conditional\", \"smooth_terms\", \"sigma\", \"distributional\", \"auxiliary\"), flatten = FALSE, parameters = NULL, ... ) # S3 method for class 'stanmvreg' find_parameters( x, effects = c(\"all\", \"fixed\", \"random\"), component = c(\"location\", \"all\", \"conditional\", \"smooth_terms\", \"sigma\", \"distributional\", \"auxiliary\"), flatten = FALSE, parameters = NULL, ... ) # S3 method for class 'sim.merMod' find_parameters( x, effects = c(\"all\", \"fixed\", \"random\"), flatten = FALSE, parameters = NULL, ... )"},{"path":"https://easystats.github.io/insight/reference/find_parameters.BGGM.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of model parameters from Bayesian models — find_parameters.BGGM","text":"x fitted model. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. ... Currently used. effects parameters fixed effects, random effects returned? applies mixed models. May abbreviated. parameters Regular expression pattern describes parameters returned.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.BGGM.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of model parameters from Bayesian models — find_parameters.BGGM","text":"list parameter names. simple models, one list-element, conditional, returned. complex models, returned list may following elements: conditional, \"fixed effects\" part model random, \"random effects\" part model zero_inflated, \"fixed effects\" part zero-inflation component model zero_inflated_random, \"random effects\" part zero-inflation component model smooth_terms, smooth parameters Furthermore, models, especially brms, can also return auxiliary parameters. may one following: sigma, residual standard deviation (auxiliary parameter) dispersion, dispersion parameters (auxiliary parameter) beta, beta parameter (auxiliary parameter) simplex, simplex parameters monotonic effects (brms ) mix, mixture parameters (brms ) shiftprop, shifted proportion parameters (brms )","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.BGGM.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of model parameters from Bayesian models — find_parameters.BGGM","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_parameters(m) #> $conditional #> [1] \"(Intercept)\" \"wt\" \"cyl\" \"vs\" #>"},{"path":"https://easystats.github.io/insight/reference/find_parameters.averaging.html","id":null,"dir":"Reference","previous_headings":"","what":"Find model parameters from models with special components — find_parameters.averaging","title":"Find model parameters from models with special components — find_parameters.averaging","text":"Returns names model parameters, like typically appear summary() output.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.averaging.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find model parameters from models with special components — find_parameters.averaging","text":"","code":"# S3 method for class 'averaging' find_parameters(x, component = c(\"conditional\", \"full\"), flatten = FALSE, ...) # S3 method for class 'betareg' find_parameters( x, component = c(\"all\", \"conditional\", \"precision\", \"location\", \"distributional\", \"auxiliary\"), flatten = FALSE, ... ) # S3 method for class 'DirichletRegModel' find_parameters( x, component = c(\"all\", \"conditional\", \"precision\", \"location\", \"distributional\", \"auxiliary\"), flatten = FALSE, ... ) # S3 method for class 'mjoint' find_parameters( x, component = c(\"all\", \"conditional\", \"survival\"), flatten = FALSE, ... ) # S3 method for class 'glmx' find_parameters( x, component = c(\"all\", \"conditional\", \"extra\"), flatten = FALSE, ... )"},{"path":"https://easystats.github.io/insight/reference/find_parameters.averaging.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find model parameters from models with special components — find_parameters.averaging","text":"x fitted model. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.averaging.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find model parameters from models with special components — find_parameters.averaging","text":"list parameter names. returned list may following elements: conditional, \"fixed effects\" part model. full, parameters full model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.averaging.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find model parameters from models with special components — find_parameters.averaging","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_parameters(m) #> $conditional #> [1] \"(Intercept)\" \"wt\" \"cyl\" \"vs\" #>"},{"path":"https://easystats.github.io/insight/reference/find_parameters.betamfx.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of model parameters from marginal effects models — find_parameters.betamfx","title":"Find names of model parameters from marginal effects models — find_parameters.betamfx","text":"Returns names model parameters, like typically appear summary() output.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.betamfx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of model parameters from marginal effects models — find_parameters.betamfx","text":"","code":"# S3 method for class 'betamfx' find_parameters( x, component = c(\"all\", \"conditional\", \"precision\", \"marginal\", \"location\", \"distributional\", \"auxiliary\"), flatten = FALSE, ... ) # S3 method for class 'logitmfx' find_parameters( x, component = c(\"all\", \"conditional\", \"marginal\", \"location\"), flatten = FALSE, ... )"},{"path":"https://easystats.github.io/insight/reference/find_parameters.betamfx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of model parameters from marginal effects models — find_parameters.betamfx","text":"x fitted model. component type parameters return, parameters conditional model, zero-inflated part model, dispersion term, instrumental variables marginal effects returned? Applies models zero-inflated /dispersion formula, models instrumental variables (called fixed-effects regressions), models marginal effects mfx. May abbreviated. Note conditional component also called count mean component, depending model. three convenient shortcuts: component = \"\" returns possible parameters. component = \"location\", location parameters conditional, zero_inflated, smooth_terms, instruments returned (everything fixed random effects - depending effects argument - auxiliary parameters). component = \"distributional\" (\"auxiliary\"), components like sigma, dispersion, beta precision (auxiliary parameters) returned. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.betamfx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of model parameters from marginal effects models — find_parameters.betamfx","text":"list parameter names. returned list may following elements: conditional, \"fixed effects\" part model. marginal, marginal effects. precision, precision parameter.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.betamfx.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of model parameters from marginal effects models — find_parameters.betamfx","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_parameters(m) #> $conditional #> [1] \"(Intercept)\" \"wt\" \"cyl\" \"vs\" #>"},{"path":"https://easystats.github.io/insight/reference/find_parameters.emmGrid.html","id":null,"dir":"Reference","previous_headings":"","what":"Find model parameters from estimated marginal means objects — find_parameters.emmGrid","title":"Find model parameters from estimated marginal means objects — find_parameters.emmGrid","text":"Returns parameter names model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.emmGrid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find model parameters from estimated marginal means objects — find_parameters.emmGrid","text":"","code":"# S3 method for class 'emmGrid' find_parameters(x, flatten = FALSE, merge_parameters = FALSE, ...)"},{"path":"https://easystats.github.io/insight/reference/find_parameters.emmGrid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find model parameters from estimated marginal means objects — find_parameters.emmGrid","text":"x fitted model. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. merge_parameters Logical, TRUE x multiple columns parameter names (like emmGrid objects may ), merged single parameter column, parameters names values values. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.emmGrid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find model parameters from estimated marginal means objects — find_parameters.emmGrid","text":"list parameter names. simple models, one list-element, conditional, returned.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.emmGrid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find model parameters from estimated marginal means objects — find_parameters.emmGrid","text":"","code":"data(mtcars) model <- lm(mpg ~ wt * factor(cyl), data = mtcars) emm <- emmeans(model, c(\"wt\", \"cyl\")) find_parameters(emm) #> $emmeans #> [1] 3.21725 3.21725 3.21725 #>"},{"path":"https://easystats.github.io/insight/reference/find_parameters.gamlss.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of model parameters from generalized additive models — find_parameters.gamlss","title":"Find names of model parameters from generalized additive models — find_parameters.gamlss","text":"Returns names model parameters, like typically appear summary() output.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.gamlss.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of model parameters from generalized additive models — find_parameters.gamlss","text":"","code":"# S3 method for class 'gamlss' find_parameters(x, flatten = FALSE, ...) # S3 method for class 'gam' find_parameters( x, component = c(\"all\", \"conditional\", \"smooth_terms\", \"location\"), flatten = FALSE, ... )"},{"path":"https://easystats.github.io/insight/reference/find_parameters.gamlss.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of model parameters from generalized additive models — find_parameters.gamlss","text":"x fitted model. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. ... Currently used. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.gamlss.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of model parameters from generalized additive models — find_parameters.gamlss","text":"list parameter names. returned list may following elements: conditional, \"fixed effects\" part model. smooth_terms, smooth parameters.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.gamlss.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of model parameters from generalized additive models — find_parameters.gamlss","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_parameters(m) #> $conditional #> [1] \"(Intercept)\" \"wt\" \"cyl\" \"vs\" #>"},{"path":"https://easystats.github.io/insight/reference/find_parameters.glmmTMB.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of model parameters from mixed models — find_parameters.glmmTMB","title":"Find names of model parameters from mixed models — find_parameters.glmmTMB","text":"Returns names model parameters, like typically appear summary() output.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.glmmTMB.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of model parameters from mixed models — find_parameters.glmmTMB","text":"","code":"# S3 method for class 'glmmTMB' find_parameters( x, effects = c(\"all\", \"fixed\", \"random\"), component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\", \"dispersion\"), flatten = FALSE, ... ) # S3 method for class 'nlmerMod' find_parameters( x, effects = c(\"all\", \"fixed\", \"random\"), component = c(\"all\", \"conditional\", \"nonlinear\"), flatten = FALSE, ... ) # S3 method for class 'hglm' find_parameters( x, effects = c(\"all\", \"fixed\", \"random\"), component = c(\"all\", \"conditional\", \"dispersion\"), flatten = FALSE, ... ) # S3 method for class 'merMod' find_parameters(x, effects = c(\"all\", \"fixed\", \"random\"), flatten = FALSE, ...)"},{"path":"https://easystats.github.io/insight/reference/find_parameters.glmmTMB.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of model parameters from mixed models — find_parameters.glmmTMB","text":"x fitted model. effects parameters fixed effects, random effects returned? applies mixed models. May abbreviated. component type parameters return, parameters conditional model, zero-inflated part model dispersion term? Applies models zero-inflated /dispersion formula. Note conditional component also called count mean component, depending model. three convenient shortcuts: component = \"\" returns possible parameters. component = \"location\", location parameters conditional zero_inflated returned (everything fixed random effects - depending effects argument - auxiliary parameters). component = \"distributional\" (\"auxiliary\"), components like sigma dispersion (auxiliary parameters) returned. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.glmmTMB.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of model parameters from mixed models — find_parameters.glmmTMB","text":"list parameter names. returned list may following elements: conditional, \"fixed effects\" part model. random, \"random effects\" part model. zero_inflated, \"fixed effects\" part zero-inflation component model. zero_inflated_random, \"random effects\" part zero-inflation component model. dispersion, dispersion parameters (auxiliary parameter) nonlinear, parameters nonlinear formula.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.glmmTMB.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of model parameters from mixed models — find_parameters.glmmTMB","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_parameters(m) #> $conditional #> [1] \"(Intercept)\" \"wt\" \"cyl\" \"vs\" #>"},{"path":"https://easystats.github.io/insight/reference/find_parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of model parameters — find_parameters","title":"Find names of model parameters — find_parameters","text":"Returns names model parameters, like typically appear summary() output. Bayesian models, parameter names equal column names posterior samples coercion .data.frame(). See documentation object's class: Bayesian models (rstanarm, brms, MCMCglmm, ...) Generalized additive models (mgcv, VGAM, ...) Marginal effects models (mfx) Estimated marginal means (emmeans) Mixed models (lme4, glmmTMB, GLMMadaptive, ...) Zero-inflated hurdle models (pscl, ...) Models special components (betareg, MuMIn, ...)","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of model parameters — find_parameters","text":"","code":"find_parameters(x, ...) # Default S3 method find_parameters(x, flatten = FALSE, verbose = TRUE, ...) # S3 method for class 'pgmm' find_parameters(x, component = c(\"conditional\", \"all\"), flatten = FALSE, ...) # S3 method for class 'nls' find_parameters( x, component = c(\"all\", \"conditional\", \"nonlinear\"), flatten = FALSE, ... )"},{"path":"https://easystats.github.io/insight/reference/find_parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of model parameters — find_parameters","text":"x fitted model. ... Currently used. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. verbose Toggle messages warnings. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of model parameters — find_parameters","text":"list parameter names. simple models, one list-element, conditional, returned.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.html","id":"model-components","dir":"Reference","previous_headings":"","what":"Model components","title":"Find names of model parameters — find_parameters","text":"Possible values component argument depend model class. Following valid options: \"\": returns model components, applies models, effect models just conditional model component. \"conditional\": returns conditional component, .e. \"fixed effects\" terms model. effect models just conditional model component. \"smooth_terms\": returns smooth terms, applies GAMs (similar models may contain smooth terms). \"zero_inflated\" (\"zi\"): returns zero-inflation component. \"dispersion\": returns dispersion model component. common models zero-inflation can model dispersion parameter. \"instruments\": instrumental-variable fixed effects regression, returns instruments. \"location\": returns location parameters conditional, zero_inflated, smooth_terms, instruments (everything fixed random effects - depending effects argument - auxiliary parameters). \"distributional\" (\"auxiliary\"): components like sigma, dispersion, beta precision (auxiliary parameters) returned.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of model parameters — find_parameters","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_parameters(m) #> $conditional #> [1] \"(Intercept)\" \"wt\" \"cyl\" \"vs\" #>"},{"path":"https://easystats.github.io/insight/reference/find_parameters.zeroinfl.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of model parameters from zero-inflated models — find_parameters.zeroinfl","title":"Find names of model parameters from zero-inflated models — find_parameters.zeroinfl","text":"Returns names model parameters, like typically appear summary() output.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.zeroinfl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of model parameters from zero-inflated models — find_parameters.zeroinfl","text":"","code":"# S3 method for class 'zeroinfl' find_parameters( x, component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\"), flatten = FALSE, ... ) # S3 method for class 'mhurdle' find_parameters( x, component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\", \"infrequent_purchase\", \"ip\", \"auxiliary\"), flatten = FALSE, ... )"},{"path":"https://easystats.github.io/insight/reference/find_parameters.zeroinfl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of model parameters from zero-inflated models — find_parameters.zeroinfl","text":"x fitted model. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.zeroinfl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of model parameters from zero-inflated models — find_parameters.zeroinfl","text":"list parameter names. returned list may following elements: conditional, \"fixed effects\" part model. zero_inflated, \"fixed effects\" part zero-inflation component model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_parameters.zeroinfl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of model parameters from zero-inflated models — find_parameters.zeroinfl","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_parameters(m) #> $conditional #> [1] \"(Intercept)\" \"wt\" \"cyl\" \"vs\" #>"},{"path":"https://easystats.github.io/insight/reference/find_predictors.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of model predictors — find_predictors","title":"Find names of model predictors — find_predictors","text":"Returns names predictor variables different parts model (like fixed random effects, zero-inflated component, ...). Unlike find_parameters(), names find_predictors() match original variable names data used fit model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_predictors.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of model predictors — find_predictors","text":"","code":"find_predictors(x, ...) # Default S3 method find_predictors( x, effects = c(\"fixed\", \"random\", \"all\"), component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\", \"dispersion\", \"instruments\", \"correlation\", \"smooth_terms\"), flatten = FALSE, verbose = TRUE, ... ) # S3 method for class 'afex_aov' find_predictors( x, effects = c(\"fixed\", \"random\", \"all\"), component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\", \"dispersion\", \"instruments\", \"correlation\", \"smooth_terms\"), flatten = FALSE, verbose = TRUE, ... )"},{"path":"https://easystats.github.io/insight/reference/find_predictors.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of model predictors — find_predictors","text":"x fitted model. ... Currently used. effects variables fixed effects, random effects returned? applies mixed models. May abbreviated. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/find_predictors.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of model predictors — find_predictors","text":"list character vectors represent name(s) predictor variables. Depending combination arguments effects component, returned list following elements: conditional, \"fixed effects\" terms model random, \"random effects\" terms model zero_inflated, \"fixed effects\" terms zero-inflation component model zero_inflated_random, \"random effects\" terms zero-inflation component model dispersion, dispersion terms instruments, fixed-effects regressions like ivreg, felm plm, instrumental variables correlation, models correlation-component like gls, variables used describe correlation structure","code":""},{"path":"https://easystats.github.io/insight/reference/find_predictors.html","id":"model-components","dir":"Reference","previous_headings":"","what":"Model components","title":"Find names of model predictors — find_predictors","text":"Possible values component argument depend model class. Following valid options: \"\": returns model components, applies models, effect models just conditional model component. \"conditional\": returns conditional component, .e. \"fixed effects\" terms model. effect models just conditional model component. \"smooth_terms\": returns smooth terms, applies GAMs (similar models may contain smooth terms). \"zero_inflated\" (\"zi\"): returns zero-inflation component. \"dispersion\": returns dispersion model component. common models zero-inflation can model dispersion parameter. \"instruments\": instrumental-variable fixed effects regression, returns instruments. \"location\": returns location parameters conditional, zero_inflated, smooth_terms, instruments (everything fixed random effects - depending effects argument - auxiliary parameters). \"distributional\" (\"auxiliary\"): components like sigma, dispersion, beta precision (auxiliary parameters) returned.","code":""},{"path":"https://easystats.github.io/insight/reference/find_predictors.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of model predictors — find_predictors","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_predictors(m) #> $conditional #> [1] \"wt\" \"cyl\" \"vs\" #>"},{"path":"https://easystats.github.io/insight/reference/find_random.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of random effects — find_random","title":"Find names of random effects — find_random","text":"Return name grouping factors mixed effects models.","code":""},{"path":"https://easystats.github.io/insight/reference/find_random.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of random effects — find_random","text":"","code":"find_random(x, split_nested = FALSE, flatten = FALSE)"},{"path":"https://easystats.github.io/insight/reference/find_random.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of random effects — find_random","text":"x fitted mixed model. split_nested Logical, TRUE, terms nested random effects returned separated elements, single string colon. See 'Examples'. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed.","code":""},{"path":"https://easystats.github.io/insight/reference/find_random.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of random effects — find_random","text":"list character vectors represent name(s) random effects (grouping factors). Depending model, returned list following elements: random, \"random effects\" terms conditional part model zero_inflated_random, \"random effects\" terms zero-inflation component model","code":""},{"path":"https://easystats.github.io/insight/reference/find_random.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of random effects — find_random","text":"","code":"data(sleepstudy, package = \"lme4\") sleepstudy$mygrp <- sample(1:5, size = 180, replace = TRUE) sleepstudy$mysubgrp <- NA for (i in 1:5) { filter_group <- sleepstudy$mygrp == i sleepstudy$mysubgrp[filter_group] <- sample(1:30, size = sum(filter_group), replace = TRUE) } m <- lme4::lmer( Reaction ~ Days + (1 | mygrp / mysubgrp) + (1 | Subject), data = sleepstudy ) #> boundary (singular) fit: see help('isSingular') find_random(m) #> $random #> [1] \"mysubgrp:mygrp\" \"mygrp\" \"Subject\" #> find_random(m, split_nested = TRUE) #> $random #> [1] \"mysubgrp\" \"mygrp\" \"Subject\" #>"},{"path":"https://easystats.github.io/insight/reference/find_random_slopes.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of random slopes — find_random_slopes","title":"Find names of random slopes — find_random_slopes","text":"Return name random slopes mixed effects models.","code":""},{"path":"https://easystats.github.io/insight/reference/find_random_slopes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of random slopes — find_random_slopes","text":"","code":"find_random_slopes(x)"},{"path":"https://easystats.github.io/insight/reference/find_random_slopes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of random slopes — find_random_slopes","text":"x fitted mixed model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_random_slopes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of random slopes — find_random_slopes","text":"list character vectors name(s) random slopes, NULL model random slopes. Depending model, returned list following elements: random, random slopes conditional part model zero_inflated_random, random slopes zero-inflation component model","code":""},{"path":"https://easystats.github.io/insight/reference/find_random_slopes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of random slopes — find_random_slopes","text":"","code":"data(sleepstudy, package = \"lme4\") m <- lme4::lmer(Reaction ~ Days + (1 + Days | Subject), data = sleepstudy) find_random_slopes(m) #> $random #> [1] \"Days\" #>"},{"path":"https://easystats.github.io/insight/reference/find_response.html","id":null,"dir":"Reference","previous_headings":"","what":"Find name of the response variable — find_response","title":"Find name of the response variable — find_response","text":"Returns name(s) response variable(s) model object.","code":""},{"path":"https://easystats.github.io/insight/reference/find_response.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find name of the response variable — find_response","text":"","code":"find_response(x, combine = TRUE, ...) # S3 method for class 'mjoint' find_response( x, combine = TRUE, component = c(\"conditional\", \"survival\", \"all\"), ... ) # S3 method for class 'joint' find_response( x, combine = TRUE, component = c(\"conditional\", \"survival\", \"all\"), ... )"},{"path":"https://easystats.github.io/insight/reference/find_response.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find name of the response variable — find_response","text":"x fitted model. combine Logical, TRUE response matrix-column, name response matches notation formula, instance also contain patterns like \"cbind(...)\". Else, original variable names matrix-column returned. See 'Examples'. ... Currently used. component Character, x joint model, argument can used specify component return. Possible values \"conditional\", \"survival\" \"\".","code":""},{"path":"https://easystats.github.io/insight/reference/find_response.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find name of the response variable — find_response","text":"name(s) response variable(s) x character vector, NULL response variable found.","code":""},{"path":"https://easystats.github.io/insight/reference/find_response.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find name of the response variable — find_response","text":"","code":"data(cbpp, package = \"lme4\") cbpp$trials <- cbpp$size - cbpp$incidence m <- glm(cbind(incidence, trials) ~ period, data = cbpp, family = binomial) find_response(m, combine = TRUE) #> [1] \"cbind(incidence, trials)\" find_response(m, combine = FALSE) #> [1] \"incidence\" \"trials\""},{"path":"https://easystats.github.io/insight/reference/find_smooth.html","id":null,"dir":"Reference","previous_headings":"","what":"Find smooth terms from a model object — find_smooth","title":"Find smooth terms from a model object — find_smooth","text":"Return names smooth terms model object.","code":""},{"path":"https://easystats.github.io/insight/reference/find_smooth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find smooth terms from a model object — find_smooth","text":"","code":"find_smooth(x, flatten = FALSE)"},{"path":"https://easystats.github.io/insight/reference/find_smooth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find smooth terms from a model object — find_smooth","text":"x (gam) model. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed.","code":""},{"path":"https://easystats.github.io/insight/reference/find_smooth.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find smooth terms from a model object — find_smooth","text":"character vector name(s) smooth terms.","code":""},{"path":"https://easystats.github.io/insight/reference/find_smooth.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find smooth terms from a model object — find_smooth","text":"","code":"data(iris) model <- mgcv::gam(Petal.Length ~ Petal.Width + s(Sepal.Length), data = iris) find_smooth(model) #> $smooth_terms #> [1] \"s(Sepal.Length)\" #>"},{"path":"https://easystats.github.io/insight/reference/find_statistic.html","id":null,"dir":"Reference","previous_headings":"","what":"Find statistic for model — find_statistic","title":"Find statistic for model — find_statistic","text":"Returns statistic regression model (t-statistic, z-statistic, etc.). Small helper checks model regression model object return statistic used.","code":""},{"path":"https://easystats.github.io/insight/reference/find_statistic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find statistic for model — find_statistic","text":"","code":"find_statistic(x, ...)"},{"path":"https://easystats.github.io/insight/reference/find_statistic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find statistic for model — find_statistic","text":"x object. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/find_statistic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find statistic for model — find_statistic","text":"character describing type statistic. statistic available distribution, NULL returned.","code":""},{"path":"https://easystats.github.io/insight/reference/find_statistic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find statistic for model — find_statistic","text":"","code":"# regression model object data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) find_statistic(m) #> [1] \"t-statistic\""},{"path":"https://easystats.github.io/insight/reference/find_terms.html","id":null,"dir":"Reference","previous_headings":"","what":"Find all model terms — find_terms","title":"Find all model terms — find_terms","text":"Returns list names terms, including response value random effects, \"\". means, --fly tranformations arithmetic expressions like log(), (), .factor() etc. preserved.","code":""},{"path":"https://easystats.github.io/insight/reference/find_terms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find all model terms — find_terms","text":"","code":"find_terms(x, ...) # Default S3 method find_terms(x, flatten = FALSE, as_term_labels = FALSE, verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/find_terms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find all model terms — find_terms","text":"x fitted model. ... Currently used. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. as_term_labels Logical, TRUE, extracts model formula tries access \"term.labels\" attribute. better mimic terms() behaviour even models method, may insufficient, e.g. mixed models. verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/find_terms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find all model terms — find_terms","text":"list (depending model) following elements (character vectors): response, name response variable conditional, names predictor variables conditional model (opposed zero-inflated part model) random, names random effects (grouping factors) zero_inflated, names predictor variables zero-inflated part model zero_inflated_random, names random effects (grouping factors) dispersion, name dispersion terms instruments, names instrumental variables Returns NULL terms found (instance, due problems accessing formula).","code":""},{"path":"https://easystats.github.io/insight/reference/find_terms.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Find all model terms — find_terms","text":"difference find_variables() find_terms() may return variable multiple times case multiple transformations (see examples ), find_variables() returns variable name .","code":""},{"path":"https://easystats.github.io/insight/reference/find_terms.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find all model terms — find_terms","text":"","code":"data(sleepstudy, package = \"lme4\") m <- suppressWarnings(lme4::lmer( log(Reaction) ~ Days + I(Days^2) + (1 + Days + exp(Days) | Subject), data = sleepstudy )) find_terms(m) #> $response #> [1] \"log(Reaction)\" #> #> $conditional #> [1] \"Days\" \"I(Days^2)\" #> #> $random #> [1] \"Days\" \"exp(Days)\" \"Subject\" #> # sometimes, it is necessary to retrieve terms from \"term.labels\" attribute m <- lm(mpg ~ hp * (am + cyl), data = mtcars) find_terms(m, as_term_labels = TRUE) #> $conditional #> [1] \"hp\" \"am\" \"cyl\" \"hp:am\" \"hp:cyl\" #>"},{"path":"https://easystats.github.io/insight/reference/find_transformation.html","id":null,"dir":"Reference","previous_headings":"","what":"Find possible transformation of response variables — find_transformation","title":"Find possible transformation of response variables — find_transformation","text":"functions checks whether transformation, log- exp-transforming, applied response variable (dependent variable) regression formula. Currently, following patterns detected: log, log1p, log2, log10, exp, expm1, sqrt, log(x+), log-log power (2nd power, like (x^2)).","code":""},{"path":"https://easystats.github.io/insight/reference/find_transformation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find possible transformation of response variables — find_transformation","text":"","code":"find_transformation(x)"},{"path":"https://easystats.github.io/insight/reference/find_transformation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find possible transformation of response variables — find_transformation","text":"x regression model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_transformation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find possible transformation of response variables — find_transformation","text":"string, name function applied transformation. Returns \"identity\" transformation, e.g. \"log(x+3)\" specific values added response variables log-transforming. unknown transformations, returns NULL.","code":""},{"path":"https://easystats.github.io/insight/reference/find_transformation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find possible transformation of response variables — find_transformation","text":"","code":"# identity, no transformation model <- lm(Sepal.Length ~ Species, data = iris) find_transformation(model) #> [1] \"identity\" # log-transformation model <- lm(log(Sepal.Length) ~ Species, data = iris) find_transformation(model) #> [1] \"log\" # log+2 model <- lm(log(Sepal.Length + 2) ~ Species, data = iris) find_transformation(model) #> [1] \"log(x+2)\""},{"path":"https://easystats.github.io/insight/reference/find_variables.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of all variables — find_variables","title":"Find names of all variables — find_variables","text":"Returns list names variables, including response value random effects.","code":""},{"path":"https://easystats.github.io/insight/reference/find_variables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of all variables — find_variables","text":"","code":"find_variables( x, effects = \"all\", component = \"all\", flatten = FALSE, verbose = TRUE )"},{"path":"https://easystats.github.io/insight/reference/find_variables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of all variables — find_variables","text":"x fitted model. effects variables fixed effects, random effects returned? applies mixed models. May abbreviated. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. flatten Logical, TRUE, values returned character vector, list. Duplicated values removed. verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/find_variables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of all variables — find_variables","text":"list (depending model) following elements (character vectors): response, name response variable conditional, names predictor variables conditional model (opposed zero-inflated part model) cluster, names cluster grouping variables dispersion, name dispersion terms instruments, names instrumental variables random, names random effects (grouping factors) zero_inflated, names predictor variables zero-inflated part model zero_inflated_random, names random effects (grouping factors)","code":""},{"path":"https://easystats.github.io/insight/reference/find_variables.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Find names of all variables — find_variables","text":"difference find_terms() find_variables() returns variable name , find_terms() may return variable multiple times case transformations arithmetic expressions used formula.","code":""},{"path":"https://easystats.github.io/insight/reference/find_variables.html","id":"model-components","dir":"Reference","previous_headings":"","what":"Model components","title":"Find names of all variables — find_variables","text":"Possible values component argument depend model class. Following valid options: \"\": returns model components, applies models, effect models just conditional model component. \"conditional\": returns conditional component, .e. \"fixed effects\" terms model. effect models just conditional model component. \"smooth_terms\": returns smooth terms, applies GAMs (similar models may contain smooth terms). \"zero_inflated\" (\"zi\"): returns zero-inflation component. \"dispersion\": returns dispersion model component. common models zero-inflation can model dispersion parameter. \"instruments\": instrumental-variable fixed effects regression, returns instruments. \"location\": returns location parameters conditional, zero_inflated, smooth_terms, instruments (everything fixed random effects - depending effects argument - auxiliary parameters). \"distributional\" (\"auxiliary\"): components like sigma, dispersion, beta precision (auxiliary parameters) returned.","code":""},{"path":"https://easystats.github.io/insight/reference/find_variables.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of all variables — find_variables","text":"","code":"data(cbpp, package = \"lme4\") data(sleepstudy, package = \"lme4\") # some data preparation... cbpp$trials <- cbpp$size - cbpp$incidence sleepstudy$mygrp <- sample(1:5, size = 180, replace = TRUE) sleepstudy$mysubgrp <- NA for (i in 1:5) { filter_group <- sleepstudy$mygrp == i sleepstudy$mysubgrp[filter_group] <- sample(1:30, size = sum(filter_group), replace = TRUE) } m1 <- lme4::glmer( cbind(incidence, size - incidence) ~ period + (1 | herd), data = cbpp, family = binomial ) find_variables(m1) #> $response #> [1] \"incidence\" \"size\" #> #> $conditional #> [1] \"period\" #> #> $random #> [1] \"herd\" #> m2 <- lme4::lmer( Reaction ~ Days + (1 | mygrp / mysubgrp) + (1 | Subject), data = sleepstudy ) #> boundary (singular) fit: see help('isSingular') find_variables(m2) #> $response #> [1] \"Reaction\" #> #> $conditional #> [1] \"Days\" #> #> $random #> [1] \"mysubgrp\" \"mygrp\" \"Subject\" #> find_variables(m2, flatten = TRUE) #> [1] \"Reaction\" \"Days\" \"mysubgrp\" \"mygrp\" \"Subject\""},{"path":"https://easystats.github.io/insight/reference/find_weights.html","id":null,"dir":"Reference","previous_headings":"","what":"Find names of model weights — find_weights","title":"Find names of model weights — find_weights","text":"Returns name variable describes weights model.","code":""},{"path":"https://easystats.github.io/insight/reference/find_weights.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find names of model weights — find_weights","text":"","code":"find_weights(x, ...)"},{"path":"https://easystats.github.io/insight/reference/find_weights.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find names of model weights — find_weights","text":"x fitted model. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/find_weights.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find names of model weights — find_weights","text":"name weighting variable character vector, NULL weights specified.","code":""},{"path":"https://easystats.github.io/insight/reference/find_weights.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find names of model weights — find_weights","text":"","code":"data(mtcars) mtcars$weight <- rnorm(nrow(mtcars), 1, .3) m <- lm(mpg ~ wt + cyl + vs, data = mtcars, weights = weight) find_weights(m) #> [1] \"weight\""},{"path":"https://easystats.github.io/insight/reference/fish.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample data set — fish","title":"Sample data set — fish","text":"sample data set, used tests examples.","code":""},{"path":"https://easystats.github.io/insight/reference/format_bf.html","id":null,"dir":"Reference","previous_headings":"","what":"Bayes Factor formatting — format_bf","title":"Bayes Factor formatting — format_bf","text":"Bayes Factor formatting","code":""},{"path":"https://easystats.github.io/insight/reference/format_bf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Bayes Factor formatting — format_bf","text":"","code":"format_bf( bf, stars = FALSE, stars_only = FALSE, name = \"BF\", protect_ratio = FALSE, na_reference = NA, exact = FALSE )"},{"path":"https://easystats.github.io/insight/reference/format_bf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Bayes Factor formatting — format_bf","text":"bf Bayes Factor. stars Add significance stars (e.g., p < .001***). stars_only Return significance stars. name Name prefixing text. Can NULL. protect_ratio values smaller 1 represented ratios? na_reference format missing values (NA). exact large small values reported scientific format (e.g., 4.24e5), truncated values (\"> 1000\" \"< 1/1000\").","code":""},{"path":"https://easystats.github.io/insight/reference/format_bf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Bayes Factor formatting — format_bf","text":"formatted string.","code":""},{"path":"https://easystats.github.io/insight/reference/format_bf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Bayes Factor formatting — format_bf","text":"","code":"format_bf(bfs <- c(0.000045, 0.033, NA, 1557, 3.54)) #> [1] \"BF < 0.001\" \"BF = 0.033\" \"\" \"BF > 1000\" \"BF = 3.54\" format_bf(bfs, exact = TRUE, name = NULL) #> [1] \"4.50e-05\" \"0.033\" \"\" \"1.56e+03\" \"3.54\" format_bf(bfs, stars = TRUE) #> [1] \"BF < 0.001\" \"BF = 0.033\" \"\" \"BF > 1000***\" \"BF = 3.54*\" format_bf(bfs, protect_ratio = TRUE) #> [1] \"BF < 1/1000\" \"BF = 1/30.30\" \"\" \"BF > 1000\" \"BF = 3.54\" format_bf(bfs, protect_ratio = TRUE, exact = TRUE) #> [1] \"BF = 1/2.22e+04\" \"BF = 1/30.30\" \"\" \"BF = 1.56e+03\" #> [5] \"BF = 3.54\" format_bf(bfs, na_reference = 1) #> [1] \"BF < 0.001\" \"BF = 0.033\" \"BF = 1.00\" \"BF > 1000\" \"BF = 3.54\""},{"path":"https://easystats.github.io/insight/reference/format_capitalize.html","id":null,"dir":"Reference","previous_headings":"","what":"Capitalizes the first letter in a string — format_capitalize","title":"Capitalizes the first letter in a string — format_capitalize","text":"function converts first letter string upper case.","code":""},{"path":"https://easystats.github.io/insight/reference/format_capitalize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Capitalizes the first letter in a string — format_capitalize","text":"","code":"format_capitalize(x, verbose = TRUE)"},{"path":"https://easystats.github.io/insight/reference/format_capitalize.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Capitalizes the first letter in a string — format_capitalize","text":"x character vector factor. latter coerced character. objects returned unchanged. verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/format_capitalize.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Capitalizes the first letter in a string — format_capitalize","text":"x, first letter capitalized.","code":""},{"path":"https://easystats.github.io/insight/reference/format_capitalize.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Capitalizes the first letter in a string — format_capitalize","text":"","code":"format_capitalize(\"hello\") #> [1] \"Hello\" format_capitalize(c(\"hello\", \"world\")) #> [1] \"Hello\" \"World\" unique(format_capitalize(iris$Species)) #> [1] \"Setosa\" \"Versicolor\" \"Virginica\""},{"path":"https://easystats.github.io/insight/reference/format_ci.html","id":null,"dir":"Reference","previous_headings":"","what":"Confidence/Credible Interval (CI) Formatting — format_ci","title":"Confidence/Credible Interval (CI) Formatting — format_ci","text":"Confidence/Credible Interval (CI) Formatting","code":""},{"path":"https://easystats.github.io/insight/reference/format_ci.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Confidence/Credible Interval (CI) Formatting — format_ci","text":"","code":"format_ci(CI_low, ...) # S3 method for class 'numeric' format_ci( CI_low, CI_high, ci = 0.95, digits = 2, brackets = TRUE, width = NULL, width_low = width, width_high = width, missing = \"\", zap_small = FALSE, ci_string = \"CI\", ... )"},{"path":"https://easystats.github.io/insight/reference/format_ci.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Confidence/Credible Interval (CI) Formatting — format_ci","text":"CI_low Lower CI bound. Usually numeric value, can also CI output returned bayestestR, case remaining arguments unnecessary. ... Arguments passed methods. CI_high Upper CI bound. ci CI level percentage. digits Number digits rounding significant figures. May also \"signif\" return significant figures \"scientific\" return scientific notation. Control number digits adding value suffix, e.g. digits = \"scientific4\" scientific notation 4 decimal places, digits = \"signif5\" 5 significant figures (see also signif()). brackets Either logical, TRUE (default), values encompassed square brackets. FALSE NULL, brackets used. Else, character vector length two, indicating opening closing brackets. width Minimum width returned string. NULL width larger string's length, leading whitespaces added string. width=\"auto\", width set length longest string. width_low, width_high Like width, applies lower higher confidence interval value. can used values lower upper CI different length. missing Value NA values replaced. default, empty string (.e. \"\") returned NA. zap_small Logical, TRUE, small values rounded digits decimal places. FALSE, values decimal places digits printed scientific notation. ci_string String used output indicate type interval. Default \"CI\", can changed \"HDI\" anything else, necessary.","code":""},{"path":"https://easystats.github.io/insight/reference/format_ci.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Confidence/Credible Interval (CI) Formatting — format_ci","text":"formatted string.","code":""},{"path":"https://easystats.github.io/insight/reference/format_ci.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Confidence/Credible Interval (CI) Formatting — format_ci","text":"","code":"format_ci(1.20, 3.57, ci = 0.90) #> [1] \"90% CI [1.20, 3.57]\" format_ci(1.20, 3.57, ci = NULL) #> [1] \"[1.20, 3.57]\" format_ci(1.20, 3.57, ci = NULL, brackets = FALSE) #> [1] \"1.20, 3.57\" format_ci(1.20, 3.57, ci = NULL, brackets = c(\"(\", \")\")) #> [1] \"(1.20, 3.57)\" format_ci(c(1.205645, 23.4), c(3.57, -1.35), ci = 0.90) #> [1] \"90% CI [1.21, 3.57]\" \"90% CI [23.40, -1.35]\" format_ci(c(1.20, NA, NA), c(3.57, -1.35, NA), ci = 0.90) #> [1] \"90% CI [1.20, 3.57]\" \"90% CI [, -1.35]\" \"\" # automatic alignment of width, useful for printing multiple CIs in columns x <- format_ci(c(1.205, 23.4, 100.43), c(3.57, -13.35, 9.4)) cat(x, sep = \"\\n\") #> 95% CI [1.21, 3.57] #> 95% CI [23.40, -13.35] #> 95% CI [100.43, 9.40] x <- format_ci(c(1.205, 23.4, 100.43), c(3.57, -13.35, 9.4), width = \"auto\") cat(x, sep = \"\\n\") #> 95% CI [ 1.21, 3.57] #> 95% CI [ 23.40, -13.35] #> 95% CI [100.43, 9.40]"},{"path":"https://easystats.github.io/insight/reference/format_message.html","id":null,"dir":"Reference","previous_headings":"","what":"Format messages and warnings — format_message","title":"Format messages and warnings — format_message","text":"Inserts line breaks longer message warning string. Line length adjusted maximum length console, width can accessed. default, new lines indented two spaces. format_alert() wrapper combines formatting string call message(), warning() stop(). default, format_alert() creates message(). format_warning() format_error() change default type exception warning() stop(), respectively.","code":""},{"path":"https://easystats.github.io/insight/reference/format_message.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format messages and warnings — format_message","text":"","code":"format_message( string, ..., line_length = 0.9 * getOption(\"width\", 80), indent = \" \" ) format_alert( string, ..., line_length = 0.9 * getOption(\"width\", 80), indent = \" \", type = \"message\", call. = FALSE ) format_warning(...) format_error(...)"},{"path":"https://easystats.github.io/insight/reference/format_message.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format messages and warnings — format_message","text":"string string. ... strings concatenated indented new lines. line_length Numeric, maximum length line. default 90% width console window. indent Character vector. lines specified ..., user-defined string can specified indent subsequent lines. Defaults \" \" (two white spaces), hence start line first line, two white space characters inserted. type Type exception alert raise. Can \"message\" message(), \"warning\" warning(), \"error\" stop(). call. Logical. Indicating call included error message. usually confusing users function producing warning error deep within another function, default FALSE.","code":""},{"path":"https://easystats.github.io/insight/reference/format_message.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Format messages and warnings — format_message","text":"format_message(), formatted string. format_alert() related functions, requested exception, exception formatted using format_message().","code":""},{"path":"https://easystats.github.io/insight/reference/format_message.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Format messages and warnings — format_message","text":"experimental formatting feature implemented function. can use following tags: {.b text} bold formatting {.text} use italic font style {.url www.url.com} formats string URL (.e., enclosing URL < >, blue color italic font style) {.pkg packagename} formats text blue color. features limitations: hard detect exact length line string multiple lines (line breaks) string contains formatting tags. Thus, can happen lines wrapped earlier length expected. Furthermore, multiple words format tag ({.b one two three}), line break might occur inside tag, formatting longer works (messing message-string).","code":""},{"path":"https://easystats.github.io/insight/reference/format_message.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format messages and warnings — format_message","text":"","code":"msg <- format_message(\"Much too long string for just one line, I guess!\", line_length = 15 ) message(msg) #> Much too long #> string for just #> one line, I #> guess! msg <- format_message(\"Much too long string for just one line, I guess!\", \"First new line\", \"Second new line\", \"(both indented)\", line_length = 30 ) message(msg) #> Much too long string for just #> one line, I guess! #> First new line #> Second new line #> (both indented) msg <- format_message(\"Much too long string for just one line, I guess!\", \"First new line\", \"Second new line\", \"(not indented)\", line_length = 30, indent = \"\" ) message(msg) #> Much too long string for just #> one line, I guess! #> First new line #> Second new line #> (not indented) # Caution, experimental! See 'Details' msg <- format_message( \"This is {.i italic}, visit {.url easystats.github.io/easystats}\", line_length = 30 ) message(msg) #> This is italic, visit #> # message format_alert(\"This is a message.\") #> This is a message. format_alert(\"This is a warning.\", type = \"message\") #> This is a warning. # error try(format_error(\"This is an error.\")) #> Error : This is an error. # warning format_warning(\"This is a warning.\") #> Warning: This is a warning."},{"path":"https://easystats.github.io/insight/reference/format_number.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert number to words — format_number","title":"Convert number to words — format_number","text":"Convert number words","code":""},{"path":"https://easystats.github.io/insight/reference/format_number.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert number to words — format_number","text":"","code":"format_number(x, textual = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/format_number.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert number to words — format_number","text":"x Number. textual Return words. FALSE, run format_value(). ... Arguments passed format_value() textual FALSE.","code":""},{"path":"https://easystats.github.io/insight/reference/format_number.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert number to words — format_number","text":"formatted string.","code":""},{"path":"https://easystats.github.io/insight/reference/format_number.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Convert number to words — format_number","text":"code adapted https://github.com/ateucher/useful_code/blob/master/R/numbers2words.r","code":""},{"path":"https://easystats.github.io/insight/reference/format_number.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert number to words — format_number","text":"","code":"format_number(2) #> [1] \"two\" format_number(45) #> [1] \"forty five\" format_number(324.68765) #> [1] \"three hundred and twenty five\""},{"path":"https://easystats.github.io/insight/reference/format_p.html","id":null,"dir":"Reference","previous_headings":"","what":"p-values formatting — format_p","title":"p-values formatting — format_p","text":"Format p-values.","code":""},{"path":"https://easystats.github.io/insight/reference/format_p.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"p-values formatting — format_p","text":"","code":"format_p( p, stars = FALSE, stars_only = FALSE, whitespace = TRUE, name = \"p\", missing = \"\", decimal_separator = NULL, digits = 3, ... )"},{"path":"https://easystats.github.io/insight/reference/format_p.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"p-values formatting — format_p","text":"p value vector p-values. stars Add significance stars (e.g., p < .001***). stars_only Return significance stars. whitespace Logical, TRUE (default), preserves whitespaces. Else, whitespace characters removed returned string. name Name prefixing text. Can NULL. missing Value NA values replaced. default, empty string (.e. \"\") returned NA. decimal_separator Character, NULL, used decimal separator. digits Number significant digits. May also \"scientific\" return exact p-values scientific notation, \"apa\" use APA 7th edition-style p-values (equivalent digits = 3). \"scientific\", control number digits adding value suffix, e.g.m digits = \"scientific4\" scientific notation 4 decimal places. ... Arguments methods.","code":""},{"path":"https://easystats.github.io/insight/reference/format_p.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"p-values formatting — format_p","text":"formatted string.","code":""},{"path":"https://easystats.github.io/insight/reference/format_p.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"p-values formatting — format_p","text":"","code":"format_p(c(.02, .065, 0, .23)) #> [1] \"p = 0.020\" \"p = 0.065\" \"p < .001\" \"p = 0.230\" format_p(c(.02, .065, 0, .23), name = NULL) #> [1] \"0.020\" \"0.065\" \"< .001\" \"0.230\" format_p(c(.02, .065, 0, .23), stars_only = TRUE) #> [1] \"*\" \"\" \"***\" \"\" model <- lm(mpg ~ wt + cyl, data = mtcars) p <- coef(summary(model))[, 4] format_p(p, digits = \"apa\") #> [1] \"p < .001\" \"p < .001\" \"p = 0.001\" format_p(p, digits = \"scientific\") #> [1] \"p = 3.04318e-20\" \"p = 2.22020e-04\" \"p = 1.06428e-03\" format_p(p, digits = \"scientific2\") #> [1] \"p = 3.04e-20\" \"p = 2.22e-04\" \"p = 1.06e-03\""},{"path":"https://easystats.github.io/insight/reference/format_pd.html","id":null,"dir":"Reference","previous_headings":"","what":"Probability of direction (pd) formatting — format_pd","title":"Probability of direction (pd) formatting — format_pd","text":"Probability direction (pd) formatting","code":""},{"path":"https://easystats.github.io/insight/reference/format_pd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Probability of direction (pd) formatting — format_pd","text":"","code":"format_pd(pd, stars = FALSE, stars_only = FALSE, name = \"pd\")"},{"path":"https://easystats.github.io/insight/reference/format_pd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Probability of direction (pd) formatting — format_pd","text":"pd Probability direction (pd). stars Add significance stars (e.g., p < .001***). stars_only Return significance stars. name Name prefixing text. Can NULL.","code":""},{"path":"https://easystats.github.io/insight/reference/format_pd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Probability of direction (pd) formatting — format_pd","text":"formatted string.","code":""},{"path":"https://easystats.github.io/insight/reference/format_pd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Probability of direction (pd) formatting — format_pd","text":"","code":"format_pd(0.12) #> [1] \"pd = 12.00%\" format_pd(c(0.12, 1, 0.9999, 0.98, 0.995, 0.96), name = NULL) #> [1] \"12.00%\" \"100%\" \"99.99%\" \"98.00%\" \"99.50%\" \"96.00%\" format_pd(c(0.12, 1, 0.9999, 0.98, 0.995, 0.96), stars = TRUE) #> [1] \"pd = 12.00%\" \"pd = 100%***\" \"pd = 99.99%***\" \"pd = 98.00%*\" #> [5] \"pd = 99.50%**\" \"pd = 96.00%\""},{"path":"https://easystats.github.io/insight/reference/format_rope.html","id":null,"dir":"Reference","previous_headings":"","what":"Percentage in ROPE formatting — format_rope","title":"Percentage in ROPE formatting — format_rope","text":"Percentage ROPE formatting","code":""},{"path":"https://easystats.github.io/insight/reference/format_rope.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Percentage in ROPE formatting — format_rope","text":"","code":"format_rope(rope_percentage, name = \"in ROPE\", digits = 2)"},{"path":"https://easystats.github.io/insight/reference/format_rope.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Percentage in ROPE formatting — format_rope","text":"rope_percentage Value vector percentages ROPE. name Name prefixing text. Can NULL. digits Number significant digits. May also \"scientific\" return exact p-values scientific notation, \"apa\" use APA 7th edition-style p-values (equivalent digits = 3). \"scientific\", control number digits adding value suffix, e.g.m digits = \"scientific4\" scientific notation 4 decimal places.","code":""},{"path":"https://easystats.github.io/insight/reference/format_rope.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Percentage in ROPE formatting — format_rope","text":"formatted string.","code":""},{"path":"https://easystats.github.io/insight/reference/format_rope.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Percentage in ROPE formatting — format_rope","text":"","code":"format_rope(c(0.02, 0.12, 0.357, 0)) #> [1] \"2.00% in ROPE\" \"12.00% in ROPE\" \"35.70% in ROPE\" \"0% in ROPE\" format_rope(c(0.02, 0.12, 0.357, 0), name = NULL) #> [1] \"2.00%\" \"12.00%\" \"35.70%\" \"0%\""},{"path":"https://easystats.github.io/insight/reference/format_string.html","id":null,"dir":"Reference","previous_headings":"","what":"String Values Formatting — format_string","title":"String Values Formatting — format_string","text":"String Values Formatting","code":""},{"path":"https://easystats.github.io/insight/reference/format_string.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"String Values Formatting — format_string","text":"","code":"format_string(x, ...) # S3 method for class 'character' format_string(x, length = NULL, abbreviate = \"...\", ...)"},{"path":"https://easystats.github.io/insight/reference/format_string.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"String Values Formatting — format_string","text":"x String value. ... Arguments passed methods. length Numeric, maximum length returned string. NULL, shorten string maximum length, however, truncate inside words. .e. string length happens inside word, word removed returned string, returned string maximum length length, might shorter. abbreviate String used suffix, x shortened.","code":""},{"path":"https://easystats.github.io/insight/reference/format_string.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"String Values Formatting — format_string","text":"formatted string.","code":""},{"path":"https://easystats.github.io/insight/reference/format_string.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"String Values Formatting — format_string","text":"","code":"s <- \"This can be considered as very long string!\" # string is shorter than max.length, so returned as is format_string(s, 60) #> [1] \"This can be considered as very long string!\" # string is shortened to as many words that result in # a string of maximum 20 chars format_string(s, 20) #> [1] \"This can be...\""},{"path":"https://easystats.github.io/insight/reference/format_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Parameter table formatting — format_table","title":"Parameter table formatting — format_table","text":"functions takes data frame model parameters input formats certain columns readable layout (like collapsing separate columns lower upper confidence interval values). Furthermore, column names formatted well. Note format_table() converts columns character vectors!","code":""},{"path":"https://easystats.github.io/insight/reference/format_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parameter table formatting — format_table","text":"","code":"format_table( x, pretty_names = TRUE, stars = FALSE, digits = 2, ci_width = \"auto\", ci_brackets = TRUE, ci_digits = 2, p_digits = 3, rope_digits = 2, ic_digits = 1, zap_small = FALSE, preserve_attributes = FALSE, exact = TRUE, use_symbols = getOption(\"insight_use_symbols\", FALSE), verbose = TRUE, ... )"},{"path":"https://easystats.github.io/insight/reference/format_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parameter table formatting — format_table","text":"x data frame model's parameters, returned various functions easystats-packages. May also result broom::tidy(). pretty_names Return \"pretty\" (.e. human readable) parameter names. stars TRUE, add significance stars (e.g., p < .001***). Can also character vector, naming columns include stars significant values. especially useful Bayesian models, might multiple columns significant values, e.g. BF Bayes factor pd probability direction. cases, use stars = c(\"pd\", \"BF\") add stars columns, stars = \"BF\" add stars Bayes factor exclude pd column. Currently, following columns recognized: \"BF\", \"pd\" \"p\". digits, ci_digits, p_digits, rope_digits, ic_digits Number digits rounding significant figures. May also \"signif\" return significant figures \"scientific\" return scientific notation. Control number digits adding value suffix, e.g. digits = \"scientific4\" scientific notation 4 decimal places, digits = \"signif5\" 5 significant figures (see also signif()). ci_width Minimum width returned string confidence intervals. NULL width larger string's length, leading whitespaces added string. width=\"auto\", width set length longest string. ci_brackets Logical, TRUE (default), CI-values encompassed square brackets (else parentheses). zap_small Logical, TRUE, small values rounded digits decimal places. FALSE, values decimal places digits printed scientific notation. preserve_attributes Logical, TRUE, preserves attributes input data frame. exact Formatting Bayes factor columns, case provided data frame contains column (.e. columns named \"BF\" \"log_BF\"). exact = TRUE, large small values either reported scientific format (e.g., 4.24e5), else truncated values (\"> 1000\" \"< 1/1000\"). use_symbols Logical, TRUE, column names refer particular effectsizes (like Phi, Omega Epsilon) include related unicode-character instead written name. works Windows R >= 4.2, OS X Linux R >= 4.0. possible define global option setting, see 'Note'. verbose Toggle messages warnings. ... Arguments passed methods.","code":""},{"path":"https://easystats.github.io/insight/reference/format_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parameter table formatting — format_table","text":"data frame. Note format_table() converts columns character vectors!","code":""},{"path":"https://easystats.github.io/insight/reference/format_table.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Parameter table formatting — format_table","text":"options(insight_use_symbols = TRUE) override use_symbols argument always displays symbols, possible.","code":""},{"path":[]},{"path":"https://easystats.github.io/insight/reference/format_table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Parameter table formatting — format_table","text":"","code":"format_table(head(iris), digits = 1) #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 5.1 3.5 1.4 0.2 setosa #> 2 4.9 3.0 1.4 0.2 setosa #> 3 4.7 3.2 1.3 0.2 setosa #> 4 4.6 3.1 1.5 0.2 setosa #> 5 5.0 3.6 1.4 0.2 setosa #> 6 5.4 3.9 1.7 0.4 setosa m <- lm(Sepal.Length ~ Species * Sepal.Width, data = iris) x <- parameters::model_parameters(m) as.data.frame(format_table(x)) #> Parameter Coefficient SE 95% CI t(144) #> 1 (Intercept) 2.64 0.57 [ 1.51, 3.77] 4.62 #> 2 Species [versicolor] 0.90 0.80 [-0.68, 2.48] 1.13 #> 3 Species [virginica] 1.27 0.82 [-0.35, 2.88] 1.55 #> 4 Sepal Width 0.69 0.17 [ 0.36, 1.02] 4.17 #> 5 Species [versicolor] × Sepal Width 0.17 0.26 [-0.34, 0.69] 0.67 #> 6 Species [virginica] × Sepal Width 0.21 0.26 [-0.29, 0.72] 0.83 #> p #> 1 < .001 #> 2 0.261 #> 3 0.123 #> 4 < .001 #> 5 0.503 #> 6 0.411 as.data.frame(format_table(x, p_digits = \"scientific\")) #> Parameter Coefficient SE 95% CI t(144) #> 1 (Intercept) 2.64 0.57 [ 1.51, 3.77] 4.62 #> 2 Species [versicolor] 0.90 0.80 [-0.68, 2.48] 1.13 #> 3 Species [virginica] 1.27 0.82 [-0.35, 2.88] 1.55 #> 4 Sepal Width 0.69 0.17 [ 0.36, 1.02] 4.17 #> 5 Species [versicolor] × Sepal Width 0.17 0.26 [-0.34, 0.69] 0.67 #> 6 Species [virginica] × Sepal Width 0.21 0.26 [-0.29, 0.72] 0.83 #> p #> 1 8.52612e-06 #> 2 2.61332e-01 #> 3 1.22515e-01 #> 4 5.31104e-05 #> 5 5.02805e-01 #> 6 4.10634e-01 # \\donttest{ model <- rstanarm::stan_glm( Sepal.Length ~ Species, data = iris, refresh = 0, seed = 123 ) x <- parameters::model_parameters(model, ci = c(0.69, 0.89, 0.95)) as.data.frame(format_table(x)) #> Parameter Median 69% CI 89% CI 95% CI pd Rhat #> 1 (Intercept) 5.01 [4.93, 5.08] [4.86, 5.15] [4.88, 5.12] 100% 1.000 #> 2 Speciesversicolor 0.93 [0.82, 1.04] [0.73, 1.14] [0.76, 1.11] 100% 1.000 #> 3 Speciesvirginica 1.58 [1.48, 1.69] [1.39, 1.79] [1.42, 1.75] 100% 1.000 #> ESS Prior #> 1 3279.00 Normal (5.84 +- 2.07) #> 2 3458.00 Normal (0.00 +- 4.38) #> 3 3201.00 Normal (0.00 +- 4.38) # }"},{"path":"https://easystats.github.io/insight/reference/format_value.html","id":null,"dir":"Reference","previous_headings":"","what":"Numeric Values Formatting — format_value","title":"Numeric Values Formatting — format_value","text":"format_value() converts numeric values formatted string values, formatting can something like rounding digits, scientific notation etc. format_percent() short-cut format_value(as_percent = TRUE).","code":""},{"path":"https://easystats.github.io/insight/reference/format_value.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Numeric Values Formatting — format_value","text":"","code":"format_value(x, ...) # S3 method for class 'data.frame' format_value( x, digits = 2, protect_integers = FALSE, missing = \"\", width = NULL, as_percent = FALSE, zap_small = FALSE, lead_zero = TRUE, style_positive = \"none\", style_negative = \"hyphen\", ... ) # S3 method for class 'numeric' format_value( x, digits = 2, protect_integers = FALSE, missing = \"\", width = NULL, as_percent = FALSE, zap_small = FALSE, lead_zero = TRUE, style_positive = \"none\", style_negative = \"hyphen\", ... ) format_percent(x, ...)"},{"path":"https://easystats.github.io/insight/reference/format_value.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Numeric Values Formatting — format_value","text":"x Numeric value. ... Arguments passed methods. digits Number digits rounding significant figures. May also \"signif\" return significant figures \"scientific\" return scientific notation. Control number digits adding value suffix, e.g. digits = \"scientific4\" scientific notation 4 decimal places, digits = \"signif5\" 5 significant figures (see also signif()). protect_integers integers kept integers (.e., without decimals)? missing Value NA values replaced. default, empty string (.e. \"\") returned NA. width Minimum width returned string. NULL width larger string's length, leading whitespaces added string. as_percent Logical, TRUE, value formatted percentage value. zap_small Logical, TRUE, small values rounded digits decimal places. FALSE, values decimal places digits printed scientific notation. lead_zero Logical, TRUE (default), includes leading zeros, else leading zeros dropped. style_positive string determines style positive numbers. May \"none\" (default), \"plus\" add plus-sign \"space\" precede string Unicode \"figure space\", .e., space equally wide number +. style_negative string determines style negative numbers. May \"hyphen\" (default), \"minus\" proper Unicode minus symbol \"parens\" wrap number parentheses.","code":""},{"path":"https://easystats.github.io/insight/reference/format_value.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Numeric Values Formatting — format_value","text":"formatted string.","code":""},{"path":"https://easystats.github.io/insight/reference/format_value.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Numeric Values Formatting — format_value","text":"","code":"format_value(1.20) #> [1] \"1.20\" format_value(1.2) #> [1] \"1.20\" format_value(1.2012313) #> [1] \"1.20\" format_value(c(0.0045, 234, -23)) #> [1] \"4.50e-03\" \"234.00\" \"-23.00\" format_value(c(0.0045, .12, .34)) #> [1] \"4.50e-03\" \"0.12\" \"0.34\" format_value(c(0.0045, .12, .34), as_percent = TRUE) #> [1] \"0.45%\" \"12.00%\" \"34.00%\" format_value(c(0.0045, .12, .34), digits = \"scientific\") #> [1] \"4.50000e-03\" \"1.20000e-01\" \"3.40000e-01\" format_value(c(0.0045, .12, .34), digits = \"scientific2\") #> [1] \"4.50e-03\" \"1.20e-01\" \"3.40e-01\" format_value(c(0.045, .12, .34), lead_zero = FALSE) #> [1] \".04\" \".12\" \".34\" # default format_value(c(0.0045, .123, .345)) #> [1] \"4.50e-03\" \"0.12\" \"0.34\" # significant figures format_value(c(0.0045, .123, .345), digits = \"signif\") #> [1] \"0.0045\" \"0.123\" \"0.345\" format_value(as.factor(c(\"A\", \"B\", \"A\"))) #> [1] A B A #> Levels: A B format_value(iris$Species) #> [1] setosa setosa setosa setosa setosa setosa #> [7] setosa setosa setosa setosa setosa setosa #> [13] setosa setosa setosa setosa setosa setosa #> [19] setosa setosa setosa setosa setosa setosa #> [25] setosa setosa setosa setosa setosa setosa #> [31] setosa setosa setosa setosa setosa setosa #> [37] setosa setosa setosa setosa setosa setosa #> [43] setosa setosa setosa setosa setosa setosa #> [49] setosa setosa versicolor versicolor versicolor versicolor #> [55] versicolor versicolor versicolor versicolor versicolor versicolor #> [61] versicolor versicolor versicolor versicolor versicolor versicolor #> [67] versicolor versicolor versicolor versicolor versicolor versicolor #> [73] versicolor versicolor versicolor versicolor versicolor versicolor #> [79] versicolor versicolor versicolor versicolor versicolor versicolor #> [85] versicolor versicolor versicolor versicolor versicolor versicolor #> [91] versicolor versicolor versicolor versicolor versicolor versicolor #> [97] versicolor versicolor versicolor versicolor virginica virginica #> [103] virginica virginica virginica virginica virginica virginica #> [109] virginica virginica virginica virginica virginica virginica #> [115] virginica virginica virginica virginica virginica virginica #> [121] virginica virginica virginica virginica virginica virginica #> [127] virginica virginica virginica virginica virginica virginica #> [133] virginica virginica virginica virginica virginica virginica #> [139] virginica virginica virginica virginica virginica virginica #> [145] virginica virginica virginica virginica virginica virginica #> Levels: setosa versicolor virginica format_value(3) #> [1] \"3.00\" format_value(3, protect_integers = TRUE) #> [1] \"3\" format_value(head(iris)) #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 5.10 3.50 1.40 0.20 setosa #> 2 4.90 3.00 1.40 0.20 setosa #> 3 4.70 3.20 1.30 0.20 setosa #> 4 4.60 3.10 1.50 0.20 setosa #> 5 5.00 3.60 1.40 0.20 setosa #> 6 5.40 3.90 1.70 0.40 setosa"},{"path":"https://easystats.github.io/insight/reference/get_auxiliary.html","id":null,"dir":"Reference","previous_headings":"","what":"Get auxiliary parameters from models — get_auxiliary","title":"Get auxiliary parameters from models — get_auxiliary","text":"Returns requested auxiliary parameters models, like dispersion, sigma, beta...","code":""},{"path":"https://easystats.github.io/insight/reference/get_auxiliary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get auxiliary parameters from models — get_auxiliary","text":"","code":"get_auxiliary( x, type = \"sigma\", summary = TRUE, centrality = \"mean\", verbose = TRUE, ... )"},{"path":"https://easystats.github.io/insight/reference/get_auxiliary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get auxiliary parameters from models — get_auxiliary","text":"x model. type name auxiliary parameter retrieved. \"sigma\" available models, \"dispersion\" models class glm, glmerMod glmmTMB well brmsfit. \"beta\" parameters currently returned brmsfit models. See 'Details'. summary Logical, indicates whether full posterior samples (summary = FALSE)) summarized centrality indices posterior samples (summary = TRUE)) returned estimates. centrality models posterior samples, summary = TRUE. case, centrality = \"mean\" calculate means posterior samples parameter, centrality = \"median\" use robust median value measure central tendency. verbose Toggle warnings. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/get_auxiliary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get auxiliary parameters from models — get_auxiliary","text":"requested auxiliary parameter, NULL information accessed.","code":""},{"path":"https://easystats.github.io/insight/reference/get_auxiliary.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get auxiliary parameters from models — get_auxiliary","text":"Currently, sigma dispersion parameter returned, limited set models.","code":""},{"path":"https://easystats.github.io/insight/reference/get_auxiliary.html","id":"sigma-parameter","dir":"Reference","previous_headings":"","what":"Sigma Parameter","title":"Get auxiliary parameters from models — get_auxiliary","text":"See get_sigma().","code":""},{"path":"https://easystats.github.io/insight/reference/get_auxiliary.html","id":"dispersion-parameter","dir":"Reference","previous_headings":"","what":"Dispersion Parameter","title":"Get auxiliary parameters from models — get_auxiliary","text":"many different definitions \"dispersion\", depending context. get_auxiliary() returns dispersion parameters usually can considered variance--mean ratio generalized (linear) mixed models. Exceptions models class glmmTMB, dispersion equals σ2. detail, computation dispersion parameter generalized linear models ratio sum squared working-residuals residual degrees freedom. mixed models class glmer, dispersion parameter also called φ ratio sum squared Pearson-residuals residual degrees freedom. models class glmmTMB, dispersion σ2.","code":""},{"path":"https://easystats.github.io/insight/reference/get_auxiliary.html","id":"brms-models","dir":"Reference","previous_headings":"","what":"brms models","title":"Get auxiliary parameters from models — get_auxiliary","text":"models class brmsfit, different options type argument. See list supported auxiliary parameters : find_parameters.BGGM().","code":""},{"path":"https://easystats.github.io/insight/reference/get_auxiliary.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get auxiliary parameters from models — get_auxiliary","text":"","code":"# from ?glm clotting <- data.frame( u = c(5, 10, 15, 20, 30, 40, 60, 80, 100), lot1 = c(118, 58, 42, 35, 27, 25, 21, 19, 18), lot2 = c(69, 35, 26, 21, 18, 16, 13, 12, 12) ) model <- glm(lot1 ~ log(u), data = clotting, family = Gamma()) get_auxiliary(model, type = \"dispersion\") # same as summary(model)$dispersion #> [1] 0.002446059"},{"path":"https://easystats.github.io/insight/reference/get_call.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the model's function call — get_call","title":"Get the model's function call — get_call","text":"Returns model's function call available.","code":""},{"path":"https://easystats.github.io/insight/reference/get_call.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the model's function call — get_call","text":"","code":"get_call(x)"},{"path":"https://easystats.github.io/insight/reference/get_call.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the model's function call — get_call","text":"x fitted mixed model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_call.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the model's function call — get_call","text":"function call.","code":""},{"path":"https://easystats.github.io/insight/reference/get_call.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the model's function call — get_call","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_call(m) #> lm(formula = mpg ~ wt + cyl + vs, data = mtcars) m <- lme4::lmer(Sepal.Length ~ Sepal.Width + (1 | Species), data = iris) get_call(m) #> lme4::lmer(formula = Sepal.Length ~ Sepal.Width + (1 | Species), #> data = iris)"},{"path":"https://easystats.github.io/insight/reference/get_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the data that was used to fit the model — get_data","title":"Get the data that was used to fit the model — get_data","text":"functions tries get data used fit model returns data frame.","code":""},{"path":"https://easystats.github.io/insight/reference/get_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the data that was used to fit the model — get_data","text":"","code":"get_data(x, ...) # Default S3 method get_data(x, source = \"environment\", verbose = TRUE, ...) # S3 method for class 'glmmTMB' get_data( x, effects = \"all\", component = \"all\", source = \"environment\", verbose = TRUE, ... ) # S3 method for class 'afex_aov' get_data(x, shape = c(\"long\", \"wide\"), ...) # S3 method for class 'rma' get_data( x, source = \"environment\", verbose = TRUE, include_interval = FALSE, transf = NULL, transf_args = NULL, ci = 0.95, ... )"},{"path":"https://easystats.github.io/insight/reference/get_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the data that was used to fit the model — get_data","text":"x fitted model. ... Currently used. source String, indicating data recovered. source = \"environment\" (default), data recovered environment (e.g. data workspace). option usually fastest way getting data ensures original variables used model fitting returned. Note always current data recovered environment. Hence, data modified model fitting (e.g., variables recoded rows filtered), returned data may longer equal model data. source = \"frame\" (\"mf\"), data taken model frame. transformed variables back-transformed, possible. option returns data even available environment, however, certain edge cases back-transforming original data may fail. source = \"environment\" fails recover data, tries extract data model frame; source = \"frame\" data extracted model frame, data recovered environment. ways returns observations missing data variables used model fitting. verbose Toggle messages warnings. effects model data fixed effects (\"fixed\"), random effects (\"random\") (\"\") returned? applies mixed gee models. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. shape Return long wide data? applicable repeated measures designs. include_interval meta-analysis models, normal-approximation confidence intervals added response effect size? transf meta-analysis models, intervals included, function applied response effect size interval. transf_args meta-analysis models, optional list arguments passed transf function. ci meta-analysis models, Confidence Interval (CI) level include_interval = TRUE. Default 0.95 (95%).","code":""},{"path":"https://easystats.github.io/insight/reference/get_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the data that was used to fit the model — get_data","text":"data used fit model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_data.html","id":"model-components","dir":"Reference","previous_headings":"","what":"Model components","title":"Get the data that was used to fit the model — get_data","text":"Possible values component argument depend model class. Following valid options: \"\": returns model components, applies models, effect models just conditional model component. \"conditional\": returns conditional component, .e. \"fixed effects\" terms model. effect models just conditional model component. \"smooth_terms\": returns smooth terms, applies GAMs (similar models may contain smooth terms). \"zero_inflated\" (\"zi\"): returns zero-inflation component. \"dispersion\": returns dispersion model component. common models zero-inflation can model dispersion parameter. \"instruments\": instrumental-variable fixed effects regression, returns instruments. \"location\": returns location parameters conditional, zero_inflated, smooth_terms, instruments (everything fixed random effects - depending effects argument - auxiliary parameters). \"distributional\" (\"auxiliary\"): components like sigma, dispersion, beta precision (auxiliary parameters) returned.","code":""},{"path":"https://easystats.github.io/insight/reference/get_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the data that was used to fit the model — get_data","text":"","code":"data(cbpp, package = \"lme4\") cbpp$trials <- cbpp$size - cbpp$incidence m <- glm(cbind(incidence, trials) ~ period, data = cbpp, family = binomial) head(get_data(m)) #> incidence trials period #> 1 2 12 1 #> 2 3 9 2 #> 3 4 5 3 #> 4 0 5 4 #> 5 3 19 1 #> 6 1 17 2"},{"path":"https://easystats.github.io/insight/reference/get_datagrid.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a reference grid — get_datagrid","title":"Create a reference grid — get_datagrid","text":"Create reference matrix, useful visualisation, evenly spread combined values. Usually used make generate predictions using get_predicted(). See vignette tutorial create visualisation matrix using function.","code":""},{"path":"https://easystats.github.io/insight/reference/get_datagrid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a reference grid — get_datagrid","text":"","code":"get_datagrid(x, ...) # S3 method for class 'data.frame' get_datagrid( x, at = \"all\", factors = \"reference\", numerics = \"mean\", preserve_range = FALSE, reference = x, length = 10, range = \"range\", ... ) # S3 method for class 'numeric' get_datagrid(x, length = 10, range = \"range\", ...) # S3 method for class 'factor' get_datagrid(x, ...) # Default S3 method get_datagrid( x, at = \"all\", factors = \"reference\", numerics = \"mean\", preserve_range = TRUE, reference = x, include_smooth = TRUE, include_random = FALSE, include_response = FALSE, data = NULL, verbose = TRUE, ... )"},{"path":"https://easystats.github.io/insight/reference/get_datagrid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a reference grid — get_datagrid","text":"x object construct reference grid. ... Arguments passed methods (instance, length range control spread numeric variables.). Indicates focal predictors (variables) reference grid values focal predictors represented. specified otherwise, representative values numeric variables predictors evenly distributed minimum maximum, total number length values covering range (see 'Examples'). Possible options : \"\", include variables predictors. character vector one variable predictor names, like c(\"Species\", \"Sepal.Width\"), create grid combinations unique values. factors, use levels, numeric variables, use range length length (evenly spread minimum maximum) character vectors, use unique values. list named elements, indicating focal predictors representative values, e.g. = list(Sepal.Length = c(2, 4), Species = \"setosa\"). string assignments, e.g. = \"Sepal.Length = 2\" = c(\"Sepal.Length = 2\", \"Species = 'setosa'\") - note usage single double quotes assign strings within strings. special handling assignments brackets, .e. values defined inside [ ].numeric variables, value(s) inside brackets either two values, indicating minimum maximum (e.g. = \"Sepal.Length = [0, 5]\"), range length length (evenly spread given minimum maximum) created. two numeric values = \"Sepal.Length = [2,3,4,5]\", case values used representative values. \"token\" creates pre-defined representative values: mean -/+ 1 SD around mean: \"x = [sd]\" median -/+ 1 MAD around median: \"x = [mad]\" Tukey's five number summary (minimum, lower-hinge, median, upper-hinge, maximum): \"x = [fivenum]\" terciles, including minimum maximum: \"x = [terciles]\" terciles, excluding minimum maximum: \"x = [terciles2]\" quartiles, including minimum maximum: \"x = [quartiles]\" quartiles, excluding minimum maximum: \"x = [quartiles2]\" minimum maximum value: \"x = [minmax]\" 0 maximum value: \"x = [zeromax]\" factor variables, value(s) inside brackets indicate one factor levels, like = \"Species = [setosa, versicolor]\". Note: length argument ignored using brackets-tokens. remaining variables specified fixed (see also arguments factors numerics). factors Type summary factors. Can \"reference\" (set reference level), \"mode\" (set common level) \"\" keep levels. numerics Type summary numeric values. Can \"\" (duplicate grid unique values), function (\"mean\", \"median\", ...) value (e.g., numerics = 0). preserve_range case combinations numeric variables factors, setting preserve_range = TRUE drop observations value numeric variable originally present range factor level. leads unbalanced grid. Also, want minimum maximum closely match actual ranges, increase length argument. reference reference vector compute mean SD. Used standardizing unstandardizing grid using effectsize::standardize. length Length numeric target variables selected \"\". arguments controls number (equally spread) values taken represent continuous variables. longer length increase precision, can also substantially increase size datagrid (especially case interactions). NA, return unique values. case multiple continuous target variables, length can also vector different values (see examples). range Option control representative values given , specific values provided. Use combination length argument control number values within specified range. range can one following: \"range\" (default), use minimum maximum original data vector end-points (min max). interval type specified, \"iqr\", \"ci\", \"hdi\" \"eti\", spread values within range (default CI width 95% can changed adding instance ci = 0.90.) See IQR() bayestestR::ci(). can useful robust change skipping extreme values. \"sd\" \"mad\", spread dispersion index around mean median, respectively. length argument even number (e.g., 4), one step positive side (.e., -1, 0, +1, +2). result named vector. See 'Examples.' \"grid\" create reference grid useful plotting predictions, choosing representative values numeric variables based position reference grid. numeric variable first predictor , values minimum maximum length indicated length generated. numeric predictors specified first , mean -1/+1 SD around mean returned. factors, levels returned. include_smooth x model object, decide whether smooth terms included data grid . include_random x mixed model object, decide whether random effect terms included data grid . include_random FALSE, x mixed model random effects, still included returned grid, set \"population level\" value (e.g., NA glmmTMB 0 merMod). ensures common predict() methods work properly, usually need data variables model included. include_response x model object, decide whether response variable included data grid . data Optional, data frame used fit model. Usually, data retrieved via get_data(). verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/get_datagrid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a reference grid — get_datagrid","text":"Reference grid data frame.","code":""},{"path":[]},{"path":"https://easystats.github.io/insight/reference/get_datagrid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a reference grid — get_datagrid","text":"","code":"# Datagrids of variables and dataframes ===================================== # Single variable is of interest; all others are \"fixed\" ------------------ # Factors get_datagrid(iris, at = \"Species\") # Returns all the levels #> Species Sepal.Length Sepal.Width Petal.Length Petal.Width #> 1 setosa 5.843333 3.057333 3.758 1.199333 #> 2 versicolor 5.843333 3.057333 3.758 1.199333 #> 3 virginica 5.843333 3.057333 3.758 1.199333 get_datagrid(iris, at = \"Species = c('setosa', 'versicolor')\") # Specify an expression #> Species Sepal.Length Sepal.Width Petal.Length Petal.Width #> 1 setosa 5.843333 3.057333 3.758 1.199333 #> 2 versicolor 5.843333 3.057333 3.758 1.199333 # Numeric variables get_datagrid(iris, at = \"Sepal.Length\") # default spread length = 10 #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 4.3 3.057333 3.758 1.199333 setosa #> 2 4.7 3.057333 3.758 1.199333 setosa #> 3 5.1 3.057333 3.758 1.199333 setosa #> 4 5.5 3.057333 3.758 1.199333 setosa #> 5 5.9 3.057333 3.758 1.199333 setosa #> 6 6.3 3.057333 3.758 1.199333 setosa #> 7 6.7 3.057333 3.758 1.199333 setosa #> 8 7.1 3.057333 3.758 1.199333 setosa #> 9 7.5 3.057333 3.758 1.199333 setosa #> 10 7.9 3.057333 3.758 1.199333 setosa get_datagrid(iris, at = \"Sepal.Length\", length = 3) # change length #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 4.3 3.057333 3.758 1.199333 setosa #> 2 6.1 3.057333 3.758 1.199333 setosa #> 3 7.9 3.057333 3.758 1.199333 setosa get_datagrid(iris[2:150, ], at = \"Sepal.Length\", factors = \"mode\", numerics = \"median\" ) # change non-targets fixing #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 4.3 3 4.4 1.3 versicolor #> 2 4.7 3 4.4 1.3 versicolor #> 3 5.1 3 4.4 1.3 versicolor #> 4 5.5 3 4.4 1.3 versicolor #> 5 5.9 3 4.4 1.3 versicolor #> 6 6.3 3 4.4 1.3 versicolor #> 7 6.7 3 4.4 1.3 versicolor #> 8 7.1 3 4.4 1.3 versicolor #> 9 7.5 3 4.4 1.3 versicolor #> 10 7.9 3 4.4 1.3 versicolor get_datagrid(iris, at = \"Sepal.Length\", range = \"ci\", ci = 0.90) # change min/max of target #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 4.600 3.057333 3.758 1.199333 setosa #> 2 4.895 3.057333 3.758 1.199333 setosa #> 3 5.190 3.057333 3.758 1.199333 setosa #> 4 5.485 3.057333 3.758 1.199333 setosa #> 5 5.780 3.057333 3.758 1.199333 setosa #> 6 6.075 3.057333 3.758 1.199333 setosa #> 7 6.370 3.057333 3.758 1.199333 setosa #> 8 6.665 3.057333 3.758 1.199333 setosa #> 9 6.960 3.057333 3.758 1.199333 setosa #> 10 7.255 3.057333 3.758 1.199333 setosa get_datagrid(iris, at = \"Sepal.Length = [0, 1]\") # Manually change min/max #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 0.0000000 3.057333 3.758 1.199333 setosa #> 2 0.1111111 3.057333 3.758 1.199333 setosa #> 3 0.2222222 3.057333 3.758 1.199333 setosa #> 4 0.3333333 3.057333 3.758 1.199333 setosa #> 5 0.4444444 3.057333 3.758 1.199333 setosa #> 6 0.5555556 3.057333 3.758 1.199333 setosa #> 7 0.6666667 3.057333 3.758 1.199333 setosa #> 8 0.7777778 3.057333 3.758 1.199333 setosa #> 9 0.8888889 3.057333 3.758 1.199333 setosa #> 10 1.0000000 3.057333 3.758 1.199333 setosa get_datagrid(iris, at = \"Sepal.Length = [sd]\") # -1 SD, mean and +1 SD #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 5.015267 3.057333 3.758 1.199333 setosa #> 2 5.843333 3.057333 3.758 1.199333 setosa #> 3 6.671399 3.057333 3.758 1.199333 setosa # identical to previous line: -1 SD, mean and +1 SD get_datagrid(iris, at = \"Sepal.Length\", range = \"sd\", length = 3) #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 5.015267 3.057333 3.758 1.199333 setosa #> 2 5.843333 3.057333 3.758 1.199333 setosa #> 3 6.671399 3.057333 3.758 1.199333 setosa get_datagrid(iris, at = \"Sepal.Length = [quartiles]\") # quartiles #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 4.3 3.057333 3.758 1.199333 setosa #> 2 5.1 3.057333 3.758 1.199333 setosa #> 3 5.8 3.057333 3.758 1.199333 setosa #> 4 6.4 3.057333 3.758 1.199333 setosa #> 5 7.9 3.057333 3.758 1.199333 setosa # Numeric and categorical variables, generating a grid for plots # default spread length = 10 get_datagrid(iris, at = c(\"Sepal.Length\", \"Species\"), range = \"grid\") #> Sepal.Length Species Sepal.Width Petal.Length Petal.Width #> 1 2.531069 setosa 3.057333 3.758 1.199333 #> 2 3.359135 setosa 3.057333 3.758 1.199333 #> 3 4.187201 setosa 3.057333 3.758 1.199333 #> 4 5.015267 setosa 3.057333 3.758 1.199333 #> 5 5.843333 setosa 3.057333 3.758 1.199333 #> 6 6.671399 setosa 3.057333 3.758 1.199333 #> 7 7.499466 setosa 3.057333 3.758 1.199333 #> 8 8.327532 setosa 3.057333 3.758 1.199333 #> 9 9.155598 setosa 3.057333 3.758 1.199333 #> 10 9.983664 setosa 3.057333 3.758 1.199333 #> 11 2.531069 versicolor 3.057333 3.758 1.199333 #> 12 3.359135 versicolor 3.057333 3.758 1.199333 #> 13 4.187201 versicolor 3.057333 3.758 1.199333 #> 14 5.015267 versicolor 3.057333 3.758 1.199333 #> 15 5.843333 versicolor 3.057333 3.758 1.199333 #> 16 6.671399 versicolor 3.057333 3.758 1.199333 #> 17 7.499466 versicolor 3.057333 3.758 1.199333 #> 18 8.327532 versicolor 3.057333 3.758 1.199333 #> 19 9.155598 versicolor 3.057333 3.758 1.199333 #> 20 9.983664 versicolor 3.057333 3.758 1.199333 #> 21 2.531069 virginica 3.057333 3.758 1.199333 #> 22 3.359135 virginica 3.057333 3.758 1.199333 #> 23 4.187201 virginica 3.057333 3.758 1.199333 #> 24 5.015267 virginica 3.057333 3.758 1.199333 #> 25 5.843333 virginica 3.057333 3.758 1.199333 #> 26 6.671399 virginica 3.057333 3.758 1.199333 #> 27 7.499466 virginica 3.057333 3.758 1.199333 #> 28 8.327532 virginica 3.057333 3.758 1.199333 #> 29 9.155598 virginica 3.057333 3.758 1.199333 #> 30 9.983664 virginica 3.057333 3.758 1.199333 # default spread length = 3 (-1 SD, mean and +1 SD) get_datagrid(iris, at = c(\"Species\", \"Sepal.Length\"), range = \"grid\") #> Species Sepal.Length Sepal.Width Petal.Length Petal.Width #> 1 setosa 5.015267 3.057333 3.758 1.199333 #> 2 setosa 5.843333 3.057333 3.758 1.199333 #> 3 setosa 6.671399 3.057333 3.758 1.199333 #> 4 versicolor 5.015267 3.057333 3.758 1.199333 #> 5 versicolor 5.843333 3.057333 3.758 1.199333 #> 6 versicolor 6.671399 3.057333 3.758 1.199333 #> 7 virginica 5.015267 3.057333 3.758 1.199333 #> 8 virginica 5.843333 3.057333 3.758 1.199333 #> 9 virginica 6.671399 3.057333 3.758 1.199333 # Standardization and unstandardization data <- get_datagrid(iris, at = \"Sepal.Length\", range = \"sd\", length = 3) data$Sepal.Length # It is a named vector (extract names with `names(out$Sepal.Length)`) #> -1 SD Mean +1 SD #> 5.015267 5.843333 6.671399 datawizard::standardize(data, select = \"Sepal.Length\") #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 -1 3.057333 3.758 1.199333 setosa #> 2 0 3.057333 3.758 1.199333 setosa #> 3 1 3.057333 3.758 1.199333 setosa data <- get_datagrid(iris, at = \"Sepal.Length = c(-2, 0, 2)\") # Manually specify values data #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 -2 3.057333 3.758 1.199333 setosa #> 2 0 3.057333 3.758 1.199333 setosa #> 3 2 3.057333 3.758 1.199333 setosa datawizard::unstandardize(data, select = \"Sepal.Length\") #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 4.187201 3.057333 3.758 1.199333 setosa #> 2 5.843333 3.057333 3.758 1.199333 setosa #> 3 7.499466 3.057333 3.758 1.199333 setosa # Multiple variables are of interest, creating a combination -------------- get_datagrid(iris, at = c(\"Sepal.Length\", \"Species\"), length = 3) #> Sepal.Length Species Sepal.Width Petal.Length Petal.Width #> 1 4.3 setosa 3.057333 3.758 1.199333 #> 2 6.1 setosa 3.057333 3.758 1.199333 #> 3 7.9 setosa 3.057333 3.758 1.199333 #> 4 4.3 versicolor 3.057333 3.758 1.199333 #> 5 6.1 versicolor 3.057333 3.758 1.199333 #> 6 7.9 versicolor 3.057333 3.758 1.199333 #> 7 4.3 virginica 3.057333 3.758 1.199333 #> 8 6.1 virginica 3.057333 3.758 1.199333 #> 9 7.9 virginica 3.057333 3.758 1.199333 get_datagrid(iris, at = c(\"Sepal.Length\", \"Petal.Length\"), length = c(3, 2)) #> Sepal.Length Petal.Length Sepal.Width Petal.Width Species #> 1 4.3 1.0 3.057333 1.199333 setosa #> 2 6.1 1.0 3.057333 1.199333 setosa #> 3 7.9 1.0 3.057333 1.199333 setosa #> 4 4.3 6.9 3.057333 1.199333 setosa #> 5 6.1 6.9 3.057333 1.199333 setosa #> 6 7.9 6.9 3.057333 1.199333 setosa get_datagrid(iris, at = c(1, 3), length = 3) #> Sepal.Length Petal.Length Sepal.Width Petal.Width Species #> 1 4.3 1.00 3.057333 1.199333 setosa #> 2 6.1 1.00 3.057333 1.199333 setosa #> 3 7.9 1.00 3.057333 1.199333 setosa #> 4 4.3 3.95 3.057333 1.199333 setosa #> 5 6.1 3.95 3.057333 1.199333 setosa #> 6 7.9 3.95 3.057333 1.199333 setosa #> 7 4.3 6.90 3.057333 1.199333 setosa #> 8 6.1 6.90 3.057333 1.199333 setosa #> 9 7.9 6.90 3.057333 1.199333 setosa get_datagrid(iris, at = c(\"Sepal.Length\", \"Species\"), preserve_range = TRUE) #> Sepal.Length Species Sepal.Width Petal.Length Petal.Width #> 1 4.3 setosa 3.057333 3.758 1.199333 #> 2 4.7 setosa 3.057333 3.758 1.199333 #> 3 5.1 setosa 3.057333 3.758 1.199333 #> 4 5.5 setosa 3.057333 3.758 1.199333 #> 5 5.1 versicolor 3.057333 3.758 1.199333 #> 6 5.5 versicolor 3.057333 3.758 1.199333 #> 7 5.9 versicolor 3.057333 3.758 1.199333 #> 8 6.3 versicolor 3.057333 3.758 1.199333 #> 9 6.7 versicolor 3.057333 3.758 1.199333 #> 10 5.1 virginica 3.057333 3.758 1.199333 #> 11 5.5 virginica 3.057333 3.758 1.199333 #> 12 5.9 virginica 3.057333 3.758 1.199333 #> 13 6.3 virginica 3.057333 3.758 1.199333 #> 14 6.7 virginica 3.057333 3.758 1.199333 #> 15 7.1 virginica 3.057333 3.758 1.199333 #> 16 7.5 virginica 3.057333 3.758 1.199333 #> 17 7.9 virginica 3.057333 3.758 1.199333 get_datagrid(iris, at = c(\"Sepal.Length\", \"Species\"), numerics = 0) #> Sepal.Length Species Sepal.Width Petal.Length Petal.Width #> 1 4.3 setosa 0 0 0 #> 2 4.7 setosa 0 0 0 #> 3 5.1 setosa 0 0 0 #> 4 5.5 setosa 0 0 0 #> 5 5.9 setosa 0 0 0 #> 6 6.3 setosa 0 0 0 #> 7 6.7 setosa 0 0 0 #> 8 7.1 setosa 0 0 0 #> 9 7.5 setosa 0 0 0 #> 10 7.9 setosa 0 0 0 #> 11 4.3 versicolor 0 0 0 #> 12 4.7 versicolor 0 0 0 #> 13 5.1 versicolor 0 0 0 #> 14 5.5 versicolor 0 0 0 #> 15 5.9 versicolor 0 0 0 #> 16 6.3 versicolor 0 0 0 #> 17 6.7 versicolor 0 0 0 #> 18 7.1 versicolor 0 0 0 #> 19 7.5 versicolor 0 0 0 #> 20 7.9 versicolor 0 0 0 #> 21 4.3 virginica 0 0 0 #> 22 4.7 virginica 0 0 0 #> 23 5.1 virginica 0 0 0 #> 24 5.5 virginica 0 0 0 #> 25 5.9 virginica 0 0 0 #> 26 6.3 virginica 0 0 0 #> 27 6.7 virginica 0 0 0 #> 28 7.1 virginica 0 0 0 #> 29 7.5 virginica 0 0 0 #> 30 7.9 virginica 0 0 0 get_datagrid(iris, at = c(\"Sepal.Length = 3\", \"Species\")) #> Sepal.Length Species Sepal.Width Petal.Length Petal.Width #> 1 3 setosa 3.057333 3.758 1.199333 #> 2 3 versicolor 3.057333 3.758 1.199333 #> 3 3 virginica 3.057333 3.758 1.199333 get_datagrid(iris, at = c(\"Sepal.Length = c(3, 1)\", \"Species = 'setosa'\")) #> Sepal.Length Species Sepal.Width Petal.Length Petal.Width #> 1 3 setosa 3.057333 3.758 1.199333 #> 2 1 setosa 3.057333 3.758 1.199333 # With list-style at-argument get_datagrid(iris, at = list(Sepal.Length = c(1, 3), Species = \"setosa\")) #> Sepal.Length Species Sepal.Width Petal.Length Petal.Width #> 1 1 setosa 3.057333 3.758 1.199333 #> 2 3 setosa 3.057333 3.758 1.199333 # With models =============================================================== # Fit a linear regression model <- lm(Sepal.Length ~ Sepal.Width * Petal.Length, data = iris) # Get datagrid of predictors data <- get_datagrid(model, length = c(20, 3), range = c(\"range\", \"sd\")) # same as: get_datagrid(model, range = \"grid\", length = 20) # Add predictions data$Sepal.Length <- get_predicted(model, data = data) # Visualize relationships (each color is at -1 SD, Mean, and + 1 SD of Petal.Length) plot(data$Sepal.Width, data$Sepal.Length, col = data$Petal.Length, main = \"Relationship at -1 SD, Mean, and + 1 SD of Petal.Length\" )"},{"path":"https://easystats.github.io/insight/reference/get_deviance.html","id":null,"dir":"Reference","previous_headings":"","what":"Model Deviance — get_deviance","title":"Model Deviance — get_deviance","text":"Returns model deviance (see stats::deviance()).","code":""},{"path":"https://easystats.github.io/insight/reference/get_deviance.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Model Deviance — get_deviance","text":"","code":"get_deviance(x, ...) # Default S3 method get_deviance(x, verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/get_deviance.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Model Deviance — get_deviance","text":"x model. ... used. verbose Toggle warnings messages.","code":""},{"path":"https://easystats.github.io/insight/reference/get_deviance.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Model Deviance — get_deviance","text":"model deviance.","code":""},{"path":"https://easystats.github.io/insight/reference/get_deviance.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Model Deviance — get_deviance","text":"GLMMs class glmerMod, glmmTMB MixMod, absolute unconditional deviance returned (see 'Details' ?lme4::merMod-class), .e. minus twice log-likelihood. get relative conditional deviance (relative saturated model, conditioned conditional modes random effects), use deviance(). value returned get_deviance() usually equals deviance-value summary().","code":""},{"path":"https://easystats.github.io/insight/reference/get_deviance.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Model Deviance — get_deviance","text":"","code":"data(mtcars) x <- lm(mpg ~ cyl, data = mtcars) get_deviance(x) #> [1] 308.3342"},{"path":"https://easystats.github.io/insight/reference/get_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract degrees of freedom — get_df","title":"Extract degrees of freedom — get_df","text":"Estimate extract residual model-based degrees freedom regression models.","code":""},{"path":"https://easystats.github.io/insight/reference/get_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract degrees of freedom — get_df","text":"","code":"get_df(x, ...) # Default S3 method get_df(x, type = \"residual\", verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/get_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract degrees of freedom — get_df","text":"x statistical model. ... Currently used. type Can \"residual\", \"wald\", \"normal\", \"model\". \"analytical\" alias \"residual\". \"residual\" (aka \"analytical\") returns residual degrees freedom, usually stats::df.residual() returns. model object method extract residual degrees freedom, calculated n-p, .e. number observations minus number estimated parameters. residual degrees freedom extracted either approach, returns Inf. \"wald\" returns residual (aka analytical) degrees freedom models t-statistic, 1 models Chi-squared statistic, Inf models. Also returns Inf residual degrees freedom extracted. \"normal\" always returns Inf. \"model\" returns model-based degrees freedom, .e. number (estimated) parameters. mixed models, can also \"ml1\" (approximation degrees freedom based \"m-l-1\" heuristic suggested Elff et al. 2019) \"betwithin\", models class merMod, type can also \"satterthwaite\" \"kenward-roger\". See 'Details'. Usually, degrees freedom required calculate p-values confidence intervals, type = \"wald\" likely best choice cases. verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/get_df.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract degrees of freedom — get_df","text":"Degrees freedom mixed models Inferential statistics (like p-values, confidence intervals standard errors) may biased mixed models number clusters small (even sample size level-1 units high). cases recommended approximate accurate number degrees freedom inferential statistics (see Li Redden 2015). m-l-1 degrees freedom m-l-1 heuristic approach uses t-distribution fewer degrees freedom. particular repeated measure designs (longitudinal data analysis), m-l-1 heuristic likely accurate simply using residual infinite degrees freedom, get_df(type = \"ml1\") returns different degrees freedom within-cluster -cluster effects. Note \"m-l-1\" heuristic applicable (least less accurate) complex multilevel designs, e.g. cross-classified clusters. cases, accurate approaches like Kenward-Roger approximation recommended. However, \"m-l-1\" heuristic also applies generalized mixed models, approaches like Kenward-Roger Satterthwaite limited linear mixed models . -within degrees freedom -within denominator degrees freedom approximation , similar \"m-l-1\" heuristic, recommended particular (generalized) linear mixed models repeated measurements (longitudinal design). get_df(type = \"betwithin\") implements heuristic based -within approach, .e. type returns different degrees freedom within-cluster -cluster effects. Note implementation return exactly results shown Li Redden 2015, similar. Satterthwaite Kenward-Rogers degrees freedom Unlike simpler approximation heuristics like \"m-l-1\" rule (type = \"ml1\"), Satterthwaite Kenward-Rogers approximation also applicable complex multilevel designs. However, \"m-l-1\" \"-within\" heuristics also apply generalized mixed models, approaches like Kenward-Roger Satterthwaite limited linear mixed models .","code":""},{"path":"https://easystats.github.io/insight/reference/get_df.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extract degrees of freedom — get_df","text":"Kenward, M. G., & Roger, J. H. (1997). Small sample inference fixed effects restricted maximum likelihood. Biometrics, 983-997. Satterthwaite FE (1946) approximate distribution estimates variance components. Biometrics Bulletin 2 (6):110–4. Elff, M.; Heisig, J.P.; Schaeffer, M.; Shikano, S. (2019). Multilevel Analysis Clusters: Improving Likelihood-based Methods Provide Unbiased Estimates Accurate Inference, British Journal Political Science. Li, P., Redden, D. T. (2015). Comparing denominator degrees freedom approximations generalized linear mixed model analyzing binary outcome small sample cluster-randomized trials. BMC Medical Research Methodology, 15(1), 38","code":""},{"path":"https://easystats.github.io/insight/reference/get_df.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract degrees of freedom — get_df","text":"","code":"model <- lm(Sepal.Length ~ Petal.Length * Species, data = iris) get_df(model) # same as df.residual(model) #> [1] 144 get_df(model, type = \"model\") # same as attr(logLik(model), \"df\") #> [1] 7"},{"path":"https://easystats.github.io/insight/reference/get_family.html","id":null,"dir":"Reference","previous_headings":"","what":"A robust alternative to stats::family — get_family","title":"A robust alternative to stats::family — get_family","text":"robust resilient alternative stats::family. avoid issues models like gamm4.","code":""},{"path":"https://easystats.github.io/insight/reference/get_family.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A robust alternative to stats::family — get_family","text":"","code":"get_family(x, ...)"},{"path":"https://easystats.github.io/insight/reference/get_family.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A robust alternative to stats::family — get_family","text":"x statistical model. ... arguments passed methods.","code":""},{"path":"https://easystats.github.io/insight/reference/get_family.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A robust alternative to stats::family — get_family","text":"","code":"data(mtcars) x <- glm(vs ~ wt, data = mtcars, family = \"binomial\") get_family(x) #> #> Family: binomial #> Link function: logit #> x <- mgcv::gamm( vs ~ am + s(wt), random = list(cyl = ~1), data = mtcars, family = \"binomial\" ) #> #> Maximum number of PQL iterations: 20 #> iteration 1 #> iteration 2 #> iteration 3 #> iteration 4 #> iteration 5 #> iteration 6 #> iteration 7 #> iteration 8 get_family(x) #> #> Family: binomial #> Link function: logit #>"},{"path":"https://easystats.github.io/insight/reference/get_intercept.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the value at the intercept — get_intercept","title":"Get the value at the intercept — get_intercept","text":"Returns value intercept (.e., intercept parameter), NA one.","code":""},{"path":"https://easystats.github.io/insight/reference/get_intercept.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the value at the intercept — get_intercept","text":"","code":"get_intercept(x, ...)"},{"path":"https://easystats.github.io/insight/reference/get_intercept.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the value at the intercept — get_intercept","text":"x model. ... used.","code":""},{"path":"https://easystats.github.io/insight/reference/get_intercept.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the value at the intercept — get_intercept","text":"value intercept.","code":""},{"path":"https://easystats.github.io/insight/reference/get_intercept.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the value at the intercept — get_intercept","text":"","code":"get_intercept(lm(Sepal.Length ~ Petal.Width, data = iris)) #> [1] 4.777629 get_intercept(lm(Sepal.Length ~ 0 + Petal.Width, data = iris)) #> [1] NA get_intercept(lme4::lmer(Sepal.Length ~ Sepal.Width + (1 | Species), data = iris)) #> [1] 3.406167 get_intercept(gamm4::gamm4(Sepal.Length ~ s(Petal.Width), data = iris)) #> [1] 5.843333"},{"path":"https://easystats.github.io/insight/reference/get_loglikelihood.html","id":null,"dir":"Reference","previous_headings":"","what":"Log-Likelihood — get_loglikelihood","title":"Log-Likelihood — get_loglikelihood","text":"robust function compute log-likelihood model, well individual log-likelihoods (observation) whenever possible. Can used replacement stats::logLik() box, returned object class (gives results default).","code":""},{"path":"https://easystats.github.io/insight/reference/get_loglikelihood.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Log-Likelihood — get_loglikelihood","text":"","code":"get_loglikelihood(x, ...) loglikelihood(x, ...) # S3 method for class 'lm' get_loglikelihood( x, estimator = \"ML\", REML = FALSE, check_response = FALSE, verbose = TRUE, ... )"},{"path":"https://easystats.github.io/insight/reference/get_loglikelihood.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Log-Likelihood — get_loglikelihood","text":"x model. ... Passed logLik(), possible. estimator Corresponds different estimators standard deviation errors. estimator=\"ML\" (default), scaling done n (biased ML estimator), equivalent using stats::logLik(). estimator=\"OLS\", returns unbiased OLS estimator. estimator=\"REML\" give results logLik(..., REML=TRUE). REML linear models. argument present compatibility stats::logLik(). Setting TRUE overwrite estimator argument thus equivalent setting estimator=\"REML\". give results stats::logLik(..., REML=TRUE). Note individual log-likelihoods available REML. check_response Logical, TRUE, checks response variable transformed (like log() sqrt()), , returns corrected log-likelihood. get back original scale, likelihood model multiplied Jacobian/derivative transformation. verbose Toggle warnings messages.","code":""},{"path":"https://easystats.github.io/insight/reference/get_loglikelihood.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Log-Likelihood — get_loglikelihood","text":"object class \"logLik\", also containing log-likelihoods observation per_observation attribute (attributes(get_loglikelihood(x))$per_observation) possible. code partly inspired nonnest2 package.","code":""},{"path":"https://easystats.github.io/insight/reference/get_loglikelihood.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Log-Likelihood — get_loglikelihood","text":"","code":"x <- lm(Sepal.Length ~ Petal.Width + Species, data = iris) get_loglikelihood(x, estimator = \"ML\") # Equivalent to stats::logLik(x) #> 'log Lik.' -101.0339 (df=5) get_loglikelihood(x, estimator = \"REML\") # Equivalent to stats::logLik(x, REML=TRUE) #> 'log Lik.' -107.0896 (df=5) get_loglikelihood(x, estimator = \"OLS\") #> 'log Lik.' -101.0611 (df=5)"},{"path":"https://easystats.github.io/insight/reference/get_modelmatrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Model Matrix — get_modelmatrix","title":"Model Matrix — get_modelmatrix","text":"Creates design matrix description. character variables coerced factors.","code":""},{"path":"https://easystats.github.io/insight/reference/get_modelmatrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Model Matrix — get_modelmatrix","text":"","code":"get_modelmatrix(x, ...)"},{"path":"https://easystats.github.io/insight/reference/get_modelmatrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Model Matrix — get_modelmatrix","text":"x object. ... Passed methods (mainly model.matrix()).","code":""},{"path":"https://easystats.github.io/insight/reference/get_modelmatrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Model Matrix — get_modelmatrix","text":"","code":"data(mtcars) model <- lm(am ~ vs, data = mtcars) get_modelmatrix(model) #> (Intercept) vs #> Mazda RX4 1 0 #> Mazda RX4 Wag 1 0 #> Datsun 710 1 1 #> Hornet 4 Drive 1 1 #> Hornet Sportabout 1 0 #> Valiant 1 1 #> Duster 360 1 0 #> Merc 240D 1 1 #> Merc 230 1 1 #> Merc 280 1 1 #> Merc 280C 1 1 #> Merc 450SE 1 0 #> Merc 450SL 1 0 #> Merc 450SLC 1 0 #> Cadillac Fleetwood 1 0 #> Lincoln Continental 1 0 #> Chrysler Imperial 1 0 #> Fiat 128 1 1 #> Honda Civic 1 1 #> Toyota Corolla 1 1 #> Toyota Corona 1 1 #> Dodge Challenger 1 0 #> AMC Javelin 1 0 #> Camaro Z28 1 0 #> Pontiac Firebird 1 0 #> Fiat X1-9 1 1 #> Porsche 914-2 1 0 #> Lotus Europa 1 1 #> Ford Pantera L 1 0 #> Ferrari Dino 1 0 #> Maserati Bora 1 0 #> Volvo 142E 1 1 #> attr(,\"assign\") #> [1] 0 1"},{"path":"https://easystats.github.io/insight/reference/get_parameters.BGGM.html","id":null,"dir":"Reference","previous_headings":"","what":"Get model parameters from Bayesian models — get_parameters.BGGM","title":"Get model parameters from Bayesian models — get_parameters.BGGM","text":"Returns coefficients (posterior samples Bayesian models) model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.BGGM.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get model parameters from Bayesian models — get_parameters.BGGM","text":"","code":"# S3 method for class 'BGGM' get_parameters( x, component = c(\"correlation\", \"conditional\", \"intercept\", \"all\"), summary = FALSE, centrality = \"mean\", ... ) # S3 method for class 'MCMCglmm' get_parameters( x, effects = c(\"fixed\", \"random\", \"all\"), summary = FALSE, centrality = \"mean\", ... ) # S3 method for class 'BFBayesFactor' get_parameters( x, effects = c(\"all\", \"fixed\", \"random\"), component = c(\"all\", \"extra\"), iterations = 4000, progress = FALSE, verbose = TRUE, summary = FALSE, centrality = \"mean\", ... ) # S3 method for class 'stanmvreg' get_parameters( x, effects = c(\"fixed\", \"random\", \"all\"), parameters = NULL, summary = FALSE, centrality = \"mean\", ... ) # S3 method for class 'brmsfit' get_parameters( x, effects = \"fixed\", component = \"all\", parameters = NULL, summary = FALSE, centrality = \"mean\", ... ) # S3 method for class 'stanreg' get_parameters( x, effects = c(\"fixed\", \"random\", \"all\"), component = c(\"location\", \"all\", \"conditional\", \"smooth_terms\", \"sigma\", \"distributional\", \"auxiliary\"), parameters = NULL, summary = FALSE, centrality = \"mean\", ... ) # S3 method for class 'bayesx' get_parameters( x, component = c(\"conditional\", \"smooth_terms\", \"all\"), summary = FALSE, centrality = \"mean\", ... ) # S3 method for class 'bamlss' get_parameters( x, component = c(\"all\", \"conditional\", \"smooth_terms\", \"location\", \"distributional\", \"auxiliary\"), parameters = NULL, summary = FALSE, centrality = \"mean\", ... ) # S3 method for class 'sim.merMod' get_parameters( x, effects = c(\"fixed\", \"random\", \"all\"), parameters = NULL, summary = FALSE, centrality = \"mean\", ... ) # S3 method for class 'sim' get_parameters(x, parameters = NULL, summary = FALSE, centrality = \"mean\", ...)"},{"path":"https://easystats.github.io/insight/reference/get_parameters.BGGM.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get model parameters from Bayesian models — get_parameters.BGGM","text":"x fitted model. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. summary Logical, indicates whether full posterior samples (summary = FALSE)) summarized centrality indices posterior samples (summary = TRUE)) returned estimates. centrality models posterior samples, summary = TRUE. case, centrality = \"mean\" calculate means posterior samples parameter, centrality = \"median\" use robust median value measure central tendency. ... Currently used. effects parameters fixed effects, random effects returned? applies mixed models. May abbreviated. iterations Number posterior draws. progress Display progress. verbose Toggle messages warnings. parameters Regular expression pattern describes parameters returned.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.BGGM.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get model parameters from Bayesian models — get_parameters.BGGM","text":"posterior samples requested parameters data frame. summary = TRUE, returns data frame two columns: parameter names related point estimates (based centrality).","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.BGGM.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get model parameters from Bayesian models — get_parameters.BGGM","text":"cases models either return different \"effects\" (fixed, random) \"components\" (conditional, zero-inflated, ...), arguments effects component can used.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.BGGM.html","id":"bfbayesfactor-models","dir":"Reference","previous_headings":"","what":"BFBayesFactor Models","title":"Get model parameters from Bayesian models — get_parameters.BGGM","text":"Note BFBayesFactor models (BayesFactor package), posteriors extracted first numerator model (.e., model[1]). want apply function foo() another model stored BFBayesFactor object, index directly, e.g. foo(model[2]), foo(1/model[5]), etc. See also bayestestR::weighted_posteriors().","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.BGGM.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get model parameters from Bayesian models — get_parameters.BGGM","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_parameters(m) #> Parameter Estimate #> 1 (Intercept) 38.7460642 #> 2 wt -3.2463673 #> 3 cyl -1.3641033 #> 4 vs 0.5241721"},{"path":"https://easystats.github.io/insight/reference/get_parameters.betamfx.html","id":null,"dir":"Reference","previous_headings":"","what":"Get model parameters from marginal effects models — get_parameters.betamfx","title":"Get model parameters from marginal effects models — get_parameters.betamfx","text":"Returns coefficients model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.betamfx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get model parameters from marginal effects models — get_parameters.betamfx","text":"","code":"# S3 method for class 'betamfx' get_parameters( x, component = c(\"all\", \"conditional\", \"precision\", \"marginal\"), ... ) # S3 method for class 'logitmfx' get_parameters(x, component = c(\"all\", \"conditional\", \"marginal\"), ...)"},{"path":"https://easystats.github.io/insight/reference/get_parameters.betamfx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get model parameters from marginal effects models — get_parameters.betamfx","text":"x fitted model. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.betamfx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get model parameters from marginal effects models — get_parameters.betamfx","text":"data frame three columns: parameter names, related point estimates component.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.betamfx.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get model parameters from marginal effects models — get_parameters.betamfx","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_parameters(m) #> Parameter Estimate #> 1 (Intercept) 38.7460642 #> 2 wt -3.2463673 #> 3 cyl -1.3641033 #> 4 vs 0.5241721"},{"path":"https://easystats.github.io/insight/reference/get_parameters.betareg.html","id":null,"dir":"Reference","previous_headings":"","what":"Get model parameters from models with special components — get_parameters.betareg","title":"Get model parameters from models with special components — get_parameters.betareg","text":"Returns coefficients model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.betareg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get model parameters from models with special components — get_parameters.betareg","text":"","code":"# S3 method for class 'betareg' get_parameters( x, component = c(\"all\", \"conditional\", \"precision\", \"location\", \"distributional\", \"auxiliary\"), ... ) # S3 method for class 'DirichletRegModel' get_parameters( x, component = c(\"all\", \"conditional\", \"precision\", \"location\", \"distributional\", \"auxiliary\"), ... ) # S3 method for class 'averaging' get_parameters(x, component = c(\"conditional\", \"full\"), ...) # S3 method for class 'glmx' get_parameters( x, component = c(\"all\", \"conditional\", \"extra\", \"location\", \"distributional\", \"auxiliary\"), ... ) # S3 method for class 'clm2' get_parameters(x, component = c(\"all\", \"conditional\", \"scale\"), ...) # S3 method for class 'mvord' get_parameters( x, component = c(\"all\", \"conditional\", \"thresholds\", \"correlation\"), ... ) # S3 method for class 'mjoint' get_parameters(x, component = c(\"all\", \"conditional\", \"survival\"), ...)"},{"path":"https://easystats.github.io/insight/reference/get_parameters.betareg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get model parameters from models with special components — get_parameters.betareg","text":"x fitted model. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.betareg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get model parameters from models with special components — get_parameters.betareg","text":"data frame three columns: parameter names, related point estimates component.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.betareg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get model parameters from models with special components — get_parameters.betareg","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_parameters(m) #> Parameter Estimate #> 1 (Intercept) 38.7460642 #> 2 wt -3.2463673 #> 3 cyl -1.3641033 #> 4 vs 0.5241721"},{"path":"https://easystats.github.io/insight/reference/get_parameters.emmGrid.html","id":null,"dir":"Reference","previous_headings":"","what":"Get model parameters from estimated marginal means objects — get_parameters.emmGrid","title":"Get model parameters from estimated marginal means objects — get_parameters.emmGrid","text":"Returns coefficients model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.emmGrid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get model parameters from estimated marginal means objects — get_parameters.emmGrid","text":"","code":"# S3 method for class 'emmGrid' get_parameters(x, summary = FALSE, merge_parameters = FALSE, ...) # S3 method for class 'emm_list' get_parameters(x, summary = FALSE, ...)"},{"path":"https://easystats.github.io/insight/reference/get_parameters.emmGrid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get model parameters from estimated marginal means objects — get_parameters.emmGrid","text":"x fitted model. summary Logical, indicates whether full posterior samples (summary = FALSE)) summarized centrality indices posterior samples (summary = TRUE)) returned estimates. merge_parameters Logical, TRUE x multiple columns parameter names (like emmGrid objects may ), merged single parameter column, parameters names values values. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.emmGrid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get model parameters from estimated marginal means objects — get_parameters.emmGrid","text":"data frame two columns: parameter names related point estimates.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.emmGrid.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Get model parameters from estimated marginal means objects — get_parameters.emmGrid","text":"Note emmGrid emm_list objects returned functions emmeans different structure compared usual regression models. Hence, Parameter column always contain names variables, may rather contain values, e.g. contrasts. See example pairwise comparisons .","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.emmGrid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get model parameters from estimated marginal means objects — get_parameters.emmGrid","text":"","code":"data(mtcars) model <- lm(mpg ~ wt * factor(cyl), data = mtcars) emm <- emmeans(model, \"cyl\") #> NOTE: Results may be misleading due to involvement in interactions get_parameters(emm) #> cyl Estimate #> 1 4 21.40330 #> 2 6 19.46455 #> 3 8 16.81441 emm <- emmeans(model, pairwise ~ cyl) #> NOTE: Results may be misleading due to involvement in interactions get_parameters(emm) #> Parameter Estimate Component #> 1 4 21.403304 emmeans #> 2 6 19.464549 emmeans #> 3 8 16.814408 emmeans #> 4 cyl4 - cyl6 1.938755 contrasts #> 5 cyl4 - cyl8 4.588896 contrasts #> 6 cyl6 - cyl8 2.650141 contrasts"},{"path":"https://easystats.github.io/insight/reference/get_parameters.gamm.html","id":null,"dir":"Reference","previous_headings":"","what":"Get model parameters from generalized additive models — get_parameters.gamm","title":"Get model parameters from generalized additive models — get_parameters.gamm","text":"Returns coefficients model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.gamm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get model parameters from generalized additive models — get_parameters.gamm","text":"","code":"# S3 method for class 'gamm' get_parameters( x, component = c(\"all\", \"conditional\", \"smooth_terms\", \"location\"), ... ) # S3 method for class 'gam' get_parameters( x, component = c(\"all\", \"conditional\", \"smooth_terms\", \"location\"), ... ) # S3 method for class 'rqss' get_parameters(x, component = c(\"all\", \"conditional\", \"smooth_terms\"), ...)"},{"path":"https://easystats.github.io/insight/reference/get_parameters.gamm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get model parameters from generalized additive models — get_parameters.gamm","text":"x fitted model. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.gamm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get model parameters from generalized additive models — get_parameters.gamm","text":"models smooth terms zero-inflation component, data frame three columns: parameter names, related point estimates component.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.gamm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get model parameters from generalized additive models — get_parameters.gamm","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_parameters(m) #> Parameter Estimate #> 1 (Intercept) 38.7460642 #> 2 wt -3.2463673 #> 3 cyl -1.3641033 #> 4 vs 0.5241721"},{"path":"https://easystats.github.io/insight/reference/get_parameters.glmm.html","id":null,"dir":"Reference","previous_headings":"","what":"Get model parameters from mixed models — get_parameters.glmm","title":"Get model parameters from mixed models — get_parameters.glmm","text":"Returns coefficients model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.glmm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get model parameters from mixed models — get_parameters.glmm","text":"","code":"# S3 method for class 'glmm' get_parameters(x, effects = c(\"all\", \"fixed\", \"random\"), ...) # S3 method for class 'coxme' get_parameters(x, effects = c(\"fixed\", \"random\"), ...) # S3 method for class 'nlmerMod' get_parameters( x, effects = c(\"fixed\", \"random\"), component = c(\"all\", \"conditional\", \"nonlinear\"), ... ) # S3 method for class 'merMod' get_parameters(x, effects = c(\"fixed\", \"random\"), ...) # S3 method for class 'glmmTMB' get_parameters( x, effects = c(\"fixed\", \"random\"), component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\", \"dispersion\"), ... ) # S3 method for class 'glimML' get_parameters(x, effects = c(\"fixed\", \"random\", \"all\"), ...)"},{"path":"https://easystats.github.io/insight/reference/get_parameters.glmm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get model parameters from mixed models — get_parameters.glmm","text":"x fitted model. effects parameters fixed effects, random effects returned? applies mixed models. May abbreviated. ... Currently used. component type parameters return, parameters conditional model, zero-inflated part model dispersion term? Applies models zero-inflated /dispersion formula. Note conditional component also called count mean component, depending model. three convenient shortcuts: component = \"\" returns possible parameters. component = \"location\", location parameters conditional zero_inflated returned (everything fixed random effects - depending effects argument - auxiliary parameters). component = \"distributional\" (\"auxiliary\"), components like sigma dispersion (auxiliary parameters) returned.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.glmm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get model parameters from mixed models — get_parameters.glmm","text":"effects = \"fixed\", data frame two columns: parameter names related point estimates. effects = \"random\", list data frames random effects (returned ranef()), unless random effects simplified structure fixed effects (e.g. models MCMCglmm).","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.glmm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get model parameters from mixed models — get_parameters.glmm","text":"cases models either return different \"effects\" (fixed, random) \"components\" (conditional, zero-inflated, ...), arguments effects component can used.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.glmm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get model parameters from mixed models — get_parameters.glmm","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_parameters(m) #> Parameter Estimate #> 1 (Intercept) 38.7460642 #> 2 wt -3.2463673 #> 3 cyl -1.3641033 #> 4 vs 0.5241721"},{"path":"https://easystats.github.io/insight/reference/get_parameters.htest.html","id":null,"dir":"Reference","previous_headings":"","what":"Get model parameters from htest-objects — get_parameters.htest","title":"Get model parameters from htest-objects — get_parameters.htest","text":"Returns parameters hypothesis test.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.htest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get model parameters from htest-objects — get_parameters.htest","text":"","code":"# S3 method for class 'htest' get_parameters(x, ...)"},{"path":"https://easystats.github.io/insight/reference/get_parameters.htest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get model parameters from htest-objects — get_parameters.htest","text":"x fitted model. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.htest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get model parameters from htest-objects — get_parameters.htest","text":"data frame two columns: parameter names related point estimates.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.htest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get model parameters from htest-objects — get_parameters.htest","text":"","code":"get_parameters(t.test(1:10, y = c(7:20))) #> Parameter Estimate #> 1 1:10 and c(7:20) -8"},{"path":"https://easystats.github.io/insight/reference/get_parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Get model parameters — get_parameters","title":"Get model parameters — get_parameters","text":"Returns coefficients (posterior samples Bayesian models) model. See documentation object's class: Bayesian models (rstanarm, brms, MCMCglmm, ...) Estimated marginal means (emmeans) Generalized additive models (mgcv, VGAM, ...) Marginal effects models (mfx) Mixed models (lme4, glmmTMB, GLMMadaptive, ...) Zero-inflated hurdle models (pscl, ...) Models special components (betareg, MuMIn, ...) Hypothesis tests (htest)","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get model parameters — get_parameters","text":"","code":"get_parameters(x, ...) # Default S3 method get_parameters(x, verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/get_parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get model parameters — get_parameters","text":"x fitted model. ... Currently used. verbose Toggle messages warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get model parameters — get_parameters","text":"non-Bayesian models, data frame two columns: parameter names related point estimates. Anova (aov()) error term, list parameters conditional random effects parameters","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get model parameters — get_parameters","text":"cases models either return different \"effects\" (fixed, random) \"components\" (conditional, zero-inflated, ...), arguments effects component can used. get_parameters() comparable coef(), however, coefficients returned data frame (columns names point estimates coefficients). Bayesian models, posterior samples parameters returned.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.html","id":"model-components","dir":"Reference","previous_headings":"","what":"Model components","title":"Get model parameters — get_parameters","text":"Possible values component argument depend model class. Following valid options: \"\": returns model components, applies models, effect models just conditional model component. \"conditional\": returns conditional component, .e. \"fixed effects\" terms model. effect models just conditional model component. \"smooth_terms\": returns smooth terms, applies GAMs (similar models may contain smooth terms). \"zero_inflated\" (\"zi\"): returns zero-inflation component. \"dispersion\": returns dispersion model component. common models zero-inflation can model dispersion parameter. \"instruments\": instrumental-variable fixed effects regression, returns instruments. \"location\": returns location parameters conditional, zero_inflated, smooth_terms, instruments (everything fixed random effects - depending effects argument - auxiliary parameters). \"distributional\" (\"auxiliary\"): components like sigma, dispersion, beta precision (auxiliary parameters) returned.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get model parameters — get_parameters","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_parameters(m) #> Parameter Estimate #> 1 (Intercept) 38.7460642 #> 2 wt -3.2463673 #> 3 cyl -1.3641033 #> 4 vs 0.5241721"},{"path":"https://easystats.github.io/insight/reference/get_parameters.zeroinfl.html","id":null,"dir":"Reference","previous_headings":"","what":"Get model parameters from zero-inflated and hurdle models — get_parameters.zeroinfl","title":"Get model parameters from zero-inflated and hurdle models — get_parameters.zeroinfl","text":"Returns coefficients model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.zeroinfl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get model parameters from zero-inflated and hurdle models — get_parameters.zeroinfl","text":"","code":"# S3 method for class 'zeroinfl' get_parameters( x, component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\"), ... ) # S3 method for class 'zcpglm' get_parameters( x, component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\"), ... ) # S3 method for class 'mhurdle' get_parameters( x, component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\", \"infrequent_purchase\", \"ip\", \"auxiliary\"), ... )"},{"path":"https://easystats.github.io/insight/reference/get_parameters.zeroinfl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get model parameters from zero-inflated and hurdle models — get_parameters.zeroinfl","text":"x fitted model. component predictor variables, predictor variables conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated. Note conditional component also called count mean component, depending model. ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.zeroinfl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get model parameters from zero-inflated and hurdle models — get_parameters.zeroinfl","text":"models smooth terms zero-inflation component, data frame three columns: parameter names, related point estimates component.","code":""},{"path":"https://easystats.github.io/insight/reference/get_parameters.zeroinfl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get model parameters from zero-inflated and hurdle models — get_parameters.zeroinfl","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_parameters(m) #> Parameter Estimate #> 1 (Intercept) 38.7460642 #> 2 wt -3.2463673 #> 3 cyl -1.3641033 #> 4 vs 0.5241721"},{"path":"https://easystats.github.io/insight/reference/get_predicted.html","id":null,"dir":"Reference","previous_headings":"","what":"Model predictions (robust) and their confidence intervals — get_predicted","title":"Model predictions (robust) and their confidence intervals — get_predicted","text":"get_predicted() function robust, flexible user-friendly alternative base R predict() function. Additional features advantages include availability uncertainty intervals (CI), bootstrapping, intuitive API support models base R's predict() function. However, although interface simplified, still important read documentation arguments. making \"predictions\" (lose term variety things) non-trivial process, lots caveats complications. Read 'Details' section information. get_predicted_ci() returns confidence (prediction) interval (CI) associated predictions made model. function can called separately vector predicted values. get_predicted() usually returns confidence intervals (included attribute, accessible via .data.frame() method) default. preferred rely get_predicted() function standard errors confidence intervals - use get_predicted_ci() standard errors confidence intervals available otherwise.","code":""},{"path":"https://easystats.github.io/insight/reference/get_predicted.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Model predictions (robust) and their confidence intervals — get_predicted","text":"","code":"get_predicted(x, ...) # Default S3 method get_predicted( x, data = NULL, predict = \"expectation\", ci = NULL, ci_type = \"confidence\", ci_method = NULL, dispersion_method = \"sd\", vcov = NULL, vcov_args = NULL, verbose = TRUE, ... ) # S3 method for class 'lm' get_predicted( x, data = NULL, predict = \"expectation\", ci = NULL, iterations = NULL, verbose = TRUE, ... ) # S3 method for class 'stanreg' get_predicted( x, data = NULL, predict = \"expectation\", iterations = NULL, ci = NULL, ci_method = NULL, include_random = \"default\", include_smooth = TRUE, verbose = TRUE, ... ) # S3 method for class 'gam' get_predicted( x, data = NULL, predict = \"expectation\", ci = NULL, include_random = TRUE, include_smooth = TRUE, iterations = NULL, verbose = TRUE, ... ) # S3 method for class 'lmerMod' get_predicted( x, data = NULL, predict = \"expectation\", ci = NULL, ci_method = NULL, include_random = \"default\", iterations = NULL, verbose = TRUE, ... ) # S3 method for class 'principal' get_predicted(x, data = NULL, ...)"},{"path":"https://easystats.github.io/insight/reference/get_predicted.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Model predictions (robust) and their confidence intervals — get_predicted","text":"x statistical model (can also data.frame, case second argument model). ... argument passed, instance get_predicted_ci(). data optional data frame look variables predict. omitted, data used fit model used. Visualization matrices can generated using get_datagrid(). predict string NULL \"link\" returns predictions model's link-scale (logistic models, means log-odds scale) confidence interval (CI). \"expectation\" (default) also returns confidence intervals, time output response scale (logistic models, means probabilities). \"prediction\" also gives output response scale, time associated prediction interval (PI), larger confidence interval (though mostly make sense linear models). \"classification\" differs \"prediction\" binomial models additionally transforms predictions original response's type (instance, factor). strings passed directly type argument predict() method supplied modelling package. predict = NULL, alternative arguments type captured ... ellipsis passed directly predict() method supplied modelling package. Note might result conflicts multiple matching type arguments - thus, recommendation use predict argument values. Notes: can see 4 options predictions gradient \"close model\" \"close response data\": \"link\", \"expectation\", \"prediction\", \"classification\". predict argument modulates two things: scale output type certainty interval. Read Details section . ci interval level. Default NULL, fast even larger models. Set interval level explicit value, e.g. 0.95, 95% CI). ci_type Can \"prediction\" \"confidence\". Prediction intervals show range likely contains value new observation (range fall), whereas confidence intervals reflect uncertainty around estimated parameters (gives range link; instance regression line linear regressions). Prediction intervals account uncertainty model's parameters, plus random variation individual values. Thus, prediction intervals always wider confidence intervals. Moreover, prediction intervals necessarily become narrower sample size increases (reflect quality fit). applies mostly \"simple\" linear models (like lm), models (e.g., glm), prediction intervals somewhat useless (instance, binomial model dependent variable vector 1s 0s, prediction interval ... [0, 1]). ci_method method computing p values confidence intervals. Possible values depend model type. NULL uses default method, varies based model type. frequentist models: \"wald\" (default), \"residual\" \"normal\". Bayesian models: \"quantile\" (default), \"hdi\", \"eti\", \"spi\". Mixed effects lme4 models: \"wald\" (default), \"residual\", \"normal\", \"satterthwaite\", \"kenward-roger\". See get_df() details. dispersion_method Bootstrap dispersion Bayesian posterior summary: \"sd\" \"mad\". vcov Variance-covariance matrix used compute uncertainty estimates (e.g., robust standard errors). argument accepts covariance matrix, function returns covariance matrix, string identifies function used compute covariance matrix. covariance matrix function returns covariance matrix (e.g., stats::vcov()) string indicates kind uncertainty estimates return. Heteroskedasticity-consistent: \"vcovHC\", \"HC\", \"HC0\", \"HC1\", \"HC2\", \"HC3\", \"HC4\", \"HC4m\", \"HC5\". See ?sandwich::vcovHC Cluster-robust: \"vcovCR\", \"CR0\", \"CR1\", \"CR1p\", \"CR1S\", \"CR2\", \"CR3\". See ?clubSandwich::vcovCR() Bootstrap: \"vcovBS\", \"xy\", \"residual\", \"wild\", \"mammen\", \"webb\". See ?sandwich::vcovBS sandwich package functions: \"vcovHAC\", \"vcovPC\", \"vcovCL\", \"vcovPL\". vcov_args List arguments passed function identified vcov argument. function typically supplied sandwich clubSandwich packages. Please refer documentation (e.g., ?sandwich::vcovHAC) see list available arguments. estimation type (argument type) given, default type \"HC\" (\"vcovHC\") equals default sandwich package; type \"CR\" (\"vcoCR\"), default set \"CR3\". verbose Toggle warnings. iterations Bayesian models, corresponds number posterior draws. NULL, return draws (one iteration model). frequentist models, NULL, generate bootstrapped draws, bootstrapped CIs computed. Iterations can accessed running .data.frame(..., keep_iterations = TRUE) output. include_random \"default\", include random effects prediction, unless random effect variables data. TRUE, include random effects prediction (case, checked actually random effect variables data). FALSE, take account. Can also formula specify random effects condition predicting (passed re.form argument). include_random = TRUE data provided, make sure include random effect variables data well. include_smooth General Additive Models (GAMs). FALSE, fix value smooth average, predictions depending . (default), mean(), bayestestR::map_estimate().","code":""},{"path":"https://easystats.github.io/insight/reference/get_predicted.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Model predictions (robust) and their confidence intervals — get_predicted","text":"fitted values (.e. predictions response). Bayesian bootstrapped models (iterations != NULL), iterations (columns observations rows) can accessed via .data.frame().","code":""},{"path":"https://easystats.github.io/insight/reference/get_predicted.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Model predictions (robust) and their confidence intervals — get_predicted","text":"insight::get_predicted(), predict argument jointly modulates two separate concepts, scale uncertainty interval.","code":""},{"path":"https://easystats.github.io/insight/reference/get_predicted.html","id":"confidence-interval-ci-vs-prediction-interval-pi-","dir":"Reference","previous_headings":"","what":"Confidence Interval (CI) vs. Prediction Interval (PI))","title":"Model predictions (robust) and their confidence intervals — get_predicted","text":"Linear models - lm(): linear models, prediction intervals (predict=\"prediction\") show range likely contains value new observation (range likely fall), whereas confidence intervals (predict=\"expectation\" predict=\"link\") reflect uncertainty around estimated parameters (gives range uncertainty regression line). general, Prediction Intervals (PIs) account uncertainty model's parameters, plus random variation individual values. Thus, prediction intervals always wider confidence intervals. Moreover, prediction intervals necessarily become narrower sample size increases (reflect quality fit, also variability within data). Generalized Linear models - glm(): binomial models, prediction intervals somewhat useless (instance, binomial (Bernoulli) model dependent variable vector 1s 0s, prediction interval ... [0, 1]).","code":""},{"path":"https://easystats.github.io/insight/reference/get_predicted.html","id":"link-scale-vs-response-scale","dir":"Reference","previous_headings":"","what":"Link scale vs. Response scale","title":"Model predictions (robust) and their confidence intervals — get_predicted","text":"users set predict argument \"expectation\", predictions returned response scale, arguably convenient way understand visualize relationships interest. users set predict argument \"link\", predictions returned link scale, transformation applied. instance, logistic regression model, response scale corresponds predicted probabilities, whereas link-scale makes predictions log-odds (probabilities logit scale). Note users select predict=\"classification\" binomial models, get_predicted() function first calculate predictions user selected predict=\"expectation\". , round responses order return likely outcome.","code":""},{"path":"https://easystats.github.io/insight/reference/get_predicted.html","id":"heteroscedasticity-consistent-standard-errors","dir":"Reference","previous_headings":"","what":"Heteroscedasticity consistent standard errors","title":"Model predictions (robust) and their confidence intervals — get_predicted","text":"arguments vcov vcov_args can used calculate robust standard errors confidence intervals predictions. arguments, provided get_predicted(), passed get_predicted_ci(), thus, see related documentation details.","code":""},{"path":"https://easystats.github.io/insight/reference/get_predicted.html","id":"bayesian-and-bootstrapped-models-and-iterations","dir":"Reference","previous_headings":"","what":"Bayesian and Bootstrapped models and iterations","title":"Model predictions (robust) and their confidence intervals — get_predicted","text":"predictions based multiple iterations, instance case Bayesian models bootstrapped predictions, function used compute centrality (point-estimate predictions) can modified via centrality_function argument. instance, get_predicted(model, centrality_function = stats::median). default mean. Individual draws can accessed running iter <- .data.frame(get_predicted(model)), iterations can reshaped long format bayestestR::reshape_iterations(iter).","code":""},{"path":[]},{"path":"https://easystats.github.io/insight/reference/get_predicted.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Model predictions (robust) and their confidence intervals — get_predicted","text":"","code":"data(mtcars) x <- lm(mpg ~ cyl + hp, data = mtcars) predictions <- get_predicted(x, ci = 0.95) predictions #> Predicted values: #> #> [1] 21.21678 21.21678 26.07124 21.21678 15.44448 21.31239 14.10597 26.66401 #> [9] 26.03299 20.96820 20.96820 15.34888 15.34888 15.34888 14.87083 14.67962 #> [17] 14.39279 26.58752 26.85523 26.60665 25.99475 15.92253 15.92253 14.10597 #> [25] 15.44448 26.58752 26.10948 25.68880 13.74265 19.97387 12.38501 25.76529 #> #> NOTE: Confidence intervals, if available, are stored as attributes and can be accessed using `as.data.frame()` on this output. #> # Options and methods --------------------- get_predicted(x, predict = \"prediction\") #> Predicted values: #> #> [1] 21.21678 21.21678 26.07124 21.21678 15.44448 21.31239 14.10597 26.66401 #> [9] 26.03299 20.96820 20.96820 15.34888 15.34888 15.34888 14.87083 14.67962 #> [17] 14.39279 26.58752 26.85523 26.60665 25.99475 15.92253 15.92253 14.10597 #> [25] 15.44448 26.58752 26.10948 25.68880 13.74265 19.97387 12.38501 25.76529 #> #> NOTE: Confidence intervals, if available, are stored as attributes and can be accessed using `as.data.frame()` on this output. #> # Get CI as.data.frame(predictions) #> Predicted SE CI_low CI_high #> 1 21.21678 0.7281647 19.727518 22.70605 #> 2 21.21678 0.7281647 19.727518 22.70605 #> 3 26.07124 0.9279509 24.173366 27.96911 #> 4 21.21678 0.7281647 19.727518 22.70605 #> 5 15.44448 0.9200310 13.562810 17.32616 #> 6 21.31239 0.7777664 19.721680 22.90310 #> 7 14.10597 1.0080670 12.044237 16.16769 #> 8 26.66401 0.9225132 24.777260 28.55076 #> 9 26.03299 0.9362657 24.118117 27.94787 #> 10 20.96820 0.6234320 19.693139 22.24326 #> 11 20.96820 0.6234320 19.693139 22.24326 #> 12 15.34888 0.8862558 13.536280 17.16147 #> 13 15.34888 0.8862558 13.536280 17.16147 #> 14 15.34888 0.8862558 13.536280 17.16147 #> 15 14.87083 0.8057154 13.222961 16.51871 #> 16 14.67962 0.8206255 13.001249 16.35798 #> 17 14.39279 0.8911693 12.570146 16.21544 #> 18 26.58752 0.9099596 24.726448 28.44860 #> 19 26.85523 0.9695585 24.872258 28.83820 #> 20 26.60665 0.9127445 24.739874 28.47342 #> 21 25.99475 0.9454598 24.061069 27.92843 #> 22 15.92253 1.1490264 13.572504 18.27255 #> 23 15.92253 1.1490264 13.572504 18.27255 #> 24 14.10597 1.0080670 12.044237 16.16769 #> 25 15.44448 0.9200310 13.562810 17.32616 #> 26 26.58752 0.9099596 24.726448 28.44860 #> 27 26.10948 0.9205392 24.226768 27.99220 #> 28 25.68880 1.0474287 23.546572 27.83104 #> 29 13.74265 1.2011595 11.286007 16.19930 #> 30 19.97387 0.7635547 18.412227 21.53552 #> 31 12.38501 2.1153615 8.058613 16.71141 #> 32 25.76529 1.0175965 23.684073 27.84651 # Bootstrapped as.data.frame(get_predicted(x, iterations = 4)) #> Predicted iter_1 iter_2 iter_3 iter_4 #> 1 21.40432 21.39969 21.82240 20.970542 21.42465 #> 2 21.40432 21.39969 21.82240 20.970542 21.42465 #> 3 26.68824 27.17221 28.54269 23.659855 27.37819 #> 4 21.40432 21.39969 21.82240 20.970542 21.42465 #> 5 15.13788 15.17414 14.88754 16.075708 14.41413 #> 6 21.50666 21.44688 21.84475 21.200284 21.53475 #> 7 13.70504 14.51349 14.57464 12.859324 12.87272 #> 8 27.32278 27.46478 28.68126 25.084254 28.06082 #> 9 26.64730 27.15333 28.53375 23.567958 27.33415 #> 10 21.13822 21.27699 21.76429 20.373213 21.13838 #> 11 21.13822 21.27699 21.76429 20.373213 21.13838 #> 12 15.03554 15.12695 14.86519 15.845966 14.30403 #> 13 15.03554 15.12695 14.86519 15.845966 14.30403 #> 14 15.03554 15.12695 14.86519 15.845966 14.30403 #> 15 14.52381 14.89101 14.75344 14.697258 13.75353 #> 16 14.31912 14.79663 14.70874 14.237774 13.53333 #> 17 14.01208 14.65506 14.64169 13.548549 13.20302 #> 18 27.24090 27.42703 28.66338 24.900460 27.97274 #> 19 27.52747 27.55916 28.72596 25.543737 28.28102 #> 20 27.26137 27.43647 28.66785 24.946409 27.99476 #> 21 26.60636 27.13446 28.52481 23.476061 27.29011 #> 22 15.64961 15.41009 14.99929 17.224417 14.96464 #> 23 15.64961 15.41009 14.99929 17.224417 14.96464 #> 24 13.70504 14.51349 14.57464 12.859324 12.87272 #> 25 15.13788 15.17414 14.88754 16.075708 14.41413 #> 26 27.24090 27.42703 28.66338 24.900460 27.97274 #> 27 26.72917 27.19108 28.55163 23.751752 27.42223 #> 28 26.27885 26.98345 28.45329 22.740888 26.93779 #> 29 13.31613 14.33417 14.48970 11.986305 12.45434 #> 30 20.07382 20.78622 21.53184 17.983899 19.99334 #> 31 11.86282 13.66407 14.17233 8.723972 10.89091 #> 32 26.36073 27.02120 28.47117 22.924681 27.02587 # Same as as.data.frame(..., keep_iterations = FALSE) summary(get_predicted(x, iterations = 4)) #> Predicted #> 1 20.79277 #> 2 20.79277 #> 3 25.80472 #> 4 20.79277 #> 5 15.02221 #> 6 20.87179 #> 7 13.91592 #> 8 26.29465 #> 9 25.77311 #> 10 20.58731 #> 11 20.58731 #> 12 14.94319 #> 13 14.94319 #> 14 14.94319 #> 15 14.54809 #> 16 14.39005 #> 17 14.15298 #> 18 26.23143 #> 19 26.45269 #> 20 26.24724 #> 21 25.74151 #> 22 15.41732 #> 23 15.41732 #> 24 13.91592 #> 25 15.02221 #> 26 26.23143 #> 27 25.83633 #> 28 25.48864 #> 29 13.61564 #> 30 19.76550 #> 31 12.49355 #> 32 25.55186 # Different prediction types ------------------------ data(iris) data <- droplevels(iris[1:100, ]) # Fit a logistic model x <- glm(Species ~ Sepal.Length, data = data, family = \"binomial\") # Expectation (default): response scale + CI pred <- get_predicted(x, predict = \"expectation\", ci = 0.95) head(as.data.frame(pred)) #> Predicted SE CI_low CI_high #> 1 0.16579367 0.05943589 0.078854431 0.31573138 #> 2 0.06637193 0.03625646 0.022083989 0.18286787 #> 3 0.02479825 0.01843411 0.005675609 0.10175666 #> 4 0.01498061 0.01261461 0.002839122 0.07513285 #> 5 0.10623680 0.04779474 0.042437982 0.24173444 #> 6 0.48159935 0.07901420 0.333158095 0.63336131 # Prediction: response scale + PI pred <- get_predicted(x, predict = \"prediction\", ci = 0.95) head(as.data.frame(pred)) #> Predicted CI_low CI_high #> 1 0.16579367 2.220446e-16 1.000000e+00 #> 2 0.06637193 2.220446e-16 1.000000e+00 #> 3 0.02479825 2.220446e-16 2.220446e-16 #> 4 0.01498061 2.220446e-16 2.220446e-16 #> 5 0.10623680 2.220446e-16 1.000000e+00 #> 6 0.48159935 2.220446e-16 1.000000e+00 # Link: link scale + CI pred <- get_predicted(x, predict = \"link\", ci = 0.95) head(as.data.frame(pred)) #> Predicted SE CI_low CI_high #> 1 -1.61573668 0.4297415 -2.4580146 -0.7734588 #> 2 -2.64380391 0.5850960 -3.7905709 -1.4970369 #> 3 -3.67187114 0.7622663 -5.1658856 -2.1778567 #> 4 -4.18590475 0.8548690 -5.8614172 -2.5103923 #> 5 -2.12977030 0.5033646 -3.1163467 -1.1431939 #> 6 -0.07363584 0.3164854 -0.6939359 0.5466642 # Classification: classification \"type\" + PI pred <- get_predicted(x, predict = \"classification\", ci = 0.95) head(as.data.frame(pred)) #> Predicted CI_low CI_high #> 1 setosa setosa versicolor #> 2 setosa setosa versicolor #> 3 setosa setosa setosa #> 4 setosa setosa setosa #> 5 setosa setosa versicolor #> 6 setosa setosa versicolor"},{"path":"https://easystats.github.io/insight/reference/get_predicted_ci.html","id":null,"dir":"Reference","previous_headings":"","what":"Confidence intervals around predicted values — get_predicted_ci","title":"Confidence intervals around predicted values — get_predicted_ci","text":"Confidence intervals around predicted values","code":""},{"path":"https://easystats.github.io/insight/reference/get_predicted_ci.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Confidence intervals around predicted values — get_predicted_ci","text":"","code":"get_predicted_ci(x, ...) # Default S3 method get_predicted_ci( x, predictions = NULL, data = NULL, se = NULL, ci = 0.95, ci_type = \"confidence\", ci_method = NULL, dispersion_method = \"sd\", vcov = NULL, vcov_args = NULL, verbose = TRUE, ... )"},{"path":"https://easystats.github.io/insight/reference/get_predicted_ci.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Confidence intervals around predicted values — get_predicted_ci","text":"x statistical model (can also data.frame, case second argument model). ... argument passed, instance get_predicted_ci(). predictions vector predicted values (obtained stats::fitted(), stats::predict() get_predicted()). data optional data frame look variables predict. omitted, data used fit model used. Visualization matrices can generated using get_datagrid(). se Numeric vector standard error predicted values. NULL, standard errors calculated based variance-covariance matrix. ci interval level. Default NULL, fast even larger models. Set interval level explicit value, e.g. 0.95, 95% CI). ci_type Can \"prediction\" \"confidence\". Prediction intervals show range likely contains value new observation (range fall), whereas confidence intervals reflect uncertainty around estimated parameters (gives range link; instance regression line linear regressions). Prediction intervals account uncertainty model's parameters, plus random variation individual values. Thus, prediction intervals always wider confidence intervals. Moreover, prediction intervals necessarily become narrower sample size increases (reflect quality fit). applies mostly \"simple\" linear models (like lm), models (e.g., glm), prediction intervals somewhat useless (instance, binomial model dependent variable vector 1s 0s, prediction interval ... [0, 1]). ci_method method computing p values confidence intervals. Possible values depend model type. NULL uses default method, varies based model type. frequentist models: \"wald\" (default), \"residual\" \"normal\". Bayesian models: \"quantile\" (default), \"hdi\", \"eti\", \"spi\". Mixed effects lme4 models: \"wald\" (default), \"residual\", \"normal\", \"satterthwaite\", \"kenward-roger\". See get_df() details. dispersion_method Bootstrap dispersion Bayesian posterior summary: \"sd\" \"mad\". vcov Variance-covariance matrix used compute uncertainty estimates (e.g., robust standard errors). argument accepts covariance matrix, function returns covariance matrix, string identifies function used compute covariance matrix. covariance matrix function returns covariance matrix (e.g., stats::vcov()) string indicates kind uncertainty estimates return. Heteroskedasticity-consistent: \"vcovHC\", \"HC\", \"HC0\", \"HC1\", \"HC2\", \"HC3\", \"HC4\", \"HC4m\", \"HC5\". See ?sandwich::vcovHC Cluster-robust: \"vcovCR\", \"CR0\", \"CR1\", \"CR1p\", \"CR1S\", \"CR2\", \"CR3\". See ?clubSandwich::vcovCR() Bootstrap: \"vcovBS\", \"xy\", \"residual\", \"wild\", \"mammen\", \"webb\". See ?sandwich::vcovBS sandwich package functions: \"vcovHAC\", \"vcovPC\", \"vcovCL\", \"vcovPL\". vcov_args List arguments passed function identified vcov argument. function typically supplied sandwich clubSandwich packages. Please refer documentation (e.g., ?sandwich::vcovHAC) see list available arguments. estimation type (argument type) given, default type \"HC\" (\"vcovHC\") equals default sandwich package; type \"CR\" (\"vcoCR\"), default set \"CR3\". verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/get_predicted_ci.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Confidence intervals around predicted values — get_predicted_ci","text":"Typically, get_predicted() returns confidence intervals based standard errors returned predict()-function, assuming normal distribution (+/- 1.96 * SE) resp. Student's t-distribution (degrees freedom available). predict() certain class return standard errors (example, merMod-objects), calculated manually, based following steps: matrix-multiply X parameter vector B get predictions, extract variance-covariance matrix V parameters compute XVX' get variance-covariance matrix predictions. square-root diagonal matrix represent standard errors predictions, multiplied critical test-statistic value (e.g., ~1.96 normal distribution) confidence intervals. ci_type = \"prediction\", prediction intervals calculated. wider confidence intervals, also take account uncertainty model . taking square-root diagonal variance-covariance matrix, get_predicted_ci() adds residual variance values. mixed models, get_variance_residual() used, get_sigma()^2 used non-mixed models. preferred rely standard errors returned get_predicted() (.e. returned predict()-function), accurate manually calculated standard errors. Use get_predicted_ci() standard errors available otherwise. exception Bayesian models bootstrapped predictions, get_predicted_ci() returns quantiles posterior distribution bootstrapped samples predictions. actually accurate standard errors resp. confidence (uncertainty) intervals.","code":""},{"path":"https://easystats.github.io/insight/reference/get_predicted_ci.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Confidence intervals around predicted values — get_predicted_ci","text":"","code":"# Confidence Intervals for Model Predictions # ------------------------------------------ data(mtcars) # Linear model # ------------ x <- lm(mpg ~ cyl + hp, data = mtcars) predictions <- predict(x) ci_vals <- get_predicted_ci(x, predictions, ci_type = \"prediction\") head(ci_vals) #> SE CI_low CI_high #> 1 3.255505 14.558527 27.87504 #> 2 3.255505 14.558527 27.87504 #> 3 3.305931 19.309850 32.83263 #> 4 3.255505 14.558527 27.87504 #> 5 3.303717 8.687625 22.20134 #> 6 3.266957 14.630713 27.99407 ci_vals <- get_predicted_ci(x, predictions, ci_type = \"confidence\") head(ci_vals) #> SE CI_low CI_high #> 1 0.7281647 19.72752 22.70605 #> 2 0.7281647 19.72752 22.70605 #> 3 0.9279509 24.17337 27.96911 #> 4 0.7281647 19.72752 22.70605 #> 5 0.9200310 13.56281 17.32616 #> 6 0.7777664 19.72168 22.90310 ci_vals <- get_predicted_ci(x, predictions, ci = c(0.8, 0.9, 0.95)) head(ci_vals) #> SE CI_low_0.8 CI_high_0.8 CI_low_0.9 CI_high_0.9 #> Mazda RX4 0.7281647 20.26184 22.17172 19.97954 22.45403 #> Mazda RX4 Wag 0.7281647 20.26184 22.17172 19.97954 22.45403 #> Datsun 710 0.9279509 24.85429 27.28818 24.49453 27.64794 #> Hornet 4 Drive 0.7281647 20.26184 22.17172 19.97954 22.45403 #> Hornet Sportabout 0.9200310 14.23793 16.65104 13.88124 17.00773 #> Valiant 0.7777664 20.29240 22.33238 19.99087 22.63391 #> CI_low_0.95 CI_high_0.95 #> Mazda RX4 19.72752 22.70605 #> Mazda RX4 Wag 19.72752 22.70605 #> Datsun 710 24.17337 27.96911 #> Hornet 4 Drive 19.72752 22.70605 #> Hornet Sportabout 13.56281 17.32616 #> Valiant 19.72168 22.90310 # Bootstrapped # ------------ predictions <- get_predicted(x, iterations = 500) get_predicted_ci(x, predictions) #> SE CI_low CI_high #> 1 0.6778386 20.06367 22.73426 #> 2 0.6778386 20.06367 22.73426 #> 3 1.1213280 24.07299 28.19569 #> 4 0.6778386 20.06367 22.73426 #> 5 0.7137549 13.96361 16.74841 #> 6 0.7196399 20.11708 22.92205 #> 7 0.9616939 11.54478 15.32004 #> 8 1.1099003 24.70988 29.07236 #> 9 1.1281547 24.00743 28.15526 #> 10 0.5968210 19.90476 22.18073 #> 11 0.5968210 19.90476 22.18073 #> 12 0.6867313 13.94831 16.57341 #> 13 0.6867313 13.94831 16.57341 #> 14 0.6867313 13.94831 16.57341 #> 15 0.6619519 13.42214 15.93349 #> 16 0.7053541 13.08691 15.77129 #> 17 0.8151358 12.40637 15.55107 #> 18 1.1012410 24.63705 28.94998 #> 19 1.1440413 24.87906 29.34752 #> 20 1.1031298 24.65526 28.99487 #> 21 1.1356722 23.94017 28.10764 #> 22 0.9243855 14.17452 17.75612 #> 23 0.9243855 14.17452 17.75612 #> 24 0.9616939 11.54478 15.32004 #> 25 0.7137549 13.96361 16.74841 #> 26 1.1012410 24.63705 28.94998 #> 27 1.1152049 24.14757 28.24896 #> 28 1.2189054 23.41192 27.86701 #> 29 1.1785211 10.35989 15.04183 #> 30 0.8033095 18.06171 21.24781 #> 31 2.1096285 6.00274 14.50050 #> 32 1.1944721 23.58991 27.93128 ci_vals <- get_predicted_ci(x, predictions, ci = c(0.80, 0.95)) head(ci_vals) #> SE CI_low_0.8 CI_high_0.8 CI_low_0.95 CI_high_0.95 #> 1 0.6778386 20.45157 22.16835 20.06367 22.73426 #> 2 0.6778386 20.45157 22.16835 20.06367 22.73426 #> 3 1.1213280 24.67816 27.54677 24.07299 28.19569 #> 4 0.6778386 20.45157 22.16835 20.06367 22.73426 #> 5 0.7137549 14.54509 16.32089 13.96361 16.74841 #> 6 0.7196399 20.53000 22.33227 20.11708 22.92205 datawizard::reshape_ci(ci_vals) #> SE CI CI_low CI_high #> 1 0.6778386 0.80 20.451569 22.16835 #> 2 0.6778386 0.95 20.063672 22.73426 #> 3 0.6778386 0.80 20.451569 22.16835 #> 4 0.6778386 0.95 20.063672 22.73426 #> 5 1.1213280 0.80 24.678158 27.54677 #> 6 1.1213280 0.95 24.072992 28.19569 #> 7 0.6778386 0.80 20.451569 22.16835 #> 8 0.6778386 0.95 20.063672 22.73426 #> 9 0.7137549 0.80 14.545092 16.32089 #> 10 0.7137549 0.95 13.963615 16.74841 #> 11 0.7196399 0.80 20.530002 22.33227 #> 12 0.7196399 0.95 20.117084 22.92205 #> 13 0.9616939 0.80 12.655150 14.95435 #> 14 0.9616939 0.95 11.544778 15.32004 #> 15 1.1099003 0.80 25.382182 28.18554 #> 16 1.1099003 0.95 24.709884 29.07236 #> 17 1.1281547 0.80 24.601358 27.52583 #> 18 1.1281547 0.95 24.007430 28.15526 #> 19 0.5968210 0.80 20.254035 21.81961 #> 20 0.5968210 0.95 19.904758 22.18073 #> 21 0.5968210 0.80 20.254035 21.81961 #> 22 0.5968210 0.95 19.904758 22.18073 #> 23 0.6867313 0.80 14.457044 16.21674 #> 24 0.6867313 0.95 13.948306 16.57341 #> 25 0.6867313 0.80 14.457044 16.21674 #> 26 0.6867313 0.95 13.948306 16.57341 #> 27 0.6867313 0.80 14.457044 16.21674 #> 28 0.6867313 0.95 13.948306 16.57341 #> 29 0.6619519 0.80 13.896709 15.57043 #> 30 0.6619519 0.95 13.422141 15.93349 #> 31 0.7053541 0.80 13.603118 15.38838 #> 32 0.7053541 0.95 13.086914 15.77129 #> 33 0.8151358 0.80 13.135102 15.14540 #> 34 0.8151358 0.95 12.406367 15.55107 #> 35 1.1012410 0.80 25.282352 28.10660 #> 36 1.1012410 0.95 24.637053 28.94998 #> 37 1.1440413 0.80 25.552262 28.39162 #> 38 1.1440413 0.95 24.879062 29.34752 #> 39 1.1031298 0.80 25.307084 28.11418 #> 40 1.1031298 0.95 24.655261 28.99487 #> 41 1.1356722 0.80 24.536732 27.48013 #> 42 1.1356722 0.95 23.940169 28.10764 #> 43 0.9243855 0.80 14.860147 17.07831 #> 44 0.9243855 0.95 14.174521 17.75612 #> 45 0.9243855 0.80 14.860147 17.07831 #> 46 0.9243855 0.95 14.174521 17.75612 #> 47 0.9616939 0.80 12.655150 14.95435 #> 48 0.9616939 0.95 11.544778 15.32004 #> 49 0.7137549 0.80 14.545092 16.32089 #> 50 0.7137549 0.95 13.963615 16.74841 #> 51 1.1012410 0.80 25.282352 28.10660 #> 52 1.1012410 0.95 24.637053 28.94998 #> 53 1.1152049 0.80 24.740830 27.58820 #> 54 1.1152049 0.95 24.147568 28.24896 #> 55 1.2189054 0.80 24.021410 27.27151 #> 56 1.2189054 0.95 23.411922 27.86701 #> 57 1.1785211 0.80 12.017648 14.69466 #> 58 1.1785211 0.95 10.359894 15.04183 #> 59 0.8033095 0.80 18.845838 20.82505 #> 60 0.8033095 0.95 18.061714 21.24781 #> 61 2.1096285 0.80 9.139553 13.95768 #> 62 2.1096285 0.95 6.002740 14.50050 #> 63 1.1944721 0.80 24.160657 27.32296 #> 64 1.1944721 0.95 23.589908 27.93128 ci_vals <- get_predicted_ci(x, predictions, dispersion_method = \"MAD\", ci_method = \"HDI\" ) head(ci_vals) #> SE CI_low CI_high #> 1 0.6511853 20.08775 22.75861 #> 2 0.6511853 20.08775 22.75861 #> 3 1.1886593 24.12011 28.22016 #> 4 0.6511853 20.08775 22.75861 #> 5 0.6922916 13.92620 16.69426 #> 6 0.7042060 20.11663 22.92984 # Logistic model # -------------- x <- glm(vs ~ wt, data = mtcars, family = \"binomial\") predictions <- predict(x, type = \"link\") ci_vals <- get_predicted_ci(x, predictions, ci_type = \"prediction\") head(ci_vals) #> CI_low CI_high #> Mazda RX4 -Inf Inf #> Mazda RX4 Wag -Inf Inf #> Datsun 710 -Inf Inf #> Hornet 4 Drive -Inf Inf #> Hornet Sportabout -Inf Inf #> Valiant -Inf Inf ci_vals <- get_predicted_ci(x, predictions, ci_type = \"confidence\") head(ci_vals) #> SE CI_low CI_high #> 1 0.5623444 -0.3931282 1.8112213 #> 2 0.4690190 -0.6974034 1.1411172 #> 3 0.7195076 -0.1279982 2.6924199 #> 4 0.4459072 -1.3016913 0.4462326 #> 5 0.5021936 -1.8418839 0.1266787 #> 6 0.5094490 -1.8943152 0.1026881"},{"path":"https://easystats.github.io/insight/reference/get_predictors.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the data from model predictors — get_predictors","title":"Get the data from model predictors — get_predictors","text":"Returns data predictor variables (fixed effects).","code":""},{"path":"https://easystats.github.io/insight/reference/get_predictors.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the data from model predictors — get_predictors","text":"","code":"get_predictors(x, verbose = TRUE)"},{"path":"https://easystats.github.io/insight/reference/get_predictors.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the data from model predictors — get_predictors","text":"x fitted model. verbose Toggle messages warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/get_predictors.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the data from model predictors — get_predictors","text":"data predictor variables, data frame.","code":""},{"path":"https://easystats.github.io/insight/reference/get_predictors.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the data from model predictors — get_predictors","text":"","code":"m <- lm(mpg ~ wt + cyl + vs, data = mtcars) head(get_predictors(m)) #> wt cyl vs #> Mazda RX4 2.620 6 0 #> Mazda RX4 Wag 2.875 6 0 #> Datsun 710 2.320 4 1 #> Hornet 4 Drive 3.215 6 1 #> Hornet Sportabout 3.440 8 0 #> Valiant 3.460 6 1"},{"path":"https://easystats.github.io/insight/reference/get_priors.html","id":null,"dir":"Reference","previous_headings":"","what":"Get summary of priors used for a model — get_priors","title":"Get summary of priors used for a model — get_priors","text":"Provides summary prior distributions used parameters given model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_priors.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get summary of priors used for a model — get_priors","text":"","code":"get_priors(x, ...) # S3 method for class 'brmsfit' get_priors(x, verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/get_priors.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get summary of priors used for a model — get_priors","text":"x Bayesian model. ... Currently used. verbose Toggle warnings messages.","code":""},{"path":"https://easystats.github.io/insight/reference/get_priors.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get summary of priors used for a model — get_priors","text":"data frame summary prior distributions used parameters given model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_priors.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get summary of priors used for a model — get_priors","text":"","code":"# \\donttest{ library(rstanarm) model <- stan_glm(Sepal.Width ~ Species * Petal.Length, data = iris) #> #> SAMPLING FOR MODEL 'continuous' NOW (CHAIN 1). #> Chain 1: #> Chain 1: Gradient evaluation took 2.1e-05 seconds #> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 0.21 seconds. #> Chain 1: Adjust your expectations accordingly! #> Chain 1: #> Chain 1: #> Chain 1: Iteration: 1 / 2000 [ 0%] (Warmup) #> Chain 1: Iteration: 200 / 2000 [ 10%] (Warmup) #> Chain 1: Iteration: 400 / 2000 [ 20%] (Warmup) #> Chain 1: Iteration: 600 / 2000 [ 30%] (Warmup) #> Chain 1: Iteration: 800 / 2000 [ 40%] (Warmup) #> Chain 1: Iteration: 1000 / 2000 [ 50%] (Warmup) #> Chain 1: Iteration: 1001 / 2000 [ 50%] (Sampling) #> Chain 1: Iteration: 1200 / 2000 [ 60%] (Sampling) #> Chain 1: Iteration: 1400 / 2000 [ 70%] (Sampling) #> Chain 1: Iteration: 1600 / 2000 [ 80%] (Sampling) #> Chain 1: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 1: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 1: #> Chain 1: Elapsed Time: 0.438 seconds (Warm-up) #> Chain 1: 0.499 seconds (Sampling) #> Chain 1: 0.937 seconds (Total) #> Chain 1: #> #> SAMPLING FOR MODEL 'continuous' NOW (CHAIN 2). #> Chain 2: #> Chain 2: Gradient evaluation took 1.4e-05 seconds #> Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 0.14 seconds. #> Chain 2: Adjust your expectations accordingly! #> Chain 2: #> Chain 2: #> Chain 2: Iteration: 1 / 2000 [ 0%] (Warmup) #> Chain 2: Iteration: 200 / 2000 [ 10%] (Warmup) #> Chain 2: Iteration: 400 / 2000 [ 20%] (Warmup) #> Chain 2: Iteration: 600 / 2000 [ 30%] (Warmup) #> Chain 2: Iteration: 800 / 2000 [ 40%] (Warmup) #> Chain 2: Iteration: 1000 / 2000 [ 50%] (Warmup) #> Chain 2: Iteration: 1001 / 2000 [ 50%] (Sampling) #> Chain 2: Iteration: 1200 / 2000 [ 60%] (Sampling) #> Chain 2: Iteration: 1400 / 2000 [ 70%] (Sampling) #> Chain 2: Iteration: 1600 / 2000 [ 80%] (Sampling) #> Chain 2: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 2: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 2: #> Chain 2: Elapsed Time: 0.453 seconds (Warm-up) #> Chain 2: 0.503 seconds (Sampling) #> Chain 2: 0.956 seconds (Total) #> Chain 2: #> #> SAMPLING FOR MODEL 'continuous' NOW (CHAIN 3). #> Chain 3: #> Chain 3: Gradient evaluation took 1.1e-05 seconds #> Chain 3: 1000 transitions using 10 leapfrog steps per transition would take 0.11 seconds. #> Chain 3: Adjust your expectations accordingly! #> Chain 3: #> Chain 3: #> Chain 3: Iteration: 1 / 2000 [ 0%] (Warmup) #> Chain 3: Iteration: 200 / 2000 [ 10%] (Warmup) #> Chain 3: Iteration: 400 / 2000 [ 20%] (Warmup) #> Chain 3: Iteration: 600 / 2000 [ 30%] (Warmup) #> Chain 3: Iteration: 800 / 2000 [ 40%] (Warmup) #> Chain 3: Iteration: 1000 / 2000 [ 50%] (Warmup) #> Chain 3: Iteration: 1001 / 2000 [ 50%] (Sampling) #> Chain 3: Iteration: 1200 / 2000 [ 60%] (Sampling) #> Chain 3: Iteration: 1400 / 2000 [ 70%] (Sampling) #> Chain 3: Iteration: 1600 / 2000 [ 80%] (Sampling) #> Chain 3: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 3: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 3: #> Chain 3: Elapsed Time: 0.443 seconds (Warm-up) #> Chain 3: 0.541 seconds (Sampling) #> Chain 3: 0.984 seconds (Total) #> Chain 3: #> #> SAMPLING FOR MODEL 'continuous' NOW (CHAIN 4). #> Chain 4: #> Chain 4: Gradient evaluation took 1.1e-05 seconds #> Chain 4: 1000 transitions using 10 leapfrog steps per transition would take 0.11 seconds. #> Chain 4: Adjust your expectations accordingly! #> Chain 4: #> Chain 4: #> Chain 4: Iteration: 1 / 2000 [ 0%] (Warmup) #> Chain 4: Iteration: 200 / 2000 [ 10%] (Warmup) #> Chain 4: Iteration: 400 / 2000 [ 20%] (Warmup) #> Chain 4: Iteration: 600 / 2000 [ 30%] (Warmup) #> Chain 4: Iteration: 800 / 2000 [ 40%] (Warmup) #> Chain 4: Iteration: 1000 / 2000 [ 50%] (Warmup) #> Chain 4: Iteration: 1001 / 2000 [ 50%] (Sampling) #> Chain 4: Iteration: 1200 / 2000 [ 60%] (Sampling) #> Chain 4: Iteration: 1400 / 2000 [ 70%] (Sampling) #> Chain 4: Iteration: 1600 / 2000 [ 80%] (Sampling) #> Chain 4: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 4: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 4: #> Chain 4: Elapsed Time: 0.408 seconds (Warm-up) #> Chain 4: 0.487 seconds (Sampling) #> Chain 4: 0.895 seconds (Total) #> Chain 4: get_priors(model) #> Parameter Distribution Location Scale Adjusted_Scale #> 1 (Intercept) normal 3.057333 2.5 1.0896657 #> 2 Speciesversicolor normal 0.000000 2.5 2.3038121 #> 3 Speciesvirginica normal 0.000000 2.5 2.3038121 #> 4 Petal.Length normal 0.000000 2.5 0.6172700 #> 5 Speciesversicolor:Petal.Length normal 0.000000 2.5 0.5360283 #> 6 Speciesvirginica:Petal.Length normal 0.000000 2.5 0.4119705 # }"},{"path":"https://easystats.github.io/insight/reference/get_random.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the data from random effects — get_random","title":"Get the data from random effects — get_random","text":"Returns data random effects terms.","code":""},{"path":"https://easystats.github.io/insight/reference/get_random.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the data from random effects — get_random","text":"","code":"get_random(x)"},{"path":"https://easystats.github.io/insight/reference/get_random.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the data from random effects — get_random","text":"x fitted mixed model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_random.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the data from random effects — get_random","text":"data random effects terms, data frame. NULL model random effects.","code":""},{"path":"https://easystats.github.io/insight/reference/get_random.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the data from random effects — get_random","text":"","code":"data(sleepstudy) # prepare some data... sleepstudy$mygrp <- sample(1:5, size = 180, replace = TRUE) sleepstudy$mysubgrp <- NA for (i in 1:5) { filter_group <- sleepstudy$mygrp == i sleepstudy$mysubgrp[filter_group] <- sample(1:30, size = sum(filter_group), replace = TRUE) } m <- lmer( Reaction ~ Days + (1 | mygrp / mysubgrp) + (1 | Subject), data = sleepstudy ) #> boundary (singular) fit: see help('isSingular') head(get_random(m)) #> mysubgrp mygrp Subject #> 1 25 4 308 #> 2 6 3 308 #> 3 26 3 308 #> 4 24 5 308 #> 5 19 3 308 #> 6 3 1 308"},{"path":"https://easystats.github.io/insight/reference/get_residuals.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract model residuals — get_residuals","title":"Extract model residuals — get_residuals","text":"Returns residuals regression models.","code":""},{"path":"https://easystats.github.io/insight/reference/get_residuals.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract model residuals — get_residuals","text":"","code":"get_residuals(x, ...) # Default S3 method get_residuals(x, weighted = FALSE, verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/get_residuals.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract model residuals — get_residuals","text":"x model. ... Passed residuals(), possible. weighted Logical, TRUE, returns weighted residuals. verbose Toggle warnings messages.","code":""},{"path":"https://easystats.github.io/insight/reference/get_residuals.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract model residuals — get_residuals","text":"residuals, NULL information accessed.","code":""},{"path":"https://easystats.github.io/insight/reference/get_residuals.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extract model residuals — get_residuals","text":"function returns default type residuals, .e. response linear models, deviance residuals models class glm etc. access different types, pass type argument (see 'Examples'). function robust alternative residuals(), works special model objects otherwise respond properly calling residuals().","code":""},{"path":"https://easystats.github.io/insight/reference/get_residuals.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract model residuals — get_residuals","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_residuals(m) #> Mazda RX4 Mazda RX4 Wag Datsun 710 Hornet 4 Drive #> -1.0559619 -0.2281383 -3.4822509 0.7514545 #> Hornet Sportabout Valiant Duster 360 Merc 240D #> 2.0342659 -1.7531855 -1.9437064 0.9420887 #> Merc 230 Merc 280 Merc 280C Merc 450SE #> -0.7877660 -0.7181129 -2.1181129 1.7794773 #> Merc 450SL Merc 450SLC Cadillac Fleetwood Lincoln Continental #> 1.5757124 -0.3619692 -0.3898093 0.1750587 #> Chrysler Imperial Fiat 128 Honda Civic Toyota Corolla #> 4.2185956 5.7281850 1.8290601 6.0432610 #> Toyota Corona Dodge Challenger AMC Javelin Camaro Z28 #> -4.3115276 -0.9060247 -1.4819660 -2.0671872 #> Pontiac Firebird Fiat X1-9 Porsche 914-2 Lotus Europa #> 3.8490446 -0.2321023 -0.3424249 1.4979307 #> Ford Pantera L Ferrari Dino Maserati Bora Volvo 142E #> -1.7422533 -1.8690068 -1.2437064 -3.3889219 m <- glm(vs ~ wt + cyl + mpg, data = mtcars, family = binomial()) get_residuals(m) # type = \"deviance\" by default #> Mazda RX4 Mazda RX4 Wag Datsun 710 Hornet 4 Drive #> -0.63287224 -0.81557679 0.24153475 1.23515879 #> Hornet Sportabout Valiant Duster 360 Merc 240D #> -0.09537483 1.09436219 -0.09536895 0.08620842 #> Merc 230 Merc 280 Merc 280C Merc 450SE #> 0.09512715 1.08274703 1.12137225 -0.17947784 #> Merc 450SL Merc 450SLC Cadillac Fleetwood Lincoln Continental #> -0.12620688 -0.12450351 -0.53935361 -0.64596525 #> Chrysler Imperial Fiat 128 Honda Civic Toyota Corolla #> -0.67827839 0.20117929 0.40994430 0.28751494 #> Toyota Corona Dodge Challenger AMC Javelin Camaro Z28 #> 0.21446014 -0.09381913 -0.08439431 -0.12504287 #> Pontiac Firebird Fiat X1-9 Porsche 914-2 Lotus Europa #> -0.15299615 0.31935163 -2.59315645 0.45762007 #> Ford Pantera L Ferrari Dino Maserati Bora Volvo 142E #> -0.06384435 -0.70853216 -0.09761985 0.15116709 get_residuals(m, type = \"response\") #> Mazda RX4 Mazda RX4 Wag Datsun 710 Hornet 4 Drive #> -0.181485065 -0.282930670 0.028748195 0.533645229 #> Hornet Sportabout Valiant Duster 360 Merc 240D #> -0.004537852 0.450537255 -0.004537293 0.003709050 #> Merc 230 Merc 280 Merc 280C Merc 450SE #> 0.004514367 0.443545885 0.466735567 -0.015977138 #> Merc 450SL Merc 450SLC Cadillac Fleetwood Lincoln Continental #> -0.007932459 -0.007720604 -0.135367880 -0.188308998 #> Chrysler Imperial Fiat 128 Honda Civic Toyota Corolla #> -0.205490858 0.020033170 0.080593721 0.040489884 #> Toyota Corona Dodge Challenger AMC Javelin Camaro Z28 #> 0.022734170 -0.004391345 -0.003554867 -0.007787380 #> Pontiac Firebird Fiat X1-9 Porsche 914-2 Lotus Europa #> -0.011635687 0.049714423 -0.965342121 0.099412603 #> Ford Pantera L Ferrari Dino Maserati Bora Volvo 142E #> -0.002035975 -0.221984564 -0.004753484 0.011360719"},{"path":"https://easystats.github.io/insight/reference/get_response.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the values from the response variable — get_response","title":"Get the values from the response variable — get_response","text":"Returns values response variable(s) model object. model multivariate response model, data frame values response variables returned.","code":""},{"path":"https://easystats.github.io/insight/reference/get_response.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the values from the response variable — get_response","text":"","code":"get_response(x, ...) # Default S3 method get_response( x, select = NULL, as_proportion = TRUE, source = \"environment\", verbose = TRUE, ... ) # S3 method for class 'nestedLogit' get_response(x, dichotomies = FALSE, source = \"environment\", ...)"},{"path":"https://easystats.github.io/insight/reference/get_response.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the values from the response variable — get_response","text":"x fitted model. ... Currently used. select Optional name(s) response variables extract values. Can used case regression models multiple response variables. as_proportion Logical, TRUE response value proportion (e.g. y1 / y2), returned response value vector result proportion. Else, always data frame returned. source String, indicating data recovered. source = \"environment\" (default), data recovered environment (e.g. data workspace). option usually fastest way getting data ensures original variables used model fitting returned. Note always current data recovered environment. Hence, data modified model fitting (e.g., variables recoded rows filtered), returned data may longer equal model data. source = \"frame\" (\"mf\"), data taken model frame. transformed variables back-transformed, possible. option returns data even available environment, however, certain edge cases back-transforming original data may fail. source = \"environment\" fails recover data, tries extract data model frame; source = \"frame\" data extracted model frame, data recovered environment. ways returns observations missing data variables used model fitting. verbose Toggle warnings. dichotomies Logical, model nestedLogit objects, returns response values dichotomies.","code":""},{"path":"https://easystats.github.io/insight/reference/get_response.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the values from the response variable — get_response","text":"values response variable, vector, data frame x one defined response variable.","code":""},{"path":"https://easystats.github.io/insight/reference/get_response.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the values from the response variable — get_response","text":"","code":"data(cbpp) cbpp$trials <- cbpp$size - cbpp$incidence dat <<- cbpp m <- glm(cbind(incidence, trials) ~ period, data = dat, family = binomial) head(get_response(m)) #> incidence trials #> 1 2 12 #> 2 3 9 #> 3 4 5 #> 4 0 5 #> 5 3 19 #> 6 1 17 get_response(m, select = \"incidence\") #> [1] 2 data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_response(m) #> [1] 21.0 21.0 22.8 21.4 18.7 18.1 14.3 24.4 22.8 19.2 17.8 16.4 17.3 15.2 10.4 #> [16] 10.4 14.7 32.4 30.4 33.9 21.5 15.5 15.2 13.3 19.2 27.3 26.0 30.4 15.8 19.7 #> [31] 15.0 21.4"},{"path":"https://easystats.github.io/insight/reference/get_sigma.html","id":null,"dir":"Reference","previous_headings":"","what":"Get residual standard deviation from models — get_sigma","title":"Get residual standard deviation from models — get_sigma","text":"Returns sigma, corresponds estimated standard deviation residuals. function extends sigma() base R generic models implemented . also computes confidence interval (CI), stored attribute. Sigma key-component regression models, part -called auxiliary parameters estimated. Indeed, linear models instance assume residuals comes normal distribution mean 0 standard deviation sigma. See details section information interpretation calculation.","code":""},{"path":"https://easystats.github.io/insight/reference/get_sigma.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get residual standard deviation from models — get_sigma","text":"","code":"get_sigma(x, ci = NULL, verbose = TRUE)"},{"path":"https://easystats.github.io/insight/reference/get_sigma.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get residual standard deviation from models — get_sigma","text":"x model. ci Scalar, CI level. default (NULL) returns CI. verbose Toggle messages warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/get_sigma.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get residual standard deviation from models — get_sigma","text":"residual standard deviation (sigma), NULL information accessed.","code":""},{"path":"https://easystats.github.io/insight/reference/get_sigma.html","id":"interpretation-of-sigma","dir":"Reference","previous_headings":"","what":"Interpretation of Sigma","title":"Get residual standard deviation from models — get_sigma","text":"residual standard deviation, σ, indicates predicted outcome within +/- σ units linear predictor approximately 68% data points (Gelman, Hill & Vehtari 2020, p.84). words, residual standard deviation indicates accuracy model predict scores, thus can thought \"measure average distance observation falls prediction model\" (Gelman, Hill & Vehtari 2020, p.168). σ can considered measure unexplained variation data, precision inferences regression coefficients.","code":""},{"path":"https://easystats.github.io/insight/reference/get_sigma.html","id":"calculation-of-sigma","dir":"Reference","previous_headings":"","what":"Calculation of Sigma","title":"Get residual standard deviation from models — get_sigma","text":"default, get_sigma() tries extract sigma calling stats::sigma(). model-object sigma() method, next step calculating sigma square-root model-deviance divided residual degrees freedom. Finally, even approach fails, x mixed model, residual standard deviation accessed using square-root get_variance_residual().","code":""},{"path":"https://easystats.github.io/insight/reference/get_sigma.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get residual standard deviation from models — get_sigma","text":"Gelman, ., Hill, J., & Vehtari, . (2020). Regression Stories. Cambridge University Press.","code":""},{"path":"https://easystats.github.io/insight/reference/get_sigma.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get residual standard deviation from models — get_sigma","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_sigma(m) #> [1] 2.608133 #> attr(,\"class\") #> [1] \"insight_aux\" \"numeric\""},{"path":"https://easystats.github.io/insight/reference/get_statistic.html","id":null,"dir":"Reference","previous_headings":"","what":"Get statistic associated with estimates — get_statistic","title":"Get statistic associated with estimates — get_statistic","text":"Returns statistic (t, z, ...) model estimates. cases, related column coef(summary()).","code":""},{"path":"https://easystats.github.io/insight/reference/get_statistic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get statistic associated with estimates — get_statistic","text":"","code":"get_statistic(x, ...) # Default S3 method get_statistic(x, column_index = 3, verbose = TRUE, ...) # S3 method for class 'glmmTMB' get_statistic(x, component = \"all\", ...) # S3 method for class 'emmGrid' get_statistic(x, ci = 0.95, adjust = \"none\", merge_parameters = FALSE, ...) # S3 method for class 'gee' get_statistic(x, robust = FALSE, ...)"},{"path":"https://easystats.github.io/insight/reference/get_statistic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get statistic associated with estimates — get_statistic","text":"x model. ... Currently used. column_index model objects defined get_statistic() method yet, default method called. method tries extract statistic column coef(summary()), index column pulled column_index. Defaults 3, default statistic column models' summary-output. verbose Toggle messages warnings. component String, indicating model component parameters returned. default models \"\", returns requested information available model components. Furthermore, specific options depending model class. component may one : zero-inflated models (gmmTMB, hurdle, zeroinfl, ...) can also \"conditional\" \"zero-inflated\". Note conditional component also called count mean component, depending model. glmmTMB also \"dispersion\" component. models smooth terms, component = \"smooth_terms\" returns test statistic smooth terms. models class mhurdle, may also one \"conditional\", \"zero_inflated\", \"infrequent_purchase\" \"auxiliary\". models class clm2 clmm2, may also \"scale\". models class betareg, betaor betamfx, may also \"precision\". *mfx models (logitmfx, betamfx, ...), may also \"marginal\". models class mvord, may also \"thresholds\" \"correlation\". models class selection, may also \"selection\", \"outcome\" \"auxiliary\". models class glmx, may also \"extra\". models class averaging, may also \"full\". ci Confidence Interval (CI) level. Default 0.95 (95%). Currently applies objects class emmGrid. adjust Character value naming method used adjust p-values confidence intervals. See ?emmeans::summary.emmGrid details. merge_parameters Logical, TRUE x multiple columns parameter names (like emmGrid objects may ), merged single parameter column, parameters names values values. robust Logical, TRUE, test statistic based robust standard errors returned.","code":""},{"path":"https://easystats.github.io/insight/reference/get_statistic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get statistic associated with estimates — get_statistic","text":"data frame model's parameter names related test statistic.","code":""},{"path":"https://easystats.github.io/insight/reference/get_statistic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get statistic associated with estimates — get_statistic","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_statistic(m) #> Parameter Statistic #> 1 (Intercept) 11.3994647 #> 2 wt -4.1204121 #> 3 cyl -2.2234114 #> 4 vs 0.3221477"},{"path":"https://easystats.github.io/insight/reference/get_transformation.html","id":null,"dir":"Reference","previous_headings":"","what":"Return function of transformed response variables — get_transformation","title":"Return function of transformed response variables — get_transformation","text":"functions checks whether transformation, log- exp-transforming, applied response variable (dependent variable) regression formula, returns related function used transformation.","code":""},{"path":"https://easystats.github.io/insight/reference/get_transformation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return function of transformed response variables — get_transformation","text":"","code":"get_transformation(x)"},{"path":"https://easystats.github.io/insight/reference/get_transformation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return function of transformed response variables — get_transformation","text":"x regression model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_transformation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return function of transformed response variables — get_transformation","text":"list two functions: $transformation, function used transform response variable; $inverse, inverse-function $transformation (can used \"back-transformation\"). transformation applied, list-elements $transformation $inverse just return function(x) x. transformation unknown, NULL returned.","code":""},{"path":"https://easystats.github.io/insight/reference/get_transformation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Return function of transformed response variables — get_transformation","text":"","code":"# identity, no transformation model <- lm(Sepal.Length ~ Species, data = iris) get_transformation(model) #> $transformation #> function (x) #> x #> #> #> #> $inverse #> function (x) #> x #> #> #> # log-transformation model <- lm(log(Sepal.Length) ~ Species, data = iris) get_transformation(model) #> $transformation #> function (x, base = exp(1)) .Primitive(\"log\") #> #> $inverse #> function (x) .Primitive(\"exp\") #> # log-function get_transformation(model)$transformation(0.3) #> [1] -1.203973 log(0.3) #> [1] -1.203973 # inverse function is exp() get_transformation(model)$inverse(0.3) #> [1] 1.349859 exp(0.3) #> [1] 1.349859"},{"path":"https://easystats.github.io/insight/reference/get_varcov.html","id":null,"dir":"Reference","previous_headings":"","what":"Get variance-covariance matrix from models — get_varcov","title":"Get variance-covariance matrix from models — get_varcov","text":"Returns variance-covariance, retrieved stats::vcov(), works model objects probably provide vcov()-method.","code":""},{"path":"https://easystats.github.io/insight/reference/get_varcov.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get variance-covariance matrix from models — get_varcov","text":"","code":"get_varcov(x, ...) # Default S3 method get_varcov(x, verbose = TRUE, vcov = NULL, vcov_args = NULL, ...) # S3 method for class 'nestedLogit' get_varcov( x, component = \"all\", verbose = TRUE, vcov = NULL, vcov_args = NULL, ... ) # S3 method for class 'betareg' get_varcov( x, component = c(\"conditional\", \"precision\", \"all\"), verbose = TRUE, ... ) # S3 method for class 'clm2' get_varcov(x, component = c(\"all\", \"conditional\", \"scale\"), ...) # S3 method for class 'truncreg' get_varcov(x, component = c(\"conditional\", \"all\"), verbose = TRUE, ...) # S3 method for class 'hurdle' get_varcov( x, component = c(\"conditional\", \"zero_inflated\", \"zi\", \"all\"), vcov = NULL, vcov_args = NULL, verbose = TRUE, ... ) # S3 method for class 'glmmTMB' get_varcov( x, component = c(\"conditional\", \"zero_inflated\", \"zi\", \"dispersion\", \"all\"), verbose = TRUE, ... ) # S3 method for class 'MixMod' get_varcov( x, effects = c(\"fixed\", \"random\"), component = c(\"conditional\", \"zero_inflated\", \"zi\", \"dispersion\", \"auxiliary\", \"all\"), verbose = TRUE, ... ) # S3 method for class 'brmsfit' get_varcov(x, component = \"conditional\", verbose = TRUE, ...) # S3 method for class 'betamfx' get_varcov( x, component = c(\"conditional\", \"precision\", \"all\"), verbose = TRUE, ... ) # S3 method for class 'aov' get_varcov(x, complete = FALSE, verbose = TRUE, ...) # S3 method for class 'mixor' get_varcov(x, effects = c(\"all\", \"fixed\", \"random\"), verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/get_varcov.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get variance-covariance matrix from models — get_varcov","text":"x model. ... Currently used. verbose Toggle warnings. vcov Variance-covariance matrix used compute uncertainty estimates (e.g., robust standard errors). argument accepts covariance matrix, function returns covariance matrix, string identifies function used compute covariance matrix. covariance matrix function returns covariance matrix (e.g., stats::vcov()) string indicates kind uncertainty estimates return. Heteroskedasticity-consistent: \"vcovHC\", \"HC\", \"HC0\", \"HC1\", \"HC2\", \"HC3\", \"HC4\", \"HC4m\", \"HC5\". See ?sandwich::vcovHC Cluster-robust: \"vcovCR\", \"CR0\", \"CR1\", \"CR1p\", \"CR1S\", \"CR2\", \"CR3\". See ?clubSandwich::vcovCR() Bootstrap: \"vcovBS\", \"xy\", \"residual\", \"wild\", \"mammen\", \"webb\". See ?sandwich::vcovBS sandwich package functions: \"vcovHAC\", \"vcovPC\", \"vcovCL\", \"vcovPL\". vcov_args List arguments passed function identified vcov argument. function typically supplied sandwich clubSandwich packages. Please refer documentation (e.g., ?sandwich::vcovHAC) see list available arguments. estimation type (argument type) given, default type \"HC\" (\"vcovHC\") equals default sandwich package; type \"CR\" (\"vcoCR\"), default set \"CR3\". component complete variance-covariance matrix model returned, specific model components (like count zero-inflated model parts)? Applies models zero-inflated component, models precision (e.g. betareg) component. component may one \"conditional\", \"zi\", \"zero-inflated\", \"dispersion\", \"precision\", \"\". May abbreviated. Note conditional component also called count mean component, depending model. effects complete variance-covariance matrix model returned, specific model parameters ? Currently applies models class mixor. complete Logical, TRUE, aov, returns full variance-covariance matrix.","code":""},{"path":"https://easystats.github.io/insight/reference/get_varcov.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get variance-covariance matrix from models — get_varcov","text":"variance-covariance matrix, matrix-object.","code":""},{"path":"https://easystats.github.io/insight/reference/get_varcov.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Get variance-covariance matrix from models — get_varcov","text":"get_varcov() tries return nearest positive definite matrix case negative eigenvalues variance-covariance matrix. ensures still possible, instance, calculate standard errors model parameters. message shown matrix negative definite corrected matrix returned.","code":""},{"path":"https://easystats.github.io/insight/reference/get_varcov.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get variance-covariance matrix from models — get_varcov","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) get_varcov(m) #> (Intercept) wt cyl vs #> (Intercept) 11.552774 0.1680680 -1.5843752 -4.7487893 #> wt 0.168068 0.6207461 -0.3301421 -0.2797924 #> cyl -1.584375 -0.3301421 0.3764045 0.7257641 #> vs -4.748789 -0.2797924 0.7257641 2.6475113 # vcov of zero-inflation component from hurdle-model data(\"bioChemists\", package = \"pscl\") mod <- hurdle(art ~ phd + fem | ment, data = bioChemists, dist = \"negbin\") get_varcov(mod, component = \"zero_inflated\") #> (Intercept) ment #> (Intercept) 0.0115917010 -0.0009744732 #> ment -0.0009744732 0.0001561139 # robust vcov of, count component from hurdle-model data(\"bioChemists\", package = \"pscl\") mod <- hurdle(art ~ phd + fem | ment, data = bioChemists, dist = \"negbin\") get_varcov( mod, component = \"conditional\", vcov = \"BS\", vcov_args = list(R = 50) ) #> count_(Intercept) count_phd count_femWomen #> count_(Intercept) 0.041339413 -0.009967283 -0.007235679 #> count_phd -0.009967283 0.003028860 0.001278198 #> count_femWomen -0.007235679 0.001278198 0.011140592"},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":null,"dir":"Reference","previous_headings":"","what":"Get variance components from random effects models — get_variance","title":"Get variance components from random effects models — get_variance","text":"function extracts different variance components mixed model returns result list. Functions like get_variance_residual(x) get_variance_fixed(x) shortcuts get_variance(x, component = \"residual\") etc.","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get variance components from random effects models — get_variance","text":"","code":"get_variance( x, component = c(\"all\", \"fixed\", \"random\", \"residual\", \"distribution\", \"dispersion\", \"intercept\", \"slope\", \"rho01\", \"rho00\"), verbose = TRUE, ... ) get_variance_residual(x, verbose = TRUE, ...) get_variance_fixed(x, verbose = TRUE, ...) get_variance_random(x, verbose = TRUE, tolerance = 1e-05, ...) get_variance_distribution(x, verbose = TRUE, ...) get_variance_dispersion(x, verbose = TRUE, ...) get_variance_intercept(x, verbose = TRUE, ...) get_variance_slope(x, verbose = TRUE, ...) get_correlation_slope_intercept(x, verbose = TRUE, ...) get_correlation_slopes(x, verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get variance components from random effects models — get_variance","text":"x mixed effects model. component Character value, indicating variance component returned. default, variance components returned. distribution-specific (\"distribution\") residual (\"residual\") variance computational intensive components, hence may take seconds calculate. verbose Toggle warnings. ... Currently used. tolerance Tolerance singularity check random effects, decide whether compute random effect variances . Indicates value convergence result accepted. larger tolerance , stricter test . See performance::check_singularity().","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get variance components from random effects models — get_variance","text":"list following elements: var.fixed, variance attributable fixed effects var.random, (mean) variance random effects var.residual, residual variance (sum dispersion distribution) var.distribution, distribution-specific variance var.dispersion, variance due additive dispersion var.intercept, random-intercept-variance, -subject-variance (τ00) var.slope, random-slope-variance (τ11) cor.slope_intercept, random-slope-intercept-correlation (ρ01) cor.slopes, correlation random slopes (ρ00)","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get variance components from random effects models — get_variance","text":"function returns different variance components mixed models, needed, instance, calculate r-squared measures intraclass-correlation coefficient (ICC).","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Get variance components from random effects models — get_variance","text":"function supports models class merMod (including models blme), clmm, cpglmm, glmmadmb, glmmTMB, MixMod, lme, mixed, rlmerMod, stanreg, brmsfit wbm. Support objects class MixMod (GLMMadaptive), lme (nlme) brmsfit (brms) experimental may work models.","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"fixed-effects-variance","dir":"Reference","previous_headings":"","what":"Fixed effects variance","title":"Get variance components from random effects models — get_variance","text":"fixed effects variance, σ2f, variance matrix-multiplication β∗X (parameter vector model matrix).","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"random-effects-variance","dir":"Reference","previous_headings":"","what":"Random effects variance","title":"Get variance components from random effects models — get_variance","text":"random effect variance, σ2i, represents mean random effect variance model. Since variance reflects \"average\" random effects variance mixed models, also appropriate models complex random effects structures, like random slopes nested random effects. Details can found Johnson 2014, particular equation 10. simple random-intercept models, random effects variance equals random-intercept variance.","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"distribution-specific-variance","dir":"Reference","previous_headings":"","what":"Distribution-specific variance","title":"Get variance components from random effects models — get_variance","text":"distribution-specific variance, σ2d, depends model family. Gaussian models, σ2 (.e. sigma(model)^2). models binary outcome, \\(\\pi^2 / 3\\) logit-link, 1 probit-link, \\(\\pi^2 / 6\\) cloglog-links. Models Gamma-families use \\(\\mu^2\\) (obtained family$variance()). models, distribution-specific variance based lognormal approximation, \\(log(1 + var(x) / \\mu^2)\\) (see Nakagawa et al. 2017). expected variance zero-inflated model computed according Zuur et al. 2012, p277.","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"variance-for-the-additive-overdispersion-term","dir":"Reference","previous_headings":"","what":"Variance for the additive overdispersion term","title":"Get variance components from random effects models — get_variance","text":"variance additive overdispersion term, σ2e, represents \"excess variation relative expected certain distribution\" (Nakagawa et al. 2017). (? many?) cases, 0.","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"residual-variance","dir":"Reference","previous_headings":"","what":"Residual variance","title":"Get variance components from random effects models — get_variance","text":"residual variance, σ2ε, simply σ2d + σ2e.","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"random-intercept-variance","dir":"Reference","previous_headings":"","what":"Random intercept variance","title":"Get variance components from random effects models — get_variance","text":"random intercept variance, -subject variance (τ00), obtained VarCorr(). indicates much groups subjects differ , residual variance σ2ε indicates within-subject variance.","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"random-slope-variance","dir":"Reference","previous_headings":"","what":"Random slope variance","title":"Get variance components from random effects models — get_variance","text":"random slope variance (τ11) obtained VarCorr(). measure available mixed models random slopes.","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"random-slope-intercept-correlation","dir":"Reference","previous_headings":"","what":"Random slope-intercept correlation","title":"Get variance components from random effects models — get_variance","text":"random slope-intercept correlation (ρ01) obtained VarCorr(). measure available mixed models random intercepts slopes.","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get variance components from random effects models — get_variance","text":"Johnson, P. C. D. (2014). Extension Nakagawa & Schielzeth’s R2 GLMM random slopes models. Methods Ecology Evolution, 5(9), 944–946. doi:10.1111/2041-210X.12225 Nakagawa, S., Johnson, P. C. D., & Schielzeth, H. (2017). coefficient determination R2 intra-class correlation coefficient generalized linear mixed-effects models revisited expanded. Journal Royal Society Interface, 14(134), 20170213. doi:10.1098/rsif.2017.0213 Zuur, . F., Savel'ev, . ., & Ieno, E. N. (2012). Zero inflated models generalized linear mixed models R. Newburgh, United Kingdom: Highland Statistics.","code":""},{"path":"https://easystats.github.io/insight/reference/get_variance.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get variance components from random effects models — get_variance","text":"","code":"# \\donttest{ library(lme4) data(sleepstudy) m <- lmer(Reaction ~ Days + (1 + Days | Subject), data = sleepstudy) get_variance(m) #> $var.fixed #> [1] 908.9534 #> #> $var.random #> [1] 1698.084 #> #> $var.residual #> [1] 654.94 #> #> $var.distribution #> [1] 654.94 #> #> $var.dispersion #> [1] 0 #> #> $var.intercept #> Subject #> 612.1002 #> #> $var.slope #> Subject.Days #> 35.07171 #> #> $cor.slope_intercept #> Subject #> 0.06555124 #> get_variance_fixed(m) #> var.fixed #> 908.9534 get_variance_residual(m) #> var.residual #> 654.94 # }"},{"path":"https://easystats.github.io/insight/reference/get_weights.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the values from model weights — get_weights","title":"Get the values from model weights — get_weights","text":"Returns weighting variable model.","code":""},{"path":"https://easystats.github.io/insight/reference/get_weights.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the values from model weights — get_weights","text":"","code":"get_weights(x, ...) # Default S3 method get_weights(x, na_rm = FALSE, null_as_ones = FALSE, ...)"},{"path":"https://easystats.github.io/insight/reference/get_weights.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the values from model weights — get_weights","text":"x fitted model. ... Currently used. na_rm Logical, TRUE, removes possible missing values. null_as_ones Logical, TRUE, return vector 1 weights specified model (weights set 1).","code":""},{"path":"https://easystats.github.io/insight/reference/get_weights.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the values from model weights — get_weights","text":"weighting variable, NULL weights specified. weighting variable also returned (instead NULL) weights set 1 (.e. weighting), set null_as_ones = TRUE.","code":""},{"path":"https://easystats.github.io/insight/reference/get_weights.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the values from model weights — get_weights","text":"","code":"data(mtcars) set.seed(123) mtcars$weight <- rnorm(nrow(mtcars), 1, .3) # LMs m <- lm(mpg ~ wt + cyl + vs, data = mtcars, weights = weight) get_weights(m) #> [1] 0.8318573 0.9309468 1.4676125 1.0211525 1.0387863 1.5145195 1.1382749 #> [8] 0.6204816 0.7939441 0.8663014 1.3672245 1.1079441 1.1202314 1.0332048 #> [15] 0.8332477 1.5360739 1.1493551 0.4100149 1.2104068 0.8581626 0.6796529 #> [22] 0.9346075 0.6921987 0.7813326 0.8124882 0.4939920 1.2513361 1.0460119 #> [29] 0.6585589 1.3761445 1.1279393 0.9114786 get_weights(lm(mpg ~ wt, data = mtcars), null_as_ones = TRUE) #> [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 # GLMs m <- glm(vs ~ disp + mpg, data = mtcars, weights = weight, family = quasibinomial) get_weights(m) #> Mazda RX4 Mazda RX4 Wag Datsun 710 Hornet 4 Drive #> 0.8318573 0.9309468 1.4676125 1.0211525 #> Hornet Sportabout Valiant Duster 360 Merc 240D #> 1.0387863 1.5145195 1.1382749 0.6204816 #> Merc 230 Merc 280 Merc 280C Merc 450SE #> 0.7939441 0.8663014 1.3672245 1.1079441 #> Merc 450SL Merc 450SLC Cadillac Fleetwood Lincoln Continental #> 1.1202314 1.0332048 0.8332477 1.5360739 #> Chrysler Imperial Fiat 128 Honda Civic Toyota Corolla #> 1.1493551 0.4100149 1.2104068 0.8581626 #> Toyota Corona Dodge Challenger AMC Javelin Camaro Z28 #> 0.6796529 0.9346075 0.6921987 0.7813326 #> Pontiac Firebird Fiat X1-9 Porsche 914-2 Lotus Europa #> 0.8124882 0.4939920 1.2513361 1.0460119 #> Ford Pantera L Ferrari Dino Maserati Bora Volvo 142E #> 0.6585589 1.3761445 1.1279393 0.9114786 m <- glm(cbind(cyl, gear) ~ mpg, data = mtcars, weights = weight, family = binomial) get_weights(m) #> Mazda RX4 Mazda RX4 Wag Datsun 710 Hornet 4 Drive #> 8.318573 9.309468 11.740900 9.190373 #> Hornet Sportabout Valiant Duster 360 Merc 240D #> 11.426650 13.630675 12.521023 4.963853 #> Merc 230 Merc 280 Merc 280C Merc 450SE #> 6.351553 8.663014 13.672245 12.187386 #> Merc 450SL Merc 450SLC Cadillac Fleetwood Lincoln Continental #> 12.322546 11.365253 9.165724 16.896813 #> Chrysler Imperial Fiat 128 Honda Civic Toyota Corolla #> 12.642907 3.280119 9.683254 6.865301 #> Toyota Corona Dodge Challenger AMC Javelin Camaro Z28 #> 4.757570 10.280683 7.614185 8.594659 #> Pontiac Firebird Fiat X1-9 Porsche 914-2 Lotus Europa #> 8.937370 3.951936 11.262025 9.414107 #> Ford Pantera L Ferrari Dino Maserati Bora Volvo 142E #> 8.561266 15.137589 14.663210 7.291828"},{"path":"https://easystats.github.io/insight/reference/has_intercept.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks if model has an intercept — has_intercept","title":"Checks if model has an intercept — has_intercept","text":"Checks model intercept.","code":""},{"path":"https://easystats.github.io/insight/reference/has_intercept.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks if model has an intercept — has_intercept","text":"","code":"has_intercept(x, verbose = TRUE)"},{"path":"https://easystats.github.io/insight/reference/has_intercept.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks if model has an intercept — has_intercept","text":"x model object. verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/has_intercept.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks if model has an intercept — has_intercept","text":"TRUE x intercept, FALSE otherwise.","code":""},{"path":"https://easystats.github.io/insight/reference/has_intercept.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks if model has an intercept — has_intercept","text":"","code":"model <- lm(mpg ~ 0 + gear, data = mtcars) has_intercept(model) #> [1] FALSE model <- lm(mpg ~ gear, data = mtcars) has_intercept(model) #> [1] TRUE model <- lmer(Reaction ~ 0 + Days + (Days | Subject), data = sleepstudy) has_intercept(model) #> [1] FALSE model <- lmer(Reaction ~ Days + (Days | Subject), data = sleepstudy) has_intercept(model) #> [1] TRUE"},{"path":"https://easystats.github.io/insight/reference/insight-package.html","id":null,"dir":"Reference","previous_headings":"","what":"insight: A Unified Interface to Access Information from Model Objects in R. — insight-package","title":"insight: A Unified Interface to Access Information from Model Objects in R. — insight-package","text":"fitting statistical model, many useful pieces information simultaneously calculated stored beyond coefficient estimates general model fit statistics. Although exist generic functions obtain model information data, many package-specific modelling functions provide methods allow users access valuable information. insight R-package fills important gap providing suite functions support almost model (see list many models supported List Supported Packages Models section). goal insight, , provide tools provide easy, intuitive, consistent access information contained model objects. tools aid applied research virtually field fit, diagnose, present statistical models streamlining access every aspect many model objects via consistent syntax output. References: Lüdecke et al. (2019) doi:10.21105/joss.01412 .","code":""},{"path":[]},{"path":"https://easystats.github.io/insight/reference/insight-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"insight: A Unified Interface to Access Information from Model Objects in R. — insight-package","text":"Maintainer: Daniel Lüdecke d.luedecke@uke.de (ORCID) (@strengejacke) Authors: Dominique Makowski dom.makowski@gmail.com (ORCID) (@Dom_Makowski) [contributor] Indrajeet Patil patilindrajeet.science@gmail.com (ORCID) (@patilindrajeets) [contributor] Philip Waggoner philip.waggoner@gmail.com (ORCID) [contributor] Mattan S. Ben-Shachar matanshm@post.bgu.ac.il (ORCID) [contributor] Brenton M. Wiernik brenton@wiernik.org (ORCID) (@bmwiernik) [contributor] Vincent Arel-Bundock vincent.arel-bundock@umontreal.ca (ORCID) [contributor] Etienne Bacher etienne.bacher@protonmail.com (ORCID) [contributor] contributors: Alex Hayes alexpghayes@gmail.com (ORCID) [reviewer] Grant McDermott grantmcd@uoregon.edu (ORCID) [contributor] Rémi Thériault remi.theriault@mail.mcgill.ca (ORCID) (@rempsyc) [contributor] Alex Reinhart areinhar@stat.cmu.edu (ORCID) [contributor]","code":""},{"path":"https://easystats.github.io/insight/reference/is_converged.html","id":null,"dir":"Reference","previous_headings":"","what":"Convergence test for mixed effects models — is_converged","title":"Convergence test for mixed effects models — is_converged","text":"is_converged() provides alternative convergence test merMod-objects.","code":""},{"path":"https://easystats.github.io/insight/reference/is_converged.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convergence test for mixed effects models — is_converged","text":"","code":"is_converged(x, tolerance = 0.001, ...)"},{"path":"https://easystats.github.io/insight/reference/is_converged.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convergence test for mixed effects models — is_converged","text":"x merMod glmmTMB-object. tolerance Indicates value convergence result accepted. smaller tolerance , stricter test . ... Currently used.","code":""},{"path":"https://easystats.github.io/insight/reference/is_converged.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convergence test for mixed effects models — is_converged","text":"TRUE convergence fine FALSE convergence suspicious. Additionally, convergence value returned attribute.","code":""},{"path":"https://easystats.github.io/insight/reference/is_converged.html","id":"convergence-and-log-likelihood","dir":"Reference","previous_headings":"","what":"Convergence and log-likelihood","title":"Convergence test for mixed effects models — is_converged","text":"Convergence problems typically arise model converged solution log-likelihood true maximum. may result unreliable overly complex (non-estimable) estimates standard errors.","code":""},{"path":"https://easystats.github.io/insight/reference/is_converged.html","id":"inspect-model-convergence","dir":"Reference","previous_headings":"","what":"Inspect model convergence","title":"Convergence test for mixed effects models — is_converged","text":"lme4 performs convergence-check (see ?lme4::convergence), however, discussed suggested one lme4-authors comment, check can strict. is_converged() thus provides alternative convergence test merMod-objects.","code":""},{"path":"https://easystats.github.io/insight/reference/is_converged.html","id":"resolving-convergence-issues","dir":"Reference","previous_headings":"","what":"Resolving convergence issues","title":"Convergence test for mixed effects models — is_converged","text":"Convergence issues easy diagnose. help page ?lme4::convergence provides current advice resolve convergence issues. Another clue might large parameter values, e.g. estimates (scale linear predictor) larger 10 (non-identity link) generalized linear model might indicate complete separation, can addressed regularization, e.g. penalized regression Bayesian regression appropriate priors fixed effects.","code":""},{"path":"https://easystats.github.io/insight/reference/is_converged.html","id":"convergence-versus-singularity","dir":"Reference","previous_headings":"","what":"Convergence versus Singularity","title":"Convergence test for mixed effects models — is_converged","text":"Note different meaning singularity convergence: singularity indicates issue \"true\" best estimate, .e. whether maximum likelihood estimation variance-covariance matrix random effects positive definite semi-definite. Convergence question whether can assume numerical optimization worked correctly .","code":""},{"path":"https://easystats.github.io/insight/reference/is_converged.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convergence test for mixed effects models — is_converged","text":"","code":"data(cbpp) set.seed(1) cbpp$x <- rnorm(nrow(cbpp)) cbpp$x2 <- runif(nrow(cbpp)) model <- glmer( cbind(incidence, size - incidence) ~ period + x + x2 + (1 + x | herd), data = cbpp, family = binomial() ) is_converged(model) #> [1] TRUE #> attr(,\"gradient\") #> [1] 0.0002803063 # \\donttest{ model <- glmmTMB( Sepal.Length ~ poly(Petal.Width, 4) * poly(Petal.Length, 4) + (1 + poly(Petal.Width, 4) | Species), data = iris ) #> Warning: Model convergence problem; non-positive-definite Hessian matrix. See vignette('troubleshooting') #> Warning: Model convergence problem; false convergence (8). See vignette('troubleshooting'), help('diagnose') is_converged(model) #> [1] FALSE # }"},{"path":"https://easystats.github.io/insight/reference/is_empty_object.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if object is empty — is_empty_object","title":"Check if object is empty — is_empty_object","text":"Check object empty","code":""},{"path":"https://easystats.github.io/insight/reference/is_empty_object.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if object is empty — is_empty_object","text":"","code":"is_empty_object(x)"},{"path":"https://easystats.github.io/insight/reference/is_empty_object.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if object is empty — is_empty_object","text":"x list, vector, dataframe.","code":""},{"path":"https://easystats.github.io/insight/reference/is_empty_object.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check if object is empty — is_empty_object","text":"logical indicating whether entered object empty.","code":""},{"path":"https://easystats.github.io/insight/reference/is_empty_object.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check if object is empty — is_empty_object","text":"","code":"is_empty_object(c(1, 2, 3, NA)) #> [1] FALSE is_empty_object(list(NULL, c(NA, NA))) #> [1] FALSE is_empty_object(list(NULL, NA)) #> [1] FALSE"},{"path":"https://easystats.github.io/insight/reference/is_gam_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks if a model is a generalized additive model — is_gam_model","title":"Checks if a model is a generalized additive model — is_gam_model","text":"Small helper checks model generalized additive model.","code":""},{"path":"https://easystats.github.io/insight/reference/is_gam_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks if a model is a generalized additive model — is_gam_model","text":"","code":"is_gam_model(x)"},{"path":"https://easystats.github.io/insight/reference/is_gam_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks if a model is a generalized additive model — is_gam_model","text":"x model object.","code":""},{"path":"https://easystats.github.io/insight/reference/is_gam_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks if a model is a generalized additive model — is_gam_model","text":"logical, TRUE x generalized additive model smooth-terms","code":""},{"path":"https://easystats.github.io/insight/reference/is_gam_model.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Checks if a model is a generalized additive model — is_gam_model","text":"function returns TRUE model inherits typical GAM model class smooth terms present model formula. model smooth terms typical gam class, FALSE returned.","code":""},{"path":"https://easystats.github.io/insight/reference/is_gam_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks if a model is a generalized additive model — is_gam_model","text":"","code":"data(iris) model1 <- lm(Petal.Length ~ Petal.Width + Sepal.Length, data = iris) model2 <- mgcv::gam(Petal.Length ~ Petal.Width + s(Sepal.Length), data = iris) is_gam_model(model1) #> [1] FALSE is_gam_model(model2) #> [1] TRUE"},{"path":"https://easystats.github.io/insight/reference/is_mixed_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks if a model is a mixed effects model — is_mixed_model","title":"Checks if a model is a mixed effects model — is_mixed_model","text":"Small helper checks model mixed effects model, .e. model random effects.","code":""},{"path":"https://easystats.github.io/insight/reference/is_mixed_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks if a model is a mixed effects model — is_mixed_model","text":"","code":"is_mixed_model(x)"},{"path":"https://easystats.github.io/insight/reference/is_mixed_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks if a model is a mixed effects model — is_mixed_model","text":"x model object.","code":""},{"path":"https://easystats.github.io/insight/reference/is_mixed_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks if a model is a mixed effects model — is_mixed_model","text":"logical, TRUE x mixed model.","code":""},{"path":"https://easystats.github.io/insight/reference/is_mixed_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks if a model is a mixed effects model — is_mixed_model","text":"","code":"data(mtcars) model <- lm(mpg ~ wt + cyl + vs, data = mtcars) is_mixed_model(model) #> [1] FALSE data(sleepstudy, package = \"lme4\") model <- lme4::lmer(Reaction ~ Days + (1 | Subject), data = sleepstudy) is_mixed_model(model) #> [1] TRUE"},{"path":"https://easystats.github.io/insight/reference/is_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks if an object is a regression model or statistical test object — is_model","title":"Checks if an object is a regression model or statistical test object — is_model","text":"Small helper checks model regression model statistical object. is_regression_model() stricter returns TRUE regression models, , e.g., htest objects.","code":""},{"path":"https://easystats.github.io/insight/reference/is_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks if an object is a regression model or statistical test object — is_model","text":"","code":"is_model(x) is_regression_model(x)"},{"path":"https://easystats.github.io/insight/reference/is_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks if an object is a regression model or statistical test object — is_model","text":"x object.","code":""},{"path":"https://easystats.github.io/insight/reference/is_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks if an object is a regression model or statistical test object — is_model","text":"logical, TRUE x (supported) model object.","code":""},{"path":"https://easystats.github.io/insight/reference/is_model.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Checks if an object is a regression model or statistical test object — is_model","text":"function returns TRUE x model object.","code":""},{"path":"https://easystats.github.io/insight/reference/is_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks if an object is a regression model or statistical test object — is_model","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) is_model(m) #> [1] TRUE is_model(mtcars) #> [1] FALSE test <- t.test(1:10, y = c(7:20)) is_model(test) #> [1] TRUE is_regression_model(test) #> [1] FALSE"},{"path":"https://easystats.github.io/insight/reference/is_model_supported.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks if a regression model object is supported by the insight package — is_model_supported","title":"Checks if a regression model object is supported by the insight package — is_model_supported","text":"Small helper checks model supported (regression) model object. supported_models() prints list currently supported model classes.","code":""},{"path":"https://easystats.github.io/insight/reference/is_model_supported.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks if a regression model object is supported by the insight package — is_model_supported","text":"","code":"is_model_supported(x) supported_models()"},{"path":"https://easystats.github.io/insight/reference/is_model_supported.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks if a regression model object is supported by the insight package — is_model_supported","text":"x object.","code":""},{"path":"https://easystats.github.io/insight/reference/is_model_supported.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks if a regression model object is supported by the insight package — is_model_supported","text":"logical, TRUE x (supported) model object.","code":""},{"path":"https://easystats.github.io/insight/reference/is_model_supported.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Checks if a regression model object is supported by the insight package — is_model_supported","text":"function returns TRUE x model object works package's functions. list supported models can also found : https://github.com/easystats/insight.","code":""},{"path":"https://easystats.github.io/insight/reference/is_model_supported.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks if a regression model object is supported by the insight package — is_model_supported","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) is_model_supported(m) #> [1] TRUE is_model_supported(mtcars) #> [1] FALSE # to see all supported models supported_models() #> [1] \"AKP\" \"Anova.mlm\" #> [3] \"Arima\" \"BBmm\" #> [5] \"BBreg\" \"BFBayesFactor\" #> [7] \"BGGM\" \"DirichletRegModel\" #> [9] \"Gam\" \"Glm\" #> [11] \"HLfit\" \"LORgee\" #> [13] \"MANOVA\" \"MCMCglmm\" #> [15] \"MixMod\" \"PMCMR\" #> [17] \"RM\" \"Rchoice\" #> [19] \"Sarlm\" \"SemiParBIV\" #> [21] \"aareg\" \"afex_aov\" #> [23] \"anova.rms\" \"aov\" #> [25] \"aovlist\" \"averaging\" #> [27] \"bamlss\" \"bamlss.frame\" #> [29] \"bayesQR\" \"bayesx\" #> [31] \"bcplm\" \"betamfx\" #> [33] \"betaor\" \"betareg\" #> [35] \"bfsl\" \"bife\" #> [37] \"bifeAPEs\" \"bigglm\" #> [39] \"biglm\" \"blavaan\" #> [41] \"blrm\" \"bracl\" #> [43] \"brglm\" \"brmsfit\" #> [45] \"brmultinom\" \"btergm\" #> [47] \"censReg\" \"cgam\" #> [49] \"cgamm\" \"cglm\" #> [51] \"clm\" \"clm2\" #> [53] \"clmm\" \"clmm2\" #> [55] \"clogit\" \"coeftest\" #> [57] \"complmrob\" \"confusionMatrix\" #> [59] \"coxme\" \"coxph\" #> [61] \"coxph.penal\" \"coxr\" #> [63] \"cpglm\" \"cpglmm\" #> [65] \"crch\" \"crq\" #> [67] \"crqs\" \"crr\" #> [69] \"dep.effect\" \"draws\" #> [71] \"drc\" \"eglm\" #> [73] \"elm\" \"epi.2by2\" #> [75] \"ergm\" \"feglm\" #> [77] \"feis\" \"felm\" #> [79] \"fitdistr\" \"fixest\" #> [81] \"flac\" \"flexsurvreg\" #> [83] \"flic\" \"gam\" #> [85] \"gamlss\" \"gamm\" #> [87] \"gamm4\" \"garch\" #> [89] \"gbm\" \"gee\" #> [91] \"geeglm\" \"glht\" #> [93] \"glimML\" \"glm\" #> [95] \"glmRob\" \"glmm\" #> [97] \"glmmPQL\" \"glmmTMB\" #> [99] \"glmmadmb\" \"glmrob\" #> [101] \"glmx\" \"gls\" #> [103] \"gmnl\" \"hglm\" #> [105] \"htest\" \"hurdle\" #> [107] \"ivFixed\" \"iv_robust\" #> [109] \"ivprobit\" \"ivreg\" #> [111] \"lavaan\" \"lm\" #> [113] \"lmRob\" \"lm_robust\" #> [115] \"lme\" \"lmerMod\" #> [117] \"lmerModLmerTest\" \"lmodel2\" #> [119] \"lmrob\" \"logistf\" #> [121] \"logitmfx\" \"logitor\" #> [123] \"logitr\" \"lqm\" #> [125] \"lqmm\" \"lrm\" #> [127] \"manova\" \"marginaleffects\" #> [129] \"marginaleffects.summary\" \"margins\" #> [131] \"maxLik\" \"mblogit\" #> [133] \"mclogit\" \"mcmc\" #> [135] \"mcmc.list\" \"mcp1\" #> [137] \"mcp12\" \"mcp2\" #> [139] \"med1way\" \"mediate\" #> [141] \"merMod\" \"merModList\" #> [143] \"meta_bma\" \"meta_fixed\" #> [145] \"meta_random\" \"metaplus\" #> [147] \"mhurdle\" \"mipo\" #> [149] \"mira\" \"mixed\" #> [151] \"mixor\" \"mjoint\" #> [153] \"mle\" \"mle2\" #> [155] \"mlm\" \"mlogit\" #> [157] \"mmclogit\" \"mmlogit\" #> [159] \"mmrm\" \"mmrm_fit\" #> [161] \"mmrm_tmb\" \"model_fit\" #> [163] \"multinom\" \"mvord\" #> [165] \"negbinirr\" \"negbinmfx\" #> [167] \"nestedLogit\" \"ols\" #> [169] \"onesampb\" \"orm\" #> [171] \"pgmm\" \"phyloglm\" #> [173] \"phylolm\" \"plm\" #> [175] \"poissonirr\" \"poissonmfx\" #> [177] \"polr\" \"probitmfx\" #> [179] \"psm\" \"ridgelm\" #> [181] \"riskRegression\" \"rjags\" #> [183] \"rlm\" \"rlmerMod\" #> [185] \"rma\" \"rma.uni\" #> [187] \"robmixglm\" \"robtab\" #> [189] \"rq\" \"rqs\" #> [191] \"rqss\" \"rvar\" #> [193] \"scam\" \"selection\" #> [195] \"sem\" \"semLm\" #> [197] \"semLme\" \"serp\" #> [199] \"slm\" \"speedglm\" #> [201] \"speedlm\" \"stanfit\" #> [203] \"stanmvreg\" \"stanreg\" #> [205] \"summary.lm\" \"survfit\" #> [207] \"survreg\" \"svy_vglm\" #> [209] \"svychisq\" \"svyglm\" #> [211] \"svyolr\" \"t1way\" #> [213] \"tobit\" \"trimcibt\" #> [215] \"truncreg\" \"vgam\" #> [217] \"vglm\" \"wbgee\" #> [219] \"wblm\" \"wbm\" #> [221] \"wmcpAKP\" \"yuen\" #> [223] \"yuend\" \"zcpglm\" #> [225] \"zeroinfl\" \"zerotrunc\""},{"path":"https://easystats.github.io/insight/reference/is_multivariate.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks if an object stems from a multivariate response model — is_multivariate","title":"Checks if an object stems from a multivariate response model — is_multivariate","text":"Small helper checks model multivariate response model, .e. model multiple outcomes.","code":""},{"path":"https://easystats.github.io/insight/reference/is_multivariate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks if an object stems from a multivariate response model — is_multivariate","text":"","code":"is_multivariate(x)"},{"path":"https://easystats.github.io/insight/reference/is_multivariate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks if an object stems from a multivariate response model — is_multivariate","text":"x model object, object returned function package.","code":""},{"path":"https://easystats.github.io/insight/reference/is_multivariate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks if an object stems from a multivariate response model — is_multivariate","text":"logical, TRUE either x model object multivariate response model, TRUE return value function insight multivariate response model.","code":""},{"path":"https://easystats.github.io/insight/reference/is_multivariate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks if an object stems from a multivariate response model — is_multivariate","text":"","code":"# \\donttest{ library(rstanarm) data(\"pbcLong\") model <- suppressWarnings(stan_mvmer( formula = list( logBili ~ year + (1 | id), albumin ~ sex + year + (year | id) ), data = pbcLong, chains = 1, cores = 1, seed = 12345, iter = 1000, show_messages = FALSE, refresh = 0 )) #> Fitting a multivariate glmer model. #> #> Please note the warmup may be much slower than later iterations! f <- find_formula(model) is_multivariate(model) #> [1] TRUE is_multivariate(f) #> [1] TRUE # }"},{"path":"https://easystats.github.io/insight/reference/is_nested_models.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks whether a list of models are nested models — is_nested_models","title":"Checks whether a list of models are nested models — is_nested_models","text":"Checks whether list models nested models, strictly following order passed function.","code":""},{"path":"https://easystats.github.io/insight/reference/is_nested_models.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks whether a list of models are nested models — is_nested_models","text":"","code":"is_nested_models(...)"},{"path":"https://easystats.github.io/insight/reference/is_nested_models.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks whether a list of models are nested models — is_nested_models","text":"... Multiple regression model objects.","code":""},{"path":"https://easystats.github.io/insight/reference/is_nested_models.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks whether a list of models are nested models — is_nested_models","text":"TRUE models nested, FALSE otherwise. models nested, also returns two attributes indicate whether nesting models decreasing increasing order.","code":""},{"path":"https://easystats.github.io/insight/reference/is_nested_models.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Checks whether a list of models are nested models — is_nested_models","text":"term \"nested\" means fixed predictors model contained within fixed predictors larger model (sometimes referred encompassing model). Currently, is_nested_models() ignores random effects parameters.","code":""},{"path":"https://easystats.github.io/insight/reference/is_nested_models.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks whether a list of models are nested models — is_nested_models","text":"","code":"m1 <- lm(Sepal.Length ~ Petal.Width + Species, data = iris) m2 <- lm(Sepal.Length ~ Species, data = iris) m3 <- lm(Sepal.Length ~ Petal.Width, data = iris) m4 <- lm(Sepal.Length ~ 1, data = iris) is_nested_models(m1, m2, m4) #> [1] TRUE #> attr(,\"is_nested_increasing\") #> [1] FALSE #> attr(,\"is_nested_decreasing\") #> [1] TRUE is_nested_models(m4, m2, m1) #> [1] TRUE #> attr(,\"is_nested_increasing\") #> [1] TRUE #> attr(,\"is_nested_decreasing\") #> [1] FALSE is_nested_models(m1, m2, m3) #> [1] FALSE"},{"path":"https://easystats.github.io/insight/reference/is_nullmodel.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks if model is a null-model (intercept-only) — is_nullmodel","title":"Checks if model is a null-model (intercept-only) — is_nullmodel","text":"Checks model null-model (intercept-), .e. conditional part model predictors.","code":""},{"path":"https://easystats.github.io/insight/reference/is_nullmodel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks if model is a null-model (intercept-only) — is_nullmodel","text":"","code":"is_nullmodel(x)"},{"path":"https://easystats.github.io/insight/reference/is_nullmodel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks if model is a null-model (intercept-only) — is_nullmodel","text":"x model object.","code":""},{"path":"https://easystats.github.io/insight/reference/is_nullmodel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks if model is a null-model (intercept-only) — is_nullmodel","text":"TRUE x null-model, FALSE otherwise.","code":""},{"path":"https://easystats.github.io/insight/reference/is_nullmodel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks if model is a null-model (intercept-only) — is_nullmodel","text":"","code":"model <- lm(mpg ~ 1, data = mtcars) is_nullmodel(model) #> [1] TRUE model <- lm(mpg ~ gear, data = mtcars) is_nullmodel(model) #> [1] FALSE data(sleepstudy, package = \"lme4\") model <- lme4::lmer(Reaction ~ 1 + (Days | Subject), data = sleepstudy) is_nullmodel(model) #> [1] TRUE model <- lme4::lmer(Reaction ~ Days + (Days | Subject), data = sleepstudy) is_nullmodel(model) #> [1] FALSE"},{"path":"https://easystats.github.io/insight/reference/link_function.html","id":null,"dir":"Reference","previous_headings":"","what":"Get link-function from model object — link_function","title":"Get link-function from model object — link_function","text":"Returns link-function model object.","code":""},{"path":"https://easystats.github.io/insight/reference/link_function.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get link-function from model object — link_function","text":"","code":"link_function(x, ...) # S3 method for class 'betamfx' link_function(x, what = c(\"mean\", \"precision\"), ...) # S3 method for class 'gamlss' link_function(x, what = c(\"mu\", \"sigma\", \"nu\", \"tau\"), ...) # S3 method for class 'betareg' link_function(x, what = c(\"mean\", \"precision\"), ...) # S3 method for class 'DirichletRegModel' link_function(x, what = c(\"mean\", \"precision\"), ...)"},{"path":"https://easystats.github.io/insight/reference/link_function.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get link-function from model object — link_function","text":"x fitted model. ... Currently used. gamlss models, indicates distribution parameter link (inverse) function returned; betareg DirichletRegModel, can \"mean\" \"precision\".","code":""},{"path":"https://easystats.github.io/insight/reference/link_function.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get link-function from model object — link_function","text":"function, describing link-function model-object. multivariate-response models, list functions returned.","code":""},{"path":"https://easystats.github.io/insight/reference/link_function.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get link-function from model object — link_function","text":"","code":"# example from ?stats::glm counts <- c(18, 17, 15, 20, 10, 20, 25, 13, 12) outcome <- gl(3, 1, 9) treatment <- gl(3, 3) m <- glm(counts ~ outcome + treatment, family = poisson()) link_function(m)(0.3) #> [1] -1.203973 # same as log(0.3) #> [1] -1.203973"},{"path":"https://easystats.github.io/insight/reference/link_inverse.html","id":null,"dir":"Reference","previous_headings":"","what":"Get link-inverse function from model object — link_inverse","title":"Get link-inverse function from model object — link_inverse","text":"Returns link-inverse function model object.","code":""},{"path":"https://easystats.github.io/insight/reference/link_inverse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get link-inverse function from model object — link_inverse","text":"","code":"link_inverse(x, ...) # S3 method for class 'betareg' link_inverse(x, what = c(\"mean\", \"precision\"), ...) # S3 method for class 'DirichletRegModel' link_inverse(x, what = c(\"mean\", \"precision\"), ...) # S3 method for class 'betamfx' link_inverse(x, what = c(\"mean\", \"precision\"), ...) # S3 method for class 'gamlss' link_inverse(x, what = c(\"mu\", \"sigma\", \"nu\", \"tau\"), ...)"},{"path":"https://easystats.github.io/insight/reference/link_inverse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get link-inverse function from model object — link_inverse","text":"x fitted model. ... Currently used. gamlss models, indicates distribution parameter link (inverse) function returned; betareg DirichletRegModel, can \"mean\" \"precision\".","code":""},{"path":"https://easystats.github.io/insight/reference/link_inverse.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get link-inverse function from model object — link_inverse","text":"function, describing inverse-link function model-object. multivariate-response models, list functions returned.","code":""},{"path":"https://easystats.github.io/insight/reference/link_inverse.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get link-inverse function from model object — link_inverse","text":"","code":"# example from ?stats::glm counts <- c(18, 17, 15, 20, 10, 20, 25, 13, 12) outcome <- gl(3, 1, 9) treatment <- gl(3, 3) m <- glm(counts ~ outcome + treatment, family = poisson()) link_inverse(m)(0.3) #> [1] 1.349859 # same as exp(0.3) #> [1] 1.349859"},{"path":"https://easystats.github.io/insight/reference/model_info.html","id":null,"dir":"Reference","previous_headings":"","what":"Access information from model objects — model_info","title":"Access information from model objects — model_info","text":"Retrieve information model objects.","code":""},{"path":"https://easystats.github.io/insight/reference/model_info.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Access information from model objects — model_info","text":"","code":"model_info(x, ...) # Default S3 method model_info(x, verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/model_info.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Access information from model objects — model_info","text":"x fitted model. ... Currently used. verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/model_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Access information from model objects — model_info","text":"list information model, like family, link-function etc. (see 'Details').","code":""},{"path":"https://easystats.github.io/insight/reference/model_info.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Access information from model objects — model_info","text":"model_info() returns list information model many different model objects. Following information returned, values starting is_ logicals. is_binomial: family binomial (negative binomial) is_bernoulli: special case binomial models: family Bernoulli is_poisson: family poisson is_negbin: family negative binomial is_count: model count model (.e. family either poisson negative binomial) is_beta: family beta is_betabinomial: family beta-binomial is_orderedbeta: family ordered beta is_dirichlet: family dirichlet is_exponential: family exponential (e.g. Gamma Weibull) is_logit: model logit link is_probit: model probit link is_linear: family gaussian is_tweedie: family tweedie is_ordinal: family ordinal cumulative link is_cumulative: family ordinal cumulative link is_multinomial: family multinomial categorical link is_categorical: family categorical link is_censored: model censored model (censored response, including survival models) is_truncated: model truncated model (truncated response) is_survival: model survival model is_zero_inflated: model zero-inflation component is_hurdle: model zero-inflation component hurdle-model (truncated family distribution) is_dispersion: model dispersion component (dispersion parameter) is_mixed: model mixed effects model (random effects) is_multivariate: model multivariate response model (currently works brmsfit vglm/vgam objects) is_trial: model response contains additional information trials is_bayesian: model Bayesian model is_gam: model generalized additive model is_anova: model Anova object is_ttest: model object class htest, returned t.test() is_correlation: model object class htest, returned cor.test() is_ranktest: model object class htest, returned cor.test() (Spearman's rank correlation), wilcox.text() kruskal.test(). is_variancetest: model object class htest, returned bartlett.test(), shapiro.test() car::leveneTest(). is_levenetest: model object class anova, returned car::leveneTest(). is_onewaytest: model object class htest, returned oneway.test() is_proptest: model object class htest, returned prop.test() is_binomtest: model object class htest, returned binom.test() is_chi2test: model object class htest, returned chisq.test() is_xtab: model object class htest BFBayesFactor, test-statistic stems contingency table (.e. chisq.test() BayesFactor::contingencyTableBF()). link_function: link-function family: name distributional family model. exceptions (like htest objects), can also name test. n_obs: number observations n_grouplevels: mixed models, returns names numbers random effect groups","code":""},{"path":"https://easystats.github.io/insight/reference/model_info.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Access information from model objects — model_info","text":"","code":"ldose <- rep(0:5, 2) numdead <- c(1, 4, 9, 13, 18, 20, 0, 2, 6, 10, 12, 16) sex <- factor(rep(c(\"M\", \"F\"), c(6, 6))) SF <- cbind(numdead, numalive = 20 - numdead) dat <- data.frame(ldose, sex, SF, stringsAsFactors = FALSE) m <- glm(SF ~ sex * ldose, family = binomial) # logistic regression model_info(m) #> $is_binomial #> [1] TRUE #> #> $is_bernoulli #> [1] FALSE #> #> $is_count #> [1] FALSE #> #> $is_poisson #> [1] FALSE #> #> $is_negbin #> [1] FALSE #> #> $is_beta #> [1] FALSE #> #> $is_betabinomial #> [1] FALSE #> #> $is_orderedbeta #> [1] FALSE #> #> $is_dirichlet #> [1] FALSE #> #> $is_exponential #> [1] FALSE #> #> $is_logit #> [1] TRUE #> #> $is_probit #> [1] FALSE #> #> $is_censored #> [1] FALSE #> #> $is_truncated #> [1] FALSE #> #> $is_survival #> [1] FALSE #> #> $is_linear #> [1] FALSE #> #> $is_tweedie #> [1] FALSE #> #> $is_zeroinf #> [1] FALSE #> #> $is_zero_inflated #> [1] FALSE #> #> $is_dispersion #> [1] FALSE #> #> $is_hurdle #> [1] FALSE #> #> $is_ordinal #> [1] FALSE #> #> $is_cumulative #> [1] FALSE #> #> $is_multinomial #> [1] FALSE #> #> $is_categorical #> [1] FALSE #> #> $is_mixed #> [1] FALSE #> #> $is_multivariate #> [1] FALSE #> #> $is_trial #> [1] FALSE #> #> $is_bayesian #> [1] FALSE #> #> $is_gam #> [1] FALSE #> #> $is_anova #> [1] FALSE #> #> $is_timeseries #> [1] FALSE #> #> $is_ttest #> [1] FALSE #> #> $is_correlation #> [1] FALSE #> #> $is_onewaytest #> [1] FALSE #> #> $is_chi2test #> [1] FALSE #> #> $is_ranktest #> [1] FALSE #> #> $is_levenetest #> [1] FALSE #> #> $is_variancetest #> [1] FALSE #> #> $is_xtab #> [1] FALSE #> #> $is_proptest #> [1] FALSE #> #> $is_binomtest #> [1] FALSE #> #> $is_ftest #> [1] FALSE #> #> $is_meta #> [1] FALSE #> #> $link_function #> [1] \"logit\" #> #> $family #> [1] \"binomial\" #> #> $n_obs #> [1] 12 #> #> $n_grouplevels #> NULL #> # t-test m <- t.test(1:10, y = c(7:20)) model_info(m) #> $is_binomial #> [1] FALSE #> #> $is_bernoulli #> [1] FALSE #> #> $is_count #> [1] FALSE #> #> $is_poisson #> [1] FALSE #> #> $is_negbin #> [1] FALSE #> #> $is_beta #> [1] FALSE #> #> $is_betabinomial #> [1] FALSE #> #> $is_orderedbeta #> [1] FALSE #> #> $is_dirichlet #> [1] FALSE #> #> $is_exponential #> [1] FALSE #> #> $is_logit #> [1] FALSE #> #> $is_probit #> [1] FALSE #> #> $is_censored #> [1] FALSE #> #> $is_truncated #> [1] FALSE #> #> $is_survival #> [1] FALSE #> #> $is_linear #> [1] TRUE #> #> $is_tweedie #> [1] FALSE #> #> $is_zeroinf #> [1] FALSE #> #> $is_zero_inflated #> [1] FALSE #> #> $is_dispersion #> [1] FALSE #> #> $is_hurdle #> [1] FALSE #> #> $is_ordinal #> [1] FALSE #> #> $is_cumulative #> [1] FALSE #> #> $is_multinomial #> [1] FALSE #> #> $is_categorical #> [1] FALSE #> #> $is_mixed #> [1] FALSE #> #> $is_multivariate #> [1] FALSE #> #> $is_trial #> [1] FALSE #> #> $is_bayesian #> [1] FALSE #> #> $is_gam #> [1] FALSE #> #> $is_anova #> [1] FALSE #> #> $is_timeseries #> [1] FALSE #> #> $is_ttest #> [1] TRUE #> #> $is_correlation #> [1] FALSE #> #> $is_onewaytest #> [1] FALSE #> #> $is_chi2test #> [1] FALSE #> #> $is_ranktest #> [1] FALSE #> #> $is_levenetest #> [1] FALSE #> #> $is_variancetest #> [1] FALSE #> #> $is_xtab #> [1] FALSE #> #> $is_proptest #> [1] FALSE #> #> $is_binomtest #> [1] FALSE #> #> $is_ftest #> [1] FALSE #> #> $is_meta #> [1] FALSE #> #> $link_function #> [1] \"identity\" #> #> $family #> [1] \"gaussian\" #> #> $n_obs #> NULL #> #> $n_grouplevels #> NULL #>"},{"path":"https://easystats.github.io/insight/reference/model_name.html","id":null,"dir":"Reference","previous_headings":"","what":"Name the model — model_name","title":"Name the model — model_name","text":"Returns \"name\" (class attribute) model, possibly including information.","code":""},{"path":"https://easystats.github.io/insight/reference/model_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Name the model — model_name","text":"","code":"model_name(x, ...) # Default S3 method model_name(x, include_formula = FALSE, include_call = FALSE, ...)"},{"path":"https://easystats.github.io/insight/reference/model_name.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Name the model — model_name","text":"x model. ... Currently used. include_formula name include model's formula. include_call TRUE, return function call name.","code":""},{"path":"https://easystats.github.io/insight/reference/model_name.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Name the model — model_name","text":"character string name (usually equals model's class attribute).","code":""},{"path":"https://easystats.github.io/insight/reference/model_name.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Name the model — model_name","text":"","code":"m <- lm(Sepal.Length ~ Petal.Width, data = iris) model_name(m) #> [1] \"lm\" model_name(m, include_formula = TRUE) #> [1] \"lm(Sepal.Length ~ Petal.Width)\" model_name(m, include_call = TRUE) #> [1] \"lm(formula = Sepal.Length ~ Petal.Width, data = iris)\" model_name(lme4::lmer(Sepal.Length ~ Sepal.Width + (1 | Species), data = iris)) #> [1] \"lmerMod\""},{"path":"https://easystats.github.io/insight/reference/n_grouplevels.html","id":null,"dir":"Reference","previous_headings":"","what":"Count number of random effect levels in a mixed model — n_grouplevels","title":"Count number of random effect levels in a mixed model — n_grouplevels","text":"Returns number group levels random effects mixed models.","code":""},{"path":"https://easystats.github.io/insight/reference/n_grouplevels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count number of random effect levels in a mixed model — n_grouplevels","text":"","code":"n_grouplevels(x, ...)"},{"path":"https://easystats.github.io/insight/reference/n_grouplevels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count number of random effect levels in a mixed model — n_grouplevels","text":"x mixed model. ... Additional arguments can passed function. Currently, can use data provide model data, available, avoid retrieving model data multiple times.","code":""},{"path":"https://easystats.github.io/insight/reference/n_grouplevels.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Count number of random effect levels in a mixed model — n_grouplevels","text":"number group levels model.","code":""},{"path":"https://easystats.github.io/insight/reference/n_grouplevels.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Count number of random effect levels in a mixed model — n_grouplevels","text":"","code":"data(sleepstudy, package = \"lme4\") set.seed(12345) sleepstudy$grp <- sample(1:5, size = 180, replace = TRUE) sleepstudy$subgrp <- NA for (i in 1:5) { filter_group <- sleepstudy$grp == i sleepstudy$subgrp[filter_group] <- sample(1:30, size = sum(filter_group), replace = TRUE) } model <- lme4::lmer( Reaction ~ Days + (1 | grp / subgrp) + (1 | Subject), data = sleepstudy ) n_grouplevels(model) #> Group | N_levels #> --------------------- #> subgrp | 30 #> grp | 5 #> Subject | 18 #> subgrp:grp | 108"},{"path":"https://easystats.github.io/insight/reference/n_obs.html","id":null,"dir":"Reference","previous_headings":"","what":"Get number of observations from a model — n_obs","title":"Get number of observations from a model — n_obs","text":"method returns number observation used fit model, numeric value.","code":""},{"path":"https://easystats.github.io/insight/reference/n_obs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get number of observations from a model — n_obs","text":"","code":"n_obs(x, ...) # S3 method for class 'glm' n_obs(x, disaggregate = FALSE, ...) # S3 method for class 'svyolr' n_obs(x, weighted = FALSE, ...) # S3 method for class 'afex_aov' n_obs(x, shape = c(\"long\", \"wide\"), ...) # S3 method for class 'stanmvreg' n_obs(x, select = NULL, ...)"},{"path":"https://easystats.github.io/insight/reference/n_obs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get number of observations from a model — n_obs","text":"x fitted model. ... Currently used. disaggregate binomial models aggregated data, n_obs() returns number data rows default. disaggregate = TRUE, total number trials returned instead (determined summing results weights() aggregated data, either weights input proportion success response row sums response matrix matrix response, see 'Examples'). weighted survey designs, returns weighted sample size. shape Return long wide data? applicable repeated measures designs. select Optional name(s) response variables extract values. Can used case regression models multiple response variables.","code":""},{"path":"https://easystats.github.io/insight/reference/n_obs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get number of observations from a model — n_obs","text":"number observations used fit model, NULL information available.","code":""},{"path":"https://easystats.github.io/insight/reference/n_obs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get number of observations from a model — n_obs","text":"","code":"data(mtcars) m <- lm(mpg ~ wt + cyl + vs, data = mtcars) n_obs(m) #> [1] 32 data(cbpp, package = \"lme4\") m <- glm( cbind(incidence, size - incidence) ~ period, data = cbpp, family = binomial(link = \"logit\") ) n_obs(m) #> [1] 56 n_obs(m, disaggregate = TRUE) #> [1] 842"},{"path":"https://easystats.github.io/insight/reference/n_parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Count number of parameters in a model — n_parameters","title":"Count number of parameters in a model — n_parameters","text":"Returns number parameters (coefficients) model.","code":""},{"path":"https://easystats.github.io/insight/reference/n_parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count number of parameters in a model — n_parameters","text":"","code":"n_parameters(x, ...) # Default S3 method n_parameters(x, remove_nonestimable = FALSE, ...) # S3 method for class 'merMod' n_parameters( x, effects = c(\"fixed\", \"random\"), remove_nonestimable = FALSE, ... ) # S3 method for class 'glmmTMB' n_parameters( x, effects = c(\"fixed\", \"random\"), component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\"), remove_nonestimable = FALSE, ... ) # S3 method for class 'zeroinfl' n_parameters( x, component = c(\"all\", \"conditional\", \"zi\", \"zero_inflated\"), remove_nonestimable = FALSE, ... ) # S3 method for class 'gam' n_parameters( x, component = c(\"all\", \"conditional\", \"smooth_terms\"), remove_nonestimable = FALSE, ... ) # S3 method for class 'brmsfit' n_parameters(x, effects = \"all\", component = \"all\", ...)"},{"path":"https://easystats.github.io/insight/reference/n_parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count number of parameters in a model — n_parameters","text":"x statistical model. ... Arguments passed methods. remove_nonestimable Logical, TRUE, removes (.e. count) non-estimable parameters (may occur models rank-deficient model matrix). effects number parameters fixed effects, random effects returned? applies mixed models. May abbreviated. component total number parameters, number parameters conditional model, zero-inflated part model, dispersion term instrumental variables returned? Applies models zero-inflated /dispersion formula, models instrumental variable (called fixed-effects regressions). May abbreviated.","code":""},{"path":"https://easystats.github.io/insight/reference/n_parameters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Count number of parameters in a model — n_parameters","text":"number parameters model.","code":""},{"path":"https://easystats.github.io/insight/reference/n_parameters.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Count number of parameters in a model — n_parameters","text":"function returns number parameters fixed effects default, returned find_parameters(x, effects = \"fixed\"). include estimated model parameters, .e. auxiliary parameters like sigma dispersion counted. get number estimated parameters, use get_df(x, type = \"model\").","code":""},{"path":"https://easystats.github.io/insight/reference/n_parameters.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Count number of parameters in a model — n_parameters","text":"","code":"data(iris) model <- lm(Sepal.Length ~ Sepal.Width * Species, data = iris) n_parameters(model) #> [1] 6"},{"path":"https://easystats.github.io/insight/reference/null_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute intercept-only model for regression models — null_model","title":"Compute intercept-only model for regression models — null_model","text":"function computes null-model (.e. (y ~ 1)) model. mixed models, null-model takes random effects account.","code":""},{"path":"https://easystats.github.io/insight/reference/null_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute intercept-only model for regression models — null_model","text":"","code":"null_model(model, verbose = TRUE, ...)"},{"path":"https://easystats.github.io/insight/reference/null_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute intercept-only model for regression models — null_model","text":"model (mixed effects) model. verbose Toggle warnings. ... Arguments passed methods.","code":""},{"path":"https://easystats.github.io/insight/reference/null_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute intercept-only model for regression models — null_model","text":"null-model x","code":""},{"path":"https://easystats.github.io/insight/reference/null_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute intercept-only model for regression models — null_model","text":"","code":"data(sleepstudy) m <- lmer(Reaction ~ Days + (1 + Days | Subject), data = sleepstudy) summary(m) #> Linear mixed model fit by REML ['lmerMod'] #> Formula: Reaction ~ Days + (1 + Days | Subject) #> Data: sleepstudy #> #> REML criterion at convergence: 1743.6 #> #> Scaled residuals: #> Min 1Q Median 3Q Max #> -3.9536 -0.4634 0.0231 0.4634 5.1793 #> #> Random effects: #> Groups Name Variance Std.Dev. Corr #> Subject (Intercept) 612.10 24.741 #> Days 35.07 5.922 0.07 #> Residual 654.94 25.592 #> Number of obs: 180, groups: Subject, 18 #> #> Fixed effects: #> Estimate Std. Error t value #> (Intercept) 251.405 6.825 36.838 #> Days 10.467 1.546 6.771 #> #> Correlation of Fixed Effects: #> (Intr) #> Days -0.138 summary(null_model(m)) #> Linear mixed model fit by REML ['lmerMod'] #> Formula: Reaction ~ (1 + Days | Subject) #> Data: sleepstudy #> #> REML criterion at convergence: 1769.8 #> #> Scaled residuals: #> Min 1Q Median 3Q Max #> -4.0449 -0.4486 0.0089 0.4819 5.2186 #> #> Random effects: #> Groups Name Variance Std.Dev. Corr #> Subject (Intercept) 651.6 25.53 #> Days 142.2 11.93 -0.18 #> Residual 654.9 25.59 #> Number of obs: 180, groups: Subject, 18 #> #> Fixed effects: #> Estimate Std. Error t value #> (Intercept) 257.76 6.76 38.13"},{"path":"https://easystats.github.io/insight/reference/object_has_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Check names and rownames — object_has_names","title":"Check names and rownames — object_has_names","text":"object_has_names() checks specified names present given object. object_has_rownames() checks rownames present dataframe.","code":""},{"path":"https://easystats.github.io/insight/reference/object_has_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check names and rownames — object_has_names","text":"","code":"object_has_names(x, names) object_has_rownames(x)"},{"path":"https://easystats.github.io/insight/reference/object_has_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check names and rownames — object_has_names","text":"x named object (atomic vector, list, dataframe, etc.). names single character vector characters.","code":""},{"path":"https://easystats.github.io/insight/reference/object_has_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check names and rownames — object_has_names","text":"logical vector logicals.","code":""},{"path":"https://easystats.github.io/insight/reference/object_has_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check names and rownames — object_has_names","text":"","code":"# check if specified names are present in the given object object_has_names(mtcars, \"am\") #> [1] TRUE object_has_names(anscombe, c(\"x1\", \"z1\", \"y1\")) #> [1] TRUE FALSE TRUE object_has_names(list(\"x\" = 1, \"y\" = 2), c(\"x\", \"a\")) #> [1] TRUE FALSE # check if a dataframe has rownames object_has_rownames(mtcars) #> [1] TRUE"},{"path":"https://easystats.github.io/insight/reference/print_color.html","id":null,"dir":"Reference","previous_headings":"","what":"Coloured console output — print_color","title":"Coloured console output — print_color","text":"Convenient function allows coloured output console. Mainly implemented reduce package dependencies.","code":""},{"path":"https://easystats.github.io/insight/reference/print_color.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coloured console output — print_color","text":"","code":"print_color(text, color) print_colour(text, colour) color_text(text, color) colour_text(text, colour) color_theme()"},{"path":"https://easystats.github.io/insight/reference/print_color.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coloured console output — print_color","text":"text text print. color, colour Character vector, indicating colour printing. May one \"white\", \"black\", \"red\", \"yellow\", \"green\", \"blue\", \"violet\", \"cyan\" \"grey\". Bright variants colors available adding prefix \"b\" (\"br_\" \"bright_\"), e.g. \"bred\" (\"br_red\" resp. \"bright_red\"). Background colors can set adding prefix \"bg_\" (e.g. \"bg_red\"). Formatting also possible \"bold\" \"italic\".","code":""},{"path":"https://easystats.github.io/insight/reference/print_color.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Coloured console output — print_color","text":"Nothing.","code":""},{"path":"https://easystats.github.io/insight/reference/print_color.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Coloured console output — print_color","text":"function prints text directly console using cat(), string returned. color_text(), however, returns formatted string, without using cat(). color_theme() either returns \"dark\" RStudio used dark color scheme, \"light\" used light theme, NULL theme detected.","code":""},{"path":"https://easystats.github.io/insight/reference/print_color.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Coloured console output — print_color","text":"","code":"print_color(\"I'm blue dabedi dabedei\", \"blue\") #> I'm blue dabedi dabedei"},{"path":"https://easystats.github.io/insight/reference/print_parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Prepare summary statistics of model parameters for printing — print_parameters","title":"Prepare summary statistics of model parameters for printing — print_parameters","text":"function takes data frame, typically data frame information summaries model parameters like bayestestR::describe_posterior(), bayestestR::hdi() parameters::model_parameters(), input splits information several parts, depending model. See details .","code":""},{"path":"https://easystats.github.io/insight/reference/print_parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prepare summary statistics of model parameters for printing — print_parameters","text":"","code":"print_parameters( x, ..., split_by = c(\"Effects\", \"Component\", \"Group\", \"Response\"), format = \"text\", parameter_column = \"Parameter\", keep_parameter_column = TRUE, remove_empty_column = FALSE, titles = NULL, subtitles = NULL )"},{"path":"https://easystats.github.io/insight/reference/print_parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prepare summary statistics of model parameters for printing — print_parameters","text":"x fitted model, data frame returned clean_parameters(). ... One objects (data frames), contain information model parameters related statistics (like confidence intervals, HDI, ROPE, ...). split_by split_by character vector one following elements: \"Effects\", \"Component\", \"Response\" \"Group\". column names returned clean_parameters(), used extract information group component model parameters belong. NULL, merged data frame returned. Else, data frame split list, split values columns defined split_by. format Name output-format, string. NULL (\"text\"), assumed use output basic printing. \"markdown\", markdown-format assumed. affects style title- table-caption attributes, used export_table(). parameter_column String, name column contains parameter names. Usually, data frames returned functions easystats-packages, \"Parameter\". keep_parameter_column Logical, TRUE, data frames returned list \"Cleaned_Parameter\" \"Parameter\" column. FALSE, (unformatted) \"Parameter\" removed, column cleaned parameter names (\"Cleaned_Parameter\") renamed \"Parameter\". remove_empty_column Logical, TRUE, columns completely empty character values removed. titles, subtitles default, names model components (like fixed random effects, count zero-inflated model part) added attributes \"table_title\" \"table_subtitle\" list element returned print_parameters(). attributes extracted used table (sub) titles export_table(). Use titles subtitles override default attribute values \"table_title\" \"table_subtitle\". titles subtitles may length 1 length returned list elements. titles subtitles shorter existing elements, first default attributes overwritten.","code":""},{"path":"https://easystats.github.io/insight/reference/print_parameters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prepare summary statistics of model parameters for printing — print_parameters","text":"data frame list data frames (split_by NULL). list returned, element names reflect model components extracted information data frames belong , e.g. random.zero_inflated.Intercept: persons. data frame contains parameters random effects group-level \"persons\" zero-inflated model component.","code":""},{"path":"https://easystats.github.io/insight/reference/print_parameters.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Prepare summary statistics of model parameters for printing — print_parameters","text":"function prepares data frames contain information model parameters clear printing. First, x required, either model object prepared data frame returned clean_parameters(). x model, clean_parameters() called model object get information model components parameters associated. , ... take one data frames also contain information parameters model, also additional information provided methods. instance, data frame ... might result , instance, bayestestR::describe_posterior(), parameters::model_parameters(), ) Parameter column b) columns parameter values (like CI, HDI, test statistic, etc.). Now data frame model parameters information association different model components, data frame model parameters, summary statistics. print_parameters() merges data frames, parameters statistics interest also associated different model components. data frame split list, clear printing. Users can loop list print component better overview. , parameter names \"cleaned\", necessary, also cleaner print. See also 'Examples'.","code":""},{"path":"https://easystats.github.io/insight/reference/print_parameters.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Prepare summary statistics of model parameters for printing — print_parameters","text":"","code":"# \\donttest{ library(bayestestR) model <- download_model(\"brms_zi_2\") x <- hdi(model, effects = \"all\", component = \"all\") # hdi() returns a data frame; here we use only the # information on parameter names and HDI values tmp <- as.data.frame(x)[, 1:4] tmp #> Parameter CI CI_low CI_high #> 1 b_Intercept 0.95 -1.5750655217 -0.19121613 #> 4 b_persons 0.95 0.6184455532 1.06881424 #> 3 b_child 0.95 -1.3162422984 -0.95758109 #> 2 b_camper 0.95 0.5461831894 0.92611577 #> 8 r_persons[1,Intercept] 0.95 -0.5330733515 0.35294394 #> 9 r_persons[2,Intercept] 0.95 -0.2223371232 0.38996718 #> 10 r_persons[3,Intercept] 0.95 -0.3042515304 0.23075738 #> 11 r_persons[4,Intercept] 0.95 -0.3385211340 0.42306128 #> 16 sd_persons__Intercept 0.95 0.0001646025 0.53508587 #> 5 b_zi_Intercept 0.95 -2.1380522885 0.81535164 #> 7 b_zi_child 0.95 1.2372839351 2.55611481 #> 6 b_zi_camper 0.95 -1.5578690989 -0.13785783 #> 12 r_persons__zi[1,Intercept] 0.95 -0.2851875068 2.79744522 #> 13 r_persons__zi[2,Intercept] 0.95 -1.2294623420 1.76053356 #> 14 r_persons__zi[3,Intercept] 0.95 -1.6701942638 1.34558714 #> 15 r_persons__zi[4,Intercept] 0.95 -2.9688353496 0.08844285 #> 17 sd_persons__zi_Intercept 0.95 0.3711927016 3.06955610 # Based on the \"split_by\" argument, we get a list of data frames that # is split into several parts that reflect the model components. print_parameters(model, tmp) #> $fixed.conditional #> Cleaned_Parameter Parameter CI CI_low CI_high #> 1 (Intercept) b_Intercept 0.95 -1.5750655 -0.1912161 #> 2 persons b_persons 0.95 0.6184456 1.0688142 #> 3 child b_child 0.95 -1.3162423 -0.9575811 #> 4 camper b_camper 0.95 0.5461832 0.9261158 #> #> $fixed.zero_inflated #> Cleaned_Parameter Parameter CI CI_low CI_high #> 10 (Intercept) b_zi_Intercept 0.95 -2.138052 0.8153516 #> 11 child b_zi_child 0.95 1.237284 2.5561148 #> 12 camper b_zi_camper 0.95 -1.557869 -0.1378578 #> #> $`random.conditional.Intercept: persons` #> Cleaned_Parameter Parameter CI CI_low CI_high #> 5 persons.1 r_persons[1,Intercept] 0.95 -0.5330734 0.3529439 #> 6 persons.2 r_persons[2,Intercept] 0.95 -0.2223371 0.3899672 #> 7 persons.3 r_persons[3,Intercept] 0.95 -0.3042515 0.2307574 #> 8 persons.4 r_persons[4,Intercept] 0.95 -0.3385211 0.4230613 #> #> $`random.zero_inflated.Intercept: persons` #> Cleaned_Parameter Parameter CI CI_low CI_high #> 13 persons.1 r_persons__zi[1,Intercept] 0.95 -0.2851875 2.79744522 #> 14 persons.2 r_persons__zi[2,Intercept] 0.95 -1.2294623 1.76053356 #> 15 persons.3 r_persons__zi[3,Intercept] 0.95 -1.6701943 1.34558714 #> 16 persons.4 r_persons__zi[4,Intercept] 0.95 -2.9688353 0.08844285 #> #> $`random.conditional.SD/Cor: persons` #> Cleaned_Parameter Parameter CI CI_low CI_high #> 9 (Intercept) sd_persons__Intercept 0.95 0.0001646025 0.5350859 #> #> $`random.zero_inflated.SD/Cor: persons` #> Cleaned_Parameter Parameter CI CI_low CI_high #> 17 (Intercept) sd_persons__zi_Intercept 0.95 0.3711927 3.069556 #> # This is the standard print()-method for \"bayestestR::hdi\"-objects. # For printing methods, it is easy to print complex summary statistics # in a clean way to the console by splitting the information into # different model components. x #> Highest Density Interval #> #> Parameter | 95% HDI #> ---------------------------- #> (Intercept) | [-1.58, -0.19] #> persons | [ 0.62, 1.07] #> child | [-1.32, -0.96] #> camper | [ 0.55, 0.93] #> #> # Fixed effects (zero-inflated) #> #> Parameter | 95% HDI #> ---------------------------- #> (Intercept) | [-2.14, 0.82] #> child | [ 1.24, 2.56] #> camper | [-1.56, -0.14] #> #> # Random effects (conditional) Intercept: persons #> #> Parameter | 95% HDI #> -------------------------- #> persons.1 | [-0.53, 0.35] #> persons.2 | [-0.22, 0.39] #> persons.3 | [-0.30, 0.23] #> persons.4 | [-0.34, 0.42] #> #> # Random effects (zero-inflated) Intercept: persons #> #> Parameter | 95% HDI #> -------------------------- #> persons.1 | [-0.29, 2.80] #> persons.2 | [-1.23, 1.76] #> persons.3 | [-1.67, 1.35] #> persons.4 | [-2.97, 0.09] #> #> # Random effects (conditional) SD/Cor: persons #> #> Parameter | 95% HDI #> ---------------------------- #> (Intercept) | [ 0.00, 0.54] #> #> # Random effects (zero-inflated) SD/Cor: persons #> #> Parameter | 95% HDI #> ---------------------------- #> (Intercept) | [ 0.37, 3.07] # }"},{"path":"https://easystats.github.io/insight/reference/standardize_column_order.html","id":null,"dir":"Reference","previous_headings":"","what":"Standardize column order — standardize_column_order","title":"Standardize column order — standardize_column_order","text":"Standardizes order columns dataframes objects easystats broom ecosystem packages.","code":""},{"path":"https://easystats.github.io/insight/reference/standardize_column_order.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Standardize column order — standardize_column_order","text":"","code":"standardize_column_order(data, ...) # S3 method for class 'parameters_model' standardize_column_order(data, style = c(\"easystats\", \"broom\"), ...)"},{"path":"https://easystats.github.io/insight/reference/standardize_column_order.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Standardize column order — standardize_column_order","text":"data data frame. particular, objects easystats package functions like parameters::model_parameters() effectsize::effectsize() accepted, also data frames returned broom::tidy() valid objects. ... Currently used. style Standardization can either based naming conventions easystats-project, broom's naming scheme.","code":""},{"path":"https://easystats.github.io/insight/reference/standardize_column_order.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Standardize column order — standardize_column_order","text":"data frame, standardized column order.","code":""},{"path":"https://easystats.github.io/insight/reference/standardize_column_order.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Standardize column order — standardize_column_order","text":"","code":"# easystats conventions df1 <- cbind.data.frame( CI_low = -2.873, t = 5.494, CI_high = -1.088, p = 0.00001, Parameter = -1.980, CI = 0.95, df = 29.234, Method = \"Student's t-test\" ) standardize_column_order(df1, style = \"easystats\") #> Parameter CI CI_low CI_high Method t df p #> 1 -1.98 0.95 -2.873 -1.088 Student's t-test 5.494 29.234 1e-05 # broom conventions df2 <- cbind.data.frame( conf.low = -2.873, statistic = 5.494, conf.high = -1.088, p.value = 0.00001, estimate = -1.980, conf.level = 0.95, df = 29.234, method = \"Student's t-test\" ) standardize_column_order(df2, style = \"broom\") #> estimate conf.level conf.low conf.high method statistic df #> 1 -1.98 0.95 -2.873 -1.088 Student's t-test 5.494 29.234 #> p.value #> 1 1e-05"},{"path":"https://easystats.github.io/insight/reference/standardize_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Standardize column names — standardize_names","title":"Standardize column names — standardize_names","text":"Standardize column names data frames, particular objects returned parameters::model_parameters(), column names consistent model object.","code":""},{"path":"https://easystats.github.io/insight/reference/standardize_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Standardize column names — standardize_names","text":"","code":"standardize_names(data, ...) # S3 method for class 'parameters_model' standardize_names( data, style = c(\"easystats\", \"broom\"), ignore_estimate = FALSE, ... )"},{"path":"https://easystats.github.io/insight/reference/standardize_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Standardize column names — standardize_names","text":"data data frame. particular, objects easystats package functions like parameters::model_parameters() effectsize::effectsize() accepted, also data frames returned broom::tidy() valid objects. ... Currently used. style Standardization can either based naming conventions easystats-project, broom's naming scheme. ignore_estimate Logical, TRUE, column names like \"mean\" \"median\" converted \"Coefficient\" resp. \"estimate\".","code":""},{"path":"https://easystats.github.io/insight/reference/standardize_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Standardize column names — standardize_names","text":"data frame, standardized column names.","code":""},{"path":"https://easystats.github.io/insight/reference/standardize_names.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Standardize column names — standardize_names","text":"method particular useful package developers users use, e.g., parameters::model_parameters() code functions retrieve model parameters processing. model_parameters() returns data frame varying column names (depending input), accessing required information probably quite straightforward. cases, standardize_names() can used get consistent, .e. always column names, matter kind model used model_parameters(). style = \"broom\", column names renamed match broom's naming scheme, .e. Parameter renamed term, Coefficient becomes estimate . style = \"easystats\", data object broom::tidy(), column names converted \"broom\"-style \"easystats\"-style.","code":""},{"path":"https://easystats.github.io/insight/reference/standardize_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Standardize column names — standardize_names","text":"","code":"model <- lm(mpg ~ wt + cyl, data = mtcars) mp <- model_parameters(model) as.data.frame(mp) #> Parameter Coefficient SE CI CI_low CI_high t #> 1 (Intercept) 39.686261 1.7149840 0.95 36.178725 43.1937976 23.140893 #> 2 wt -3.190972 0.7569065 0.95 -4.739020 -1.6429245 -4.215808 #> 3 cyl -1.507795 0.4146883 0.95 -2.355928 -0.6596622 -3.635972 #> df_error p #> 1 29 3.043182e-20 #> 2 29 2.220200e-04 #> 3 29 1.064282e-03 standardize_names(mp) #> Parameter Coefficient SE CI CI_low CI_high Statistic df #> 1 (Intercept) 39.686261 1.7149840 0.95 36.178725 43.1937976 23.140893 29 #> 2 wt -3.190972 0.7569065 0.95 -4.739020 -1.6429245 -4.215808 29 #> 3 cyl -1.507795 0.4146883 0.95 -2.355928 -0.6596622 -3.635972 29 #> p #> 1 3.043182e-20 #> 2 2.220200e-04 #> 3 1.064282e-03 standardize_names(mp, style = \"broom\") #> term estimate std.error conf.level conf.low conf.high statistic #> 1 (Intercept) 39.686261 1.7149840 0.95 36.178725 43.1937976 23.140893 #> 2 wt -3.190972 0.7569065 0.95 -4.739020 -1.6429245 -4.215808 #> 3 cyl -1.507795 0.4146883 0.95 -2.355928 -0.6596622 -3.635972 #> df.error p.value #> 1 29 3.043182e-20 #> 2 29 2.220200e-04 #> 3 29 1.064282e-03"},{"path":"https://easystats.github.io/insight/reference/text_remove_backticks.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove backticks from a string — text_remove_backticks","title":"Remove backticks from a string — text_remove_backticks","text":"function removes backticks string.","code":""},{"path":"https://easystats.github.io/insight/reference/text_remove_backticks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove backticks from a string — text_remove_backticks","text":"","code":"text_remove_backticks(x, ...) # S3 method for class 'data.frame' text_remove_backticks(x, column = \"Parameter\", verbose = FALSE, ...)"},{"path":"https://easystats.github.io/insight/reference/text_remove_backticks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove backticks from a string — text_remove_backticks","text":"x character vector, data frame matrix. matrix, backticks removed column row names, values character vector. ... Currently used. column x data frame, specify column character vectors, backticks removed. NULL, character vectors processed. verbose Toggle warnings.","code":""},{"path":"https://easystats.github.io/insight/reference/text_remove_backticks.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Remove backticks from a string — text_remove_backticks","text":"x, backticks removed.","code":""},{"path":"https://easystats.github.io/insight/reference/text_remove_backticks.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Remove backticks from a string — text_remove_backticks","text":"x character vector data frame, backticks removed elements character vector (character vectors data frame.) x matrix, behaviour slightly differs: case, backticks removed column row names. reason behaviour function mainly serves formatting coefficient names. vcov() (matrix), row column names equal coefficient names therefore manipulated .","code":""},{"path":"https://easystats.github.io/insight/reference/text_remove_backticks.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove backticks from a string — text_remove_backticks","text":"","code":"# example model data(iris) iris$`a m` <- iris$Species iris$`Sepal Width` <- iris$Sepal.Width model <- lm(`Sepal Width` ~ Petal.Length + `a m`, data = iris) # remove backticks from string names(coef(model)) #> [1] \"(Intercept)\" \"Petal.Length\" \"`a m`versicolor\" \"`a m`virginica\" text_remove_backticks(names(coef(model))) #> [1] \"(Intercept)\" \"Petal.Length\" \"a mversicolor\" \"a mvirginica\" # remove backticks from character variable in a data frame # column defaults to \"Parameter\". d <- data.frame( Parameter = names(coef(model)), Estimate = unname(coef(model)) ) d #> Parameter Estimate #> 1 (Intercept) 2.991869 #> 2 Petal.Length 0.298311 #> 3 `a m`versicolor -1.492674 #> 4 `a m`virginica -1.674092 text_remove_backticks(d) #> Parameter Estimate #> 1 (Intercept) 2.991869 #> 2 Petal.Length 0.298311 #> 3 a mversicolor -1.492674 #> 4 a mvirginica -1.674092"},{"path":"https://easystats.github.io/insight/reference/trim_ws.html","id":null,"dir":"Reference","previous_headings":"","what":"Small helper functions — trim_ws","title":"Small helper functions — trim_ws","text":"Collection small helper functions. trim_ws() efficient function trim leading trailing whitespaces character vectors strings. n_unique() returns number unique values vector. has_single_value() equivalent n_unique() == 1 faster. safe_deparse() comparable deparse1(), .e. can safely deparse long expressions single string. safe_deparse_symbol() deparses substituted expressions possible, can much faster deparse(substitute()) cases substitute() returns valid object name.","code":""},{"path":"https://easystats.github.io/insight/reference/trim_ws.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Small helper functions — trim_ws","text":"","code":"trim_ws(x, ...) # S3 method for class 'data.frame' trim_ws(x, character_only = TRUE, ...) n_unique(x, ...) # Default S3 method n_unique(x, na.rm = TRUE, ...) safe_deparse(x, ...) safe_deparse_symbol(x) has_single_value(x, na.rm = FALSE)"},{"path":"https://easystats.github.io/insight/reference/trim_ws.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Small helper functions — trim_ws","text":"x (character) vector, functions may also data frame. ... Currently used. character_only Logical, TRUE x data frame list, processes character vectors. na.rm Logical, missing values removed input.","code":""},{"path":"https://easystats.github.io/insight/reference/trim_ws.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Small helper functions — trim_ws","text":"n_unique(): vector, n_unique always returns integer value, even input NULL (return value 0 ). data frames lists, n_unique() returns named numeric vector, number unique values element. has_single_value(): TRUE x one unique value, FALSE otherwise. trim_ws(): character vector, trailing leading white spaces removed. safe_deparse(): character string unevaluated expression symbol. safe_deparse_symbol(): character string unevaluated expression symbol, x symbol. x symbol (.e. .name(x) return FALSE), NULL returned.","code":""},{"path":"https://easystats.github.io/insight/reference/trim_ws.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Small helper functions — trim_ws","text":"","code":"trim_ws(\" no space! \") #> [1] \"no space!\" n_unique(iris$Species) #> [1] 3 has_single_value(c(1, 1, 2)) #> [1] FALSE # safe_deparse_symbol() compared to deparse(substitute()) safe_deparse_symbol(as.name(\"test\")) #> [1] \"test\" deparse(substitute(as.name(\"test\"))) #> [1] \"as.name(\\\"test\\\")\""},{"path":[]},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-19-11","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.19.11","text":"informative error message get_varcov() requested vcov-function failed.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-11","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.11","text":"Fixed issue get_data() coxme models sourcewas set \"modelframe\".","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-01910","dir":"Changelog","previous_headings":"","what":"insight 0.19.10","title":"insight 0.19.10","text":"CRAN release: 2024-03-22","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-10","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.10","text":"Functions like find_variables() clean_names() now support multi-membership formulas models brms. Updated tests work latest changes glmmTMB 1.1.9.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0199","dir":"Changelog","previous_headings":"","what":"insight 0.19.9","title":"insight 0.19.9","text":"CRAN release: 2024-03-15","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-models-0-19-9","dir":"Changelog","previous_headings":"","what":"New supported models","title":"insight 0.19.9","text":"Support models class serp (package serp).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-19-9","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.19.9","text":"standardize_names() now also recognizes column s.value objects package marginaleffects.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-9","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.9","text":"Fixed issue find_predictors() models splines (s()), number dimensions indicated variable, number. format_ci() now works factors character vectors . Fixed issues latest release tinytable. Fixed issues latest release PROreg.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0198","dir":"Changelog","previous_headings":"","what":"insight 0.19.8","title":"insight 0.19.8","text":"CRAN release: 2024-01-31","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-19-8","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.19.8","text":"Removed deprecated arguments get_data.mmrm(). Improved support models class rqs (package quantreg). Revised test address forthcoming changes pscl package.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-8","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.8","text":"Fixed issue get_loglikelihood() glm-models binary outcome, levels defined reversed order. Fixed issue find_formula() models class glmmPQL (package MASS). Fixed issue find_formula() models class gam (package mgcv) \"gaulss\" family. Fixed issue get_variance() glmmTMB models family = \"ordbeta\". Fixed issue model_info() correctly detecting multivariate vgam/vglm models.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0197","dir":"Changelog","previous_headings":"","what":"insight 0.19.7","title":"insight 0.19.7","text":"CRAN release: 2023-11-26","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-19-7","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.19.7","text":"Support objects class ggcomparisons ggeffects::hypothesis_test(). brms::gr() now supported, meaning functions like get_data() find_predictors() now also work models group-specific random effects. Fix CRAN check issues due last fixest update.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-19-7","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.19.7","text":"get_varcov() models class pgmm (package plm) now also supported robust variance-covariance matrices (.e. argument vcov).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-7","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.7","text":"Fixed issue find_predictors() survival models strata(), containing one variable. Fixed issue model_info(), cases logistic regression models erroneously considered \"bernoulli\" models. Fixed issue find_formula() models class gamlss random() function used namespace formula (.e. ... + gamlss::random()). model_info() now detects models zero-inflation part package glmmTMB models truncated-families ziformula.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0196","dir":"Changelog","previous_headings":"","what":"insight 0.19.6","title":"insight 0.19.6","text":"CRAN release: 2023-10-12","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-19-6","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.19.6","text":"Improved documentation get_predicted_ci().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-19-6","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.19.6","text":"model_info() now recognized ordered beta families. find_formula get_response nestedLogit models gain dichotomies argument, return values dichotomies used fit model.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-6","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.6","text":"find_transformation() better detects power-transformation response variable. Corrected return value find_statistic nnet::multinom() models. clean_parameters() return \"clean_parameters\" class attributes object. caused issued upstream packages. Fixed issue model_info(), correctly detect “Bernoulli” property models classes (like glmmTMB glmerMod).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0195","dir":"Changelog","previous_headings":"","what":"insight 0.19.5","title":"insight 0.19.5","text":"CRAN release: 2023-09-13","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-5","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.5","text":"Fixed critical issue check_if_installed() old R releases.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0194","dir":"Changelog","previous_headings":"","what":"insight 0.19.4","title":"insight 0.19.4","text":"CRAN release: 2023-09-10","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-19-4","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.19.4","text":"get_predicted() now accepts predict = \"link\" gaussian models log-link (.e. glm(..., family = gaussian(\"log\"))), return predictions link scale. check_if_installed() now automatically checks package DESCRIPTION file determine correct minimum version required.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-4","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.4","text":"Fixed issue invalid multibyte strings trim_ws(). Fixed issue find_statistic() models package fixest.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0193","dir":"Changelog","previous_headings":"","what":"insight 0.19.3","title":"insight 0.19.3","text":"CRAN release: 2023-06-29","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"breaking-changes-0-19-3","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"insight 0.19.3","text":"standardize_column_order() changed position re-ordering Bayes factors, ROPEs ESS / Rhat (mainly relevant Bayesian models).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-19-3","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.19.3","text":"standardize_names() standardize_column_order() now also recognize \"response.level\" column name. get_data() lavaan models now stable retrieving model data available environment. find_terms() gets as_term_labels argument, extract model terms formula’s \"term.labels\" attribute. closer behaviour stats::terms(), may insufficient, e.g. mixed models.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-3","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.3","text":"get_random() now returns observations get_data() correctly removes missing values data returning . find_parameters() marginal effects ignores \"s.value\" column (added recent update). Fixed issue get_response() brms models trunc() function response variable.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0192","dir":"Changelog","previous_headings":"","what":"insight 0.19.2","title":"insight 0.19.2","text":"CRAN release: 2023-05-23","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"breaking-changes-0-19-2","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"insight 0.19.2","text":"minimum needed R version bumped 3.6. download_model() longer errors model object downloaded, instead returns NULL. prevents test failures, allows skip tests return value download_model() NULL.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-19-2","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.19.2","text":"Improved support mclogit models (package mclogit) mipo objects (package mice) models ordinal categorical response.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-models-0-19-2","dir":"Changelog","previous_headings":"","what":"New supported models","title":"insight 0.19.2","text":"phylolm phyloglm (package phylolm), nestedLogit (package nestedLogit).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.2","text":"Fixed issue get_variance() glmmTMB models rank deficient coefficients. Fixed issues get_weights() glm models without weights na.action set default model call. clean_names() now also removes relevel() pattern. Fixed issue model_info() models class gamlss. Fixed problems preventing get_data() locating data defined non-global environments. Fixed issue get_predicted() variables class numeric matrix created scale(), correctly handled get_data() failed find data appropriate environment. Fixed issue model_info() gee models binomial families.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0191","dir":"Changelog","previous_headings":"","what":"insight 0.19.1","title":"insight 0.19.1","text":"CRAN release: 2023-03-18","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-models-0-19-1","dir":"Changelog","previous_headings":"","what":"New supported models","title":"insight 0.19.1","text":"hglm (package hglm).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-19-1","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.19.1","text":"Minor improvements get_data() t.test(). format_value() gets lead_zero argument, keep drop leading zero formatted value, well arguments style_positive style_negative style positive negative numbers. format_table() now also formats columns named SGPV (second generation p-values) p-values. Functions models class clm (like find_formula(), find_variables(), get_data() etc.) now also include variables defined scale nominal component.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.1","text":"Fixed issue get_data() results kruskal.test(). Fixed issue find_weights() models class lme gls. Fixed issue get_datagrid() models multiple weight variables.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0190","dir":"Changelog","previous_headings":"","what":"insight 0.19.0","title":"insight 0.19.0","text":"CRAN release: 2023-01-30","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-models-0-19-0","dir":"Changelog","previous_headings":"","what":"New supported models","title":"insight 0.19.0","text":"mmrm (package mmrm), flac flic (logistf)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"breaking-changes-0-19-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"insight 0.19.0","text":"get_data() revised now always tries recover data used fit model environment. fails, falls back recovering data model frame (former default behaviour). Furthermore, source argument can used explicitly force old behaviour: source = \"mf\" try recover data model frame first, possibly falling back look environment.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-19-0","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.19.0","text":"n_grouplevels(), return random effect groups number group levels mixed models.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-19-0","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.19.0","text":"get_datagrid() preserves factor levels factors hold constant reference level. required work together get_modelmatrix() calculating standard errors get_predicted().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-19-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.19.0","text":"Fixed get_modelmatrix() handling incomplete factors sometimes downstream implications numerical results uncertainty estimates produced get_predicted(). Fixed minor issues HTML tables export_table() model parameters grouped. Fixed issue incorrect back-transforming get_data() models log-transformed variables. Fixes issue compact_list(). has_single_value() now returns FALSE object NA na.rm = TRUE. Fixed issue get_parameters() gam-models without smooth terms, smooth terms removed intercept.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0188","dir":"Changelog","previous_headings":"","what":"insight 0.18.8","title":"insight 0.18.8","text":"CRAN release: 2022-11-24","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-18-8","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.18.8","text":"Fixed test due changes performance package.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0187","dir":"Changelog","previous_headings":"","what":"insight 0.18.7","title":"insight 0.18.7","text":"CRAN release: 2022-11-18","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-18-7","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.18.7","text":"Minor revisions get_predicted.glmmTMB() due changes behaviour predict.glmmTMB() truncated-family models since glmmTMB 1.1.5. New function has_single_value() equivalent length(unique()) == 1 (n_unique() == 1) faster.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-18-7","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.18.7","text":"ellipses_info() now includes attribute $is_binomial, TRUE model binomial family.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-18-7","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.18.7","text":"Fixed behaviour argument get_datagrid(). Fixed issue accessing model data get_datagrid() edge cases.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0186","dir":"Changelog","previous_headings":"","what":"insight 0.18.6","title":"insight 0.18.6","text":"CRAN release: 2022-10-23","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-models-0-18-6","dir":"Changelog","previous_headings":"","what":"New supported models","title":"insight 0.18.6","text":"Support logitr package: get_data(), find_variables() .","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-18-6","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.18.6","text":"Better detection unicode-support, avoid failures building vignettes. get_predicted() now correctly handles variables class numeric matrix created scale(), fixes bug performance::check_model() (easystats/performance#432). Fixed issue iterations argument get_predicted() brms models.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0185","dir":"Changelog","previous_headings":"","what":"insight 0.18.5","title":"insight 0.18.5","text":"CRAN release: 2022-10-12","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"breaking-0-18-5","dir":"Changelog","previous_headings":"","what":"Breaking","title":"insight 0.18.5","text":"get_df(type = \"satterthwaite\") lmerMod objects now return degrees freedom per parameter, longer per observation. Use df_per_obs TRUE return degrees freedom per observation.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-18-5","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.18.5","text":"safe_deparse_symbol() deparses substituted expressions possible,increases performance case many calls deparse(substitute()).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-18-5","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.18.5","text":"format_table() gets use_symbols argument. TRUE, column names refer particular effectsizes (like Phi, Omega Epsilon) include related unicode-character instead written name. works Windows R >= 4.2, OS X Linux R >= 4.0. stars argument format_table() can now also character vector, naming columns include stars significant values. especially useful Bayesian models, might multiple columns significant values, e.g. \"BF\" Bayes factor \"pd\" probability direction. get_df() gets type options return different type degrees freedom (namely, \"wald\" \"normal\", mixed models, \"ml1\", \"betwithin\", \"satterthwaite\" \"kenward-roger\"). standardize_names() now recognized classes package marginaleffects. Minor improvements find_parameters() models nonlinear formula. Minor speed improvements.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-18-5","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.18.5","text":"Fixed issue get_data() models class plm, accidentally converted factors character vectors. Fixed issue column alignment export_table() data frame print contained unicode-characters longer 1 byte. Correctly extract predictors fixest::(f1, .f2) interactions (#649 @grantmcdermott).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0184","dir":"Changelog","previous_headings":"","what":"insight 0.18.4","title":"insight 0.18.4","text":"CRAN release: 2022-09-20","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-18-4","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.18.4","text":"model_info() now includes information htest objects shapiro.test() bartlett.test() (return $is_variancetest = TRUE).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-18-4","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.18.4","text":"Fixed issue get_data() correctly backtransform original data terms log-transformations log(1 + x) log(x + 1). Fixed CRAN check issues.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0183","dir":"Changelog","previous_headings":"","what":"insight 0.18.3","title":"insight 0.18.3","text":"CRAN release: 2022-09-18","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-18-3","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.18.3","text":"format_alert(), format_warning() format_error(), convenient wrappers around message(), warning() stop() combination format_message(). can use funcionts format messages, warnings errors.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-18-3","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.18.3","text":"get_predicted() models class clm now includes confidence intervals predictions. format_message() gets additional formatting features. See ‘Details’ ?format_message information current limitations. format_message() gets indent argument, specify indention string subsequent lines. format_table() now merges IC IC weights columns one column (e.g., former columns \"AIC\" \"AIC_wt\" now printed one column, named \"AIC (weights)\"). Furthermore, ic_digits argument added control number significant digits IC values. print_color() color_text() now support bright variants colors background colors. get_datagrid() gets options range, provide control generate reference grid. get_data() models class geeglm fixestnow reliably retrieves model data.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-models-0-18-3","dir":"Changelog","previous_headings":"","what":"New supported models","title":"insight 0.18.3","text":"Support models class mblogit mclogit.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-18-3","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.18.3","text":"Fixed issues wrong attribute adjusted_for insight::get_datagrid(). Fixed issue (resp. implemented workaround) get_data.iv_robust(), failed due bug estimatr package. Fixed issue get_predicted() failed data contains factors one incomplete levels. Fixed issue get_predicted() models class mlm. Fixed issue get_predicted() failed compute confidence intervals predictions model contained matrix-alike response columns, e.g. response variable created cbind().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0182","dir":"Changelog","previous_headings":"","what":"insight 0.18.2","title":"insight 0.18.2","text":"CRAN release: 2022-08-10","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-18-2","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.18.2","text":"format_percent() short-cut format_value(as_percent = TRUE). is_converged(), check whether mixed model converged .","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-18-2","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.18.2","text":"format_table() gains exact argument, either report exact rounded Bayes factors. get_predicted() gets method models class gamlss (thereby, get_loglikelihood() now also works model classes). get_predicted() now better handles models class polr, multinom rlm.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-18-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.18.2","text":"Fixed test failures. Minor fixes address changes packages.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0180","dir":"Changelog","previous_headings":"","what":"insight 0.18.0","title":"insight 0.18.0","text":"CRAN release: 2022-07-05","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"breaking-changes-0-18-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"insight 0.18.0","text":"ci argument get_predicted() now defaults NULL. One reason make function faster confidence intervals required, case many downstream usages function. Please set ci explicitly compute confidence intervals predictions. get_data() longer returns logical types numeric variables converted logicals --fly within formulas (like y ~ .logical(x)). Instead, numeric variable coerced logical within formula gets logical attribute (set TRUE), returned data frame gets logicals attribute including names affected variables. parameters_table(), alias format_table(), removed.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-18-0","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.18.0","text":"find_transformation() get_transformation() now also work models response transformed using log2() log10().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-18-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.18.0","text":"get_sigma() models package VGAM returned wrong sigma-parameter. find_predictors() models package fixest contained interaction terms endogenous formula part correctly return instruments. Fixed formatting HTML table footers export_table(). Several fixes get_predicted() models mgcv::gam(). component argument find_parameters() stanmvreg models accept \"location\" value. null_model() consider offset-terms specified inside formulas. Argument allow.new.levels passed predict() get_predicted.glmmTMB(). clean_names() now works correctly several variables specified s() (#573, @etiennebacher).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0171","dir":"Changelog","previous_headings":"","what":"insight 0.17.1","title":"insight 0.17.1","text":"CRAN release: 2022-05-13","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-17-1","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.17.1","text":"deltaMethod (car), marginaleffects, marginaleffects.summary (marginaleffects)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-17-1","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.17.1","text":"get_predicted() now supports models class iv_robust ivreg. get_predicted(), type predict given, type overwrite predict. Note print message, predict preferred argument. get_varcov() gains vcov vcov_args arguments, specify variance-covariance matrix used compute uncertainty estimates (e.g., robust standard errors). get_loglikehood() improved handling models package estimator.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-17-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.17.1","text":"Fixed bug get_data() model objects whose data needs recovered environment, data name reserved word (e.g., named like R function). matrix returned get_varcov() models class bife now returns row column names. find_offset() find offset-terms merMod objects offset specified offset argument function call.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0170","dir":"Changelog","previous_headings":"","what":"insight 0.17.0","title":"insight 0.17.0","text":"CRAN release: 2022-03-29","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"breaking-changes-0-17-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"insight 0.17.0","text":"Arguments vcov_estimation vcov_type get_predicted(), get_predicted_se() get_predicted_ci() replaced vcov vcov_args, simplified common interface control robust covariance matrix estimation.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-17-0","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.17.0","text":"Improved performance various functions, particular get_data() model_info().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-17-0","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.17.0","text":"check names: object_has_names() object_has_rownames() work lists: is_empty_object() compact_list() work strings: compact_character() utility functions safe_deparse(), trim_ws() n_unique().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-17-0","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.17.0","text":"export_table() now better checks invalid values caption footer tables HTML format, silently removes, e.g., ansi-colour codes work text-format. get_data.coxph() returns original data frame instead data type coercion. get_loglikelihood() gets check_response argument, check model transformed response variable (like log() sqrt() transformation), , returns corrected log-likelihood. get_modelmatrix() now supports BayesFactor models. get_loglikelihood() get_df() now support model classes. get_predicted() improved multinomial models brms. get_variance() improved cover edge cases (complex) random effect structures. get_data() now includes variables returned data frame used subset argument regression functions (like lm()). edge cases, get_data() unable retrieve data used fit model, now informative error printed. ellipses_info() now also accepts list model objects, stable returns information provided models (like fixed random effects across models, models mixed models null-models, etc.) check_if_installed() now works interactively lets user prompt whether automatically update install packages.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-17-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.17.0","text":"Fixed incorrect column name conversion standardize_names() certain columns returned broom::glance(). Fixed issue correctly detecting Tweedie-models model_info(). Fixed issue get_datagrid() brms models monotonic factors. Fixed issue find_formula() argument correlation defined outside lme() gls() (@etiennebacher, #525). Fixed issue get_data() back-transforming data predictors used cos(), sin() tan() transformations.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0160","dir":"Changelog","previous_headings":"","what":"insight 0.16.0","title":"insight 0.16.0","text":"CRAN release: 2022-02-16","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-16-0","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.16.0","text":"get_datagrid(), generate reference grid, usually used computing adjusted predictions marginal means regression models.","code":""},{"path":[]},{"path":"https://easystats.github.io/insight/news/index.html","id":"get_predicted-0-16-0","dir":"Changelog","previous_headings":"Changes to functions","what":"get_predicted()","title":"insight 0.16.0","text":"get_predicted() revised. Beside four core options predict argument, now also possible use value valid model’s predict() method’s type argument. get_predicted() now supports models (e.g., packages like GLMMadaptive survival). get_predicted() now robust calculating standard errors predictions.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"other-functions-0-16-0","dir":"Changelog","previous_headings":"Changes to functions","what":"Other functions","title":"insight 0.16.0","text":"get_statistic() find_statistic() now support htest objects.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-16-0","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.16.0","text":"Various minor improvements.","code":""},{"path":[]},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-15-1","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.15.1","text":"Improved speed performance, especially get_data().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-15-1","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.15.1","text":"get_data() coxph models now returns original factor levels variables transformed strata() inside formulas.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0150","dir":"Changelog","previous_headings":"","what":"insight 0.15.0","title":"insight 0.15.0","text":"CRAN release: 2022-01-07","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"breaking-changes-0-15-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"insight 0.15.0","text":"Data management functions (like reshape_longer(), data_match()) moved datawizard package. get_data() longer returns factor types numeric variables converted factors --fly within formulas (like y ~ .factor(x)). Instead, numeric variable coerced factor within formula gets factor attribute (set TRUE), returned data frame gets factors attribute including names affected variables.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-15-0","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.15.0","text":"Support bfsl (bfsl)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-15-0","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.15.0","text":"New standardize_column_order() function can used standardize column order output dataframes.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-15-0","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.15.0","text":"Improved speed performance functions. Improved handling table captions footers export_table(). See also new vignette exporting data frames human readable tables : https://easystats.github.io/insight/articles/export.html Revised width argument export_table(), now allows set different column widths across table columns. See examples ?export_table. export_table() gets table_width argument split wide tables two parts. get_varcov() MixMod (package GLMMadaptive) revised, now allows return robust variance-covariance matrix. Added get_df() methods.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-15-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.15.0","text":"Fixed issues manual sigma computation handle dispersion models get_sigma(). Fixed issue find_formula() BayesFactor::lmBF() multiple random effects. Fixed issue get_parameters.BFBayesFactor() wrong sign difference estimate t-tests. Argument width format_value() ignored formatting integer values protect_integers set TRUE.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0145","dir":"Changelog","previous_headings":"","what":"insight 0.14.5","title":"insight 0.14.5","text":"CRAN release: 2021-10-16","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-14-5","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.14.5","text":"find_transformation() get_transformation() find get function used transform response variable regression model.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-14-5","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.14.5","text":"Improved support models class sampleSelection. Improved documentation. get_modelmatrix() now supports: rms::lrm get_predicted() supports: MASS::polr, MASS::rlm, rms::lrm, fixest, bife::bife, ordinal::clm. get_predicted() standard errors often much faster compute. get_predicted() supports models “grouped” “level” outcomes (e.g., multinomial logit). get_predicted() handles factors better. Improved documentation","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-14-5","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.14.5","text":"check_if_installed() gains quietly argument, neither stopping warning message non-installed packages requested. get_predicted()’s predict argument now accepts values: “link”, “expectation”, “prediction”, “classification”, NULL. get_predicted() accepts predict=NULL, allows users push type argument ... ellipsis, forward predict() method modelling package.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-14-5","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.14.5","text":"Fixed issue parameter names emmeans objects get_parameters(). Fixed issues unknown arguments get_predicted().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0144","dir":"Changelog","previous_headings":"","what":"insight 0.14.4","title":"insight 0.14.4","text":"CRAN release: 2021-09-02","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-14-4","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.14.4","text":"Fixed issues due latest brms update.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0143","dir":"Changelog","previous_headings":"","what":"insight 0.14.3","title":"insight 0.14.3","text":"CRAN release: 2021-08-17","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-14-3","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.14.3","text":"systemfit (systemfit)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-14-3","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.14.3","text":"Minor improvements functions support printing outputs.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-14-3","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.14.3","text":"get_predicted() gains new option, predict = \"response\" binomial models. Improved stability get_variance() computing random-slope-intercept correlation categorical random slopes. Improved get_priors() brms models.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-14-3","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.14.3","text":"Fixed issue get_data() brms models auxiliary parameters. Fixed issue find_formula() brms models auxiliary parameters. Fixed issue get_data() htest objects always preserve factors. Fixed issue format_table() ci-levels longer fractional part.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0142","dir":"Changelog","previous_headings":"","what":"insight 0.14.2","title":"insight 0.14.2","text":"CRAN release: 2021-06-22","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-14-2","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.14.2","text":"check_if_installed() gains minimum_version argument, check installed package older specified version number. package argument check_if_installed() now vectorized, can check multiple packages one function call. Value formatting functions (like format_value() format_ci()) can now round significant digits using digits = \"signif\".","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-14-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.14.2","text":"Fixed issue model_info() stan_polr() models. Fixed issue find_parameters() brms model contained parameters priors sigma. Fixed issue n_obs() stats4::mle() models. Fixed failing tests due latest fixest update. Fixed issues due latest epiR update.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0141","dir":"Changelog","previous_headings":"","what":"insight 0.14.1","title":"insight 0.14.1","text":"CRAN release: 2021-05-28","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-14-1","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.14.1","text":"Added several data management preparation functions: data_to_long(), data_match(), data_relocate(), data_restoretype(), force_numeric().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-14-1","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.14.1","text":"Support pgmm (plm)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-14-1","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.14.1","text":"Improved handling auxiliary parameters stanreg models.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-14-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.14.1","text":"Stability improvements get_predicted(). Fixed issues accessing information afex_aov model empty aov slot (anticipation afex v.1.0.0). Fixed issue model_info() stanreg object non-standard model-family specification.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0140","dir":"Changelog","previous_headings":"","what":"insight 0.14.0","title":"insight 0.14.0","text":"CRAN release: 2021-05-07","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-14-0","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.14.0","text":"Better support accessing auxiliary parameters (via get_sigma() get_auxiliary(), well get_parameters(component = \"\")) brmsfit models.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-14-0","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.14.0","text":"get_modelmatrix() robust alternative model.matrix() different model classes. format_message() format warnings messages adjusting maximum line_length, possibly width console window. format_string() shorten string maximum length. check_if_installed() see needed package installed.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-14-0","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.14.0","text":"Support mvord (mvord), SemiParBIV (GJRM), selection (sampleSelection)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-14-0","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.14.0","text":"find_formula() now warns data name present formula, since can result unexpected behaviour package functions. model_info() returns is_bernoulli = TRUE Bernoulli models. Add get_statistic() lavaan models. get_df() supports models/objects. get_sigma() supports models/objects. get_sigma() get_deviance() lrm models (package rms) now return one value, sigma deviance model intercept predictors. get_deviance() now works glmerMod, MixMod glmmTMB models. behaviour documentation effects component arguments, particular brmsfit models, revised consistent. export_table() now correctly prints footer input list data frames.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-14-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.14.0","text":"Fixed issue (warning) get_loglikelihood() binomial models non-numeric response variables. find_statistic() correctly distinguishes t- z-statistic emmGrid objects. Fixed issue model_info() BGGM mgcv::gam(). Fixed issue find_formula() gamlss models random() function formula. Fixed issue find_parameters() brmsfit models auxiliary parameters directly modelled. Fixed issue get_parameters() find_parameters() multi-group blavaan models. Fixed issue ellipsis_info() detecting nested models poly-terms. Fixed issue find_response() brmsfit models used resp_thres() function model formula. Fixed issue get_predicted_ci() models rank-deficient model matrix. Argument zap_small format_value() work properly vectorized vectors.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0132","dir":"Changelog","previous_headings":"","what":"insight 0.13.2","title":"insight 0.13.2","text":"CRAN release: 2021-04-01","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-13-2","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.13.2","text":"get_predicted() revamped new API stable output form (vector). course revision, new function get_predicted_ci() calculate uncertainty intervals model predictions. Improved support orm (rms).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-13-2","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.13.2","text":"Support svy_vglm (svyVGAM), mjoint (joineRML), mhurdle (mhurdle), sarlm (spatialreg), model_fit (tidymodels)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-13-2","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.13.2","text":"is_gam_model() small helper check model generalized additive model smooth terms.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-13-2","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.13.2","text":"Added iterations argument get_predicted() control number draws returned Bayesian models. model_info() now returns $is_gam model generalized additive model smooth terms. format_table() export_table() now check valid input (e.g., non-empty data frame) give informative message. Improved support MixMod (GLMMadaptive) get_variance(). Improved print_parameters(), allow flexibility better cope different output formats. get_parameters(), find_parameters() clean_parameters() emmGrid emm_list objects revised now better match actual parameter names (also contrasts).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-13-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.13.2","text":"Fixed issue get_variance() models without intercept. Fixed labelling issue get_parameters() clean_parameters() blavaan models. clean_parameters() MCMCglmm objects include random parameters. Fixed minor issue unintended sub-titles print_html(). Fixed issue get_prior() rstanarm::R2() priors.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0131","dir":"Changelog","previous_headings":"","what":"insight 0.13.1","title":"insight 0.13.1","text":"CRAN release: 2021-02-22","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-13-1","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.13.1","text":"Improved handling GAMs.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-13-1","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.13.1","text":"Support elm, eglm (eflm)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-13-1","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.13.1","text":"get_residuals(..., weighted = TRUE) doesn’t throw warnings weights 1 (weights specified). n_parameters() gains only_estimable argument, remove non-estimable parameters counting number parameters models rank-deficient model matrix. format_ci() also gains zap_small argument.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixed-0-13-1","dir":"Changelog","previous_headings":"","what":"Bug fixed","title":"insight 0.13.1","text":"Fix disable failing tests Mac OS. Fixed issues get_variance() non-correlated random-slope-intercepts lme4 models.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0130","dir":"Changelog","previous_headings":"","what":"insight 0.13.0","title":"insight 0.13.0","text":"CRAN release: 2021-02-15","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-13-0","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.13.0","text":"Roll-back R dependency R >= 3.4.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-13-0","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.13.0","text":"Support crr (cmprsk), ergm (ergm), btergm (btergm), Rchoice (Rchoice), garch (tseries)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-13-0","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.13.0","text":"Slightly improved handling different CI-columns format_table(). model_info() now returns $is_leventest model object returned car::leveneTest(). get_parameters() supports htest objects.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-13-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.13.0","text":"get_varcov() properly remove NA rank-deficient models. Fixed issue/warning get_data() htest objects, environment properly evaluated. Fixed issue format_table() p-value formatting, input data frame contained column named \"p\", numeric. (Hopefully) fixed issue failing CRAN checks.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0120","dir":"Changelog","previous_headings":"","what":"insight 0.12.0","title":"insight 0.12.0","text":"CRAN release: 2021-01-14","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"breaking-changes-0-12-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"insight 0.12.0","text":"format_table() alias parameters_table(), longer referring export_table().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-12-0","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.12.0","text":"Support coxr (coxrobust), coeftest (lmtest), ivFixed (ivFixed), ivprobit (ivprobit), riskRegression (riskRegression). summary.lm, lmodel2 (lmodel2), improved support bamlss (bamlss).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-12-0","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.12.0","text":"Added get_deviance() function returns model deviance robust alternative stats::deviance(). Added model_name() function returns model’s “name”. Added format() method find_formula() output flatten . Added null_as_ones = TRUE argument get_weights() return vector 1s instead NULL. Added get_intercept() helper function easily retrieve value intercept. Added get_df() robust alternative stats::df.residuals(). Added get_predicted() robust alternative stats::fitted(). Added get_loglikelihood() (alias loglikelihood()) function robust alternative stats::logLik(). Added get_residuals() robust alternative extract model residuals. Added ellipsis_info() specify nature ellipsis (...) inputs. Added is_nested_models() check multiple regression models nested (decreasing increasing). Added generic print_html(), allow packages create tables HTML format (via export_table()) printing output console. Added is_mixed_model(), safely check model mixed effects model. function also works multivariate response models. n_parameters() moved parameters insight.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-12-0","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.12.0","text":"find_formula(), find_predictor(), find_random() related functions now also return names random effects generalized additive mixed models (gamm, gamm4, stan_gamm4). Added support BFBayesFactor objects. model_info() now returns $is_xtab chisq.test() BayesFactor::contingencyTableBF(). Furthermore, $family element objects set \"categorical\". n_obs() now handles number observations models binomial family correctly matrix-columns response variable.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-12-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.12.0","text":"Fixed issue find_statistic() fixest models, return correct value \"t-statistic\" feols(). Fixes inconsistencies get_priors() (linear) BFBayesFactor models.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0111","dir":"Changelog","previous_headings":"","what":"insight 0.11.1","title":"insight 0.11.1","text":"CRAN release: 2020-12-08","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-11-1","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.11.1","text":"Warnings formerly printed using print_color() now use warning(), better suppress warning messages required.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-11-1","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.11.1","text":"find_smooth(), return particular smooth terms used model.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-11-1","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.11.1","text":"get_variance() get_variance_random() gain tolerance-argument, set tolerance level singularity checks computing random effect variances. parameters_table() formats objects easystats packages, like ROPE-range p_rope(). find_statistic() now supports models class scam. get_data() now also supports htest-object, possible.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-11-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.11.1","text":"Fix CRAN check issues. find_formula() stan_gamm4() now correctly includes random effects.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0110","dir":"Changelog","previous_headings":"","what":"insight 0.11.0","title":"insight 0.11.0","text":"CRAN release: 2020-11-24","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"breaking-changes-0-11-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"insight 0.11.0","text":"model_info() now also detects models oneway.test(), binom.test() chisq.test(), mcnemar.test() prop.test(). Furthermore, model_info() better deals objects BFBayesFactor, censored regression models longer return TRUE $is_linear. format_table() going renamed future update. Please use alias export_table().","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-11-0","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.11.0","text":"Support scam (scam), meta_random meta_fixed (metaBMA), Glm (rms), ridgelm (MASS), mediate (mediation). Partial support mcmc.list (e.g. bayesGARCH)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-function-0-11-0","dir":"Changelog","previous_headings":"","what":"New function","title":"insight 0.11.0","text":"parameters_table(), moved package parameters insight. Note function going renamed format_table() future update. find_offset(), find name offset-terms. Added generics display() print_md(), allow packages create tables formats printing output console.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-11-0","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.11.0","text":"standardize_names() tries loyal broom-naming conventions possible. function brackets-argument format_ci() changed. now also possible provide length-two character vector, define brackets encompass CI-values. Related change format_ci(), function brackets-argument parameters_table() changed accordingly. Furthermore, parameters_table() gains preserve_attributes-argument, preserve attributes input data frame. export_table() gains several new arguments allows create tables markdown-format. print_parameters() gains keep_parameter_column-argument, keep (default) \"Cleaned_Parameter\" \"Parameter\" columns, - FALSE - use \"Cleaned_Parameter\" new \"Parameter\" column.","code":""},{"path":[]},{"path":"https://easystats.github.io/insight/news/index.html","id":"get_data-0-11-0","dir":"Changelog","previous_headings":"Bug fixes","what":"get_data()","title":"insight 0.11.0","text":"Fixed issue get_data() MixMod objects, caused due internal changes GLMMadaptive. get_data() zero-inflated models pscl include offset-term cases offset defined argument, inside model formula. Fixed issue get_data() coxph models survival-objects event-argument response. Fixed edge case get_data() column name response values log-transformed using log(x+1).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"other-bug-fixes-0-11-0","dir":"Changelog","previous_headings":"Bug fixes","what":"Other bug fixes","title":"insight 0.11.0","text":"Fixed issue survreg models included strata() formula. Fixed warning CRAN checks forthcoming R-devel.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-0100","dir":"Changelog","previous_headings":"","what":"insight 0.10.0","title":"insight 0.10.0","text":"CRAN release: 2020-10-22","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-function-0-10-0","dir":"Changelog","previous_headings":"","what":"New function","title":"insight 0.10.0","text":"get_sigma() return residual standard deviation. standardize_names(), moved package parameters insight.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-10-0","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.10.0","text":"Support maov (stats), HLfit (spaMM), preliminary support margins (margins), merModList (merTools).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"general-0-10-0","dir":"Changelog","previous_headings":"","what":"General","title":"insight 0.10.0","text":"Better support (weighted) multivariate response models class mlm functions like get_varcov() clean_parameters(). Make find_formula() work t-tests BayesFactor. Improved handling mira objects.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-10-0","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.10.0","text":"format_bf() gains na_reference argument, set “reference” Bayes factor values NA, exact argument returning scientific formatted extreme values. format_value() gains zap_small argument, prevent scientific printing numbers decimal places indicated digits. get_weights() now also returns NULL weights 1. get_parameters() BFBayesFactor objects gets verbose argument. get_parameters() emmGrid emm_list objects gets summary argument, either return full posterior samples summarized centrality indices Bayesian models. find_formula() MuMIn::model.avg() now tries retrieve random effects part formula, present. get_weights() gains na_rm argument remove possible missing values.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-10-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.10.0","text":"Fix issues one-sample Bayesian t-tests ( https://github.com/easystats/parameters/issues/297 ). Fix issue format_value() printed \"100%\" \"1e+02%\". Removed unnecessary white-spaces format_ci() upper lower interval larger 1e+5. has_intercept() work correctly intercept removed formula using -1. find_terms() now shows removal intercept formula using -1 term \"-1\". Fix issues get_statistic() vgam models.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-096","dir":"Changelog","previous_headings":"","what":"insight 0.9.6","title":"insight 0.9.6","text":"CRAN release: 2020-09-20","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-9-6","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.9.6","text":"get_data() now works models afex_aov(). get_parameters() returns informative message BFBayesFactor objects first model indexed. clean_names() now also removes exp()-pattern. clean_names() character-objects now works “interaction patterns” (like clean_names(\"scale():scale(b)\")). format_bf() gains protect_ratio argument, print numbers smaller 1 ratios.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-9-6","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.9.6","text":"Fix issues CRAN checks. get_priors() now works complex BFBayesFactor objects multiple custom priors.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-095","dir":"Changelog","previous_headings":"","what":"insight 0.9.5","title":"insight 0.9.5","text":"CRAN release: 2020-09-07","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"breaking-changes-0-9-5","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"insight 0.9.5","text":"get_data() always “back-transform” log-transformed scaled variables return original values. Now bug fixed, get_data() return variables original scale (variables transformed), stated docs.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-9-5","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.9.5","text":"get_data() now returns correct original data “empty” polynomials (.e. poly(x, 1)). Fix CRAN check issues due latest estimatr update.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-091","dir":"Changelog","previous_headings":"","what":"insight 0.9.1","title":"insight 0.9.1","text":"CRAN release: 2020-08-26","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-9-1","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.9.1","text":"Support mipo (mice), lqmm lqm (lqmm). Preliminary support semLME (smicd), mle (stats4) mle2 (bbmle).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-9-1","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.9.1","text":"model_info() returns $is_meta = TRUE brms-meta-analysis models. Make find_statistic() work mgcv::bam(). get_variance() now also support truncated_nbinom2() family glmmTMB.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-9-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.9.1","text":"Fixed issue correctly detecting sigma-parameters find_parameters() multiple-response brmsfit-models. Fixed issue find_formula() models stan_nlmer(). Fixed issues find_terms() response variable included namespace, like survival::Surv(). Fixed issues get_priors() stanreg models, probably caused latest update rstanarm 2.21.2. Fixed issues get_variance() brmsfit models. Fixed issues around crq objects (package quantreg).","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"insight-090","dir":"Changelog","previous_headings":"","what":"insight 0.9.0","title":"insight 0.9.0","text":"CRAN release: 2020-07-20","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-supported-model-classes-0-9-0","dir":"Changelog","previous_headings":"","what":"New supported model classes","title":"insight 0.9.0","text":"BGGM (BGGM), metaplus (metaplus), glht (multcomp), glmm (glmm), improved support manova (stats)","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"new-functions-0-9-0","dir":"Changelog","previous_headings":"","what":"New functions","title":"insight 0.9.0","text":"Value formatting functions format_bf(), format_pd(), format_p(), format_rope() format_number() moved package parameters insight.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"changes-to-functions-0-9-0","dir":"Changelog","previous_headings":"","what":"Changes to functions","title":"insight 0.9.0","text":"get_variance() now also returns correlation among random slopes. get_variance() now also (partially) supports brmsfit models. get_parameters() models return (posterior simulated) samples model parameters gains summary-argument, - TRUE - returns point-estimate (mean samples) instead full samples. format_p() returns \"> .999\" p-values equal greater 0.999.","code":""},{"path":"https://easystats.github.io/insight/news/index.html","id":"bug-fixes-0-9-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"insight 0.9.0","text":"Fixed issue find_formula() properly work models random effects formula (lme4 notation), random effects fixed effects parts. get_variance() return variance components random effects null-models random slopes. Fixed issue get_variance() lme-models categorical random slope. Fixed issue occurred since R 4.0.0 find_weights() function call weights-argument. Fixed issue get_data() models cbind()-response variables matrix-like variables model frame (e.g. using poly()). Fixed issues PROreg::BBmm(), due changes latest package update.","code":""}]