Code Monkey home page Code Monkey logo

discovr's People

Contributors

jakub-jedrusiak avatar profandyfield avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

discovr's Issues

error in rendering discovr_06.Rmd tutorial from the discovr package

processing file: discovr_06.Rmd

Quitting from lines 16-45 (discovr_06.Rmd)
Error: package or namespace load failed for 'qqplotr' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called 'twosamples'
Execution halted

R version 4.2.3

issue with running tutorial discovr_08

processing file: discovr_08.Rmd
solution]

Quitting from lines at lines 1984-2007 [unnamed-chunk-22] (discovr_08.Rmd)
Error in validObject():
! invalid class "ddenseModelMatrix" object: superclass "xMatrix" not defined in the environment of the object's class
Backtrace:

  1. base::summary(BayesFactor::posterior(album_full_bf, iterations = 10000))
  2. BayesFactor::posterior(album_full_bf, iterations = 10000)
  3. BayesFactor::posterior(...)
  4. BayesFactor:::fullDesignMatrix(formula, data, dataTypes)
  5. base::lapply(...)
    ...
  6. MatrixModels::model.Matrix(formula(fmla), data = data, sparse = sparse)
  7. methods::new(...)
  8. Matrix (local) initialize(value, ...)
  9. methods (local) .nextMethod(.Object = .Object, ... = ...)
  10. methods::validObject(.Object)
    Warning messages:
    1: In eval(parse_only(code), envir = envir) :
    2: In eval(parse_only(code), envir = envir) :
    Execution halted

Issues in tutorial "Moderation and Mediation"

In section "Mediation"

  • Minor formatting errors
    image

  • This is not an error, but I think the coefficient b can be confused with the path b and label b in this particular example.
    image

  • Minor formatting errors: extra dollar signs
    image
    image

Issues in tutorial "Mixed designs (GLM5)"

The following issues come from page "Fitting a model to a mixed design"

  1. Minor typo
    image
    Which should be ref = x instead of rel = x

  2. Some misinterpretation
    image
    I think the first interaction term should show the effect of average dates compared to unattractive dates, comparing playing hard to get to normal. However, in the tutorial, you wrote "The first contrast for the interaction term shows the effect of low attractive dates compared to average dates, comparing playing hard to get to normal."
    Similarly, the second interaction term shows the effect of attractive dates compared to average dates, comparing playing hard to get to normal, rather than "low attractive dates compared to average-looking dates".
    (I also suggest double-checking the interpretations of interaction between looks and personality as well as the three-way interactions. There seem to be similar problems...)

Thank you Andy for your hard work! Will be supporting you as always :D

calculation of alpha

First, and perhaps most important, the value of Alpha at the very top is Cronbach's $\alpha$, and we are given its 95% confidence interval below: we're looking for values in the range of .7 to .8 (or thereabouts). In this case, `r get_alpha(r1)` so this probably indicates good reliability.

I get different values for alpha here:

Reliability analysis   
Call: psych::alpha(x = dplyr::select(raq_tib, raq_06, raq_07, raq_10, 
    raq_13, raq_14, raq_15, raq_18))

  raw_alpha std.alpha G6(smc) average_r S/N    ase mean   sd median_r
      0.77      0.77    0.75      0.32 3.3 0.0069  3.5 0.64     0.29

    95% confidence boundaries 
         lower alpha upper
Feldt     0.75  0.77  0.78
Duhachek  0.76  0.77  0.78

whereas you report 𝛼 = 0.80 [0.79, 0.81]

I understand that my values are still within the range we are looking for, but just wondering if I should be concerned about the difference.

Replace model_parameters() by parameters()

We tend to push for the use of the short alias parameters() instead of model_parameters() in easystats, which is a bit too long and clunky. Let me know if you're interested in replacing that here, happy to make a PR

Ideas

Hi Andy, I am going through the factor analysis tutorial and I thought I might write down some ideas/thoughts here for future reference, and we can discuss them someday and I'll make PRs for what you want ☺️

discovr_18: EFA

  • Unify correlation: Avoid swithing to psych by using the polychoric option in correlation() + its plotting features
  • sphericity and KMO: Use performance::check_factorstructure() for a prettier check output (easystats/performance#552)
  • how many factors: reference (or use, but it might be overkill) n_factors()?
    • TODO for easystats: add plotting example that we have in the vignette + more details about each method)
  • Use directly parameters::factor_analysis()? tough benefits are probably small here
  • Replace model_parameters() calls by alias parameters() as it's a bit less confusing and simple

@strengejacke

Release discovr 0.1.5.7

First release:

Prepare for release:

  • urlchecker::url_check()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • rhub::check_for_cran()

Submit to CRAN:

  • usethis::use_version('patch')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted 🎉
  • usethis::use_github_release()
  • usethis::use_news_md()
  • usethis::use_dev_version()
  • Update install instructions in README

Error using across() function within a mutate - Tutorial 10

There appears to be an error in Tutorial 10 when using the across() function.

The tutorial asks you to create centred versions of a couple of variables in one go, and the code provided to do that is the following:

vids_tib <- vids_tib %>%
  dplyr::mutate(
    dplyr::across(c(vid_game, caunts), cent = centre)
    )

This is meant to create two variables called "vid_game_cent" and "caunts_cent", which are the centred versions of the original variables. For me it doesn't create those variables and doesn't seem to do anything else.

I had a look athe across() function and it appears the correct way to specify the names of the new variables is with the .names argument:

vids_tib <- vids_tib %>%
  dplyr::mutate(
    dplyr::across(c(vid_game, caunts), centre, .names = "{.col}_cent")
    ) 

discover_08: Deprecated function in `across`

across(.fns = list(valid = ~sum(!is.na(.x)), missing = ~sum(is.na(.x))), .names = "{.col}_{.fn}")

The function itself is not deprecated, but the use of the function across without .cols is deprecated in dplyr 1.1.1.

When trying to replicate the function on line 986 in my own .qmd file in VS Code, I get an error, but it only displays once every 8 hours.

VS Code version

Version: 1.86.2 (Universal)
Commit: 903b1e9d8990623e3d7da1df3d33db3e42d80eda
Date: 2024-02-13T19:42:13.651Z
Electron: 27.2.3
ElectronBuildId: 26908389
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Darwin x64 22.6.0

dplyr version

Type: Package
Package: dplyr
Title: A Grammar of Data Manipulation
Version: 1.1.4
Authors@R: c(
    person("Hadley", "Wickham", , "[email protected]", role = c("aut", "cre"),
           comment = c(ORCID = "0000-0003-4757-117X")),
    person("Romain", "François", role = "aut",
           comment = c(ORCID = "0000-0002-2444-4226")),
    person("Lionel", "Henry", role = "aut"),
    person("Kirill", "Müller", role = "aut",
           comment = c(ORCID = "0000-0002-1416-3412")),
    person("Davis", "Vaughan", , "[email protected]", role = "aut",
           comment = c(ORCID = "0000-0003-4777-038X")),
    person("Posit Software, PBC", role = c("cph", "fnd"))
  )
Description: A fast, consistent tool for working with data frame like
    objects, both in memory and out of memory.
License: MIT + file LICENSE
URL: https://dplyr.tidyverse.org, https://github.com/tidyverse/dplyr
BugReports: https://github.com/tidyverse/dplyr/issues
Depends: R (>= 3.5.0)
Imports: cli (>= 3.4.0), generics, glue (>= 1.3.2), lifecycle (>=
        1.0.3), magrittr (>= 1.5), methods, pillar (>= 1.9.0), R6,
        rlang (>= 1.1.0), tibble (>= 3.2.0), tidyselect (>= 1.2.0),
        utils, vctrs (>= 0.6.4)
Suggests: bench, broom, callr, covr, DBI, dbplyr (>= 2.2.1), ggplot2,
        knitr, Lahman, lobstr, microbenchmark, nycflights13, purrr,
        rmarkdown, RMySQL, RPostgreSQL, RSQLite, stringi (>= 1.7.6),
        testthat (>= 3.1.5), tidyr (>= 1.3.0), withr
VignetteBuilder: knitr
Config/Needs/website: tidyverse, shiny, pkgdown, tidyverse/tidytemplate
Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.3
NeedsCompilation: yes
Packaged: 2023-11-16 21:48:56 UTC; hadleywickham
Author: Hadley Wickham [aut, cre] (<https://orcid.org/0000-0003-4757-117X>),
  Romain François [aut] (<https://orcid.org/0000-0002-2444-4226>),
  Lionel Henry [aut],
  Kirill Müller [aut] (<https://orcid.org/0000-0002-1416-3412>),
  Davis Vaughan [aut] (<https://orcid.org/0000-0003-4777-038X>),
  Posit Software, PBC [cph, fnd]
Maintainer: Hadley Wickham <[email protected]>
Repository: CRAN
Date/Publication: 2023-11-17 16:50:02 UTC
Built: R 4.2.0; x86_64-apple-darwin17.0; 2023-12-21 16:49:49 UTC; unix
Archs: dplyr.so.dSYM

RStudio version

Version 2023.12.1+402 (2023.12.1+402)

R Version

4.2.3

Issues in tutorial "Multilevel model"

In section "Fitting multilevel models":
There are several places where the font effect doesn't show:
image

The overall intervention effect should be 6.79 instead of -4.3:
image

tutorial fails to run

Upon clicking the button to start tutorial 1, I get the following error:

$ exercise      : logi TRUE
 $ exercise.lines: num 4
  |..................                                                    |  25%
  ordinary text without R code
  |..................                                                    |  26%
label: met_name-hint-1
Quitting from lines 401-404 (discovr_01.Rmd) 
Error in eval(expr, envir, enclos) : object '.....' not found
Calls: sourceWithProgress ... handle -> withCallingHandlers -> withVisible -> eval -> eval
Execution halted

This is using the R 4.0.2 and RStudio 1.3.959 with all of the latest packages and latest version of discovr as of July 10.

Minor content issue in discovr_03.Rmd

Directory: discovr/inst/tutorials/discovr_03/discovr_03.Rmd

In the discovr_03 tutorial, subsection "What is a confidence interval?" Replace all was used a bit too liberally. Line 128 reads:

I think I used Instagram, but that's because I haven't yet realised that Instagram is populated only by people over the age of 40. I'm told that Instagram is the place to be, but no-one wants to see my wrinkly old scrotum of a face so I never use it. I pretty much don't use Instagram either. Did I mention I like statistics? Draw your own conclusions.

while I guess what it SHOULD say is (bold for clarity):

I think I used Facebook, but that's because I haven't yet realised that Facebook is populated only by people over the age of 40. I'm told that Instagram is the place to be, but no-one wants to see my wrinkly old scrotum of a face so I never use it. I pretty much don't use Facebook either. Did I mention I like statistics? Draw your own conclusions.

Issues in tutorial "The beast of bias"

In the section "Spotting outliers"
image
The text says the new columns will have a 'z' appended, while the results of the code don't give this output (in fact the code itself doesn't;t correspond to what the text says)

In the section "Spotting normality"
image
There must be a typo in this self-contradictory sentence...

A few mistakes in discovr_13

There are a few mistakes in discovr_13:

  1. One of the hints in the Exploring data section uses the word "happiness" instead of "attractiveness".
  2. I'm not sure if it's a mistake, but "vcov.type = “HC4”" in the main text of Robust models uses typographic quotation marks and thus causes an error if copied and pasted.
  3. In the first quiz question in the Transfer task we're asked to "select ALL valid answers" but only one answer can be chosen.
  4. In the Transfer task, in coding challenge with simple effects analysis word "console" is repeated twice.
  5. Interpretting interactions (level 2) quiz in the Transfer task show statistics' values which I can't find in any of the produced tables but I might not have produced the right tables.

That's a good occasion for me to thank you for "Discovering statistics using R", it's the best book to learn statistics I've encountered. Pitty it wasn't published in my country.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.