Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plot.n_factors: Add % of variance to plot #314

Merged
merged 18 commits into from
Feb 2, 2024

Conversation

DominiqueMakowski
Copy link
Member

Should be non-breaking and work with easystats/parameters#921

@DominiqueMakowski
Copy link
Member Author

New plot: image

@strengejacke
Copy link
Member

So the basic message is that using 4 or more factors does not significantly increase the explained variance?

@DominiqueMakowski
Copy link
Member Author

Yes, although variance explained is only used for a subset of methods to determine the optimal number of factors (so it's not the only thing that impact the result of the n methods that we test)

but it's quite standard procedure to report it when we do EFA, and it's one of these "intuitive" index.
And usually I wouldn't be a big fan of dual axis, but because the line is monotonically increasing towards the right, it's also okay IMO to have it on the right-hand axis (it's fairly readable I think?)

@DominiqueMakowski
Copy link
Member Author

should I merge?

@IndrajeetPatil
Copy link
Member

should I merge?

Can you please have a look at the build failures? Workflows that are passing on the default branch are failing here.

@strengejacke
Copy link
Member

Is this new and probably related to the last changes?

✖ Quitting from lines 475-482 [unnamed-chunk-37] (parameters.Rmd)
Caused by error:
! in callr subprocess.
Caused by error:
! replacement has 4 rows, data has 150
Backtrace:
    ▆
 1. ├─base::plot(result)
 2. └─parameters:::plot.cluster_analysis(result)
 3.   ├─base::plot(datawizard::visualisation_recipe(x, ...)) at parameters/R/plot.R:75:3
 4.   ├─datawizard::visualisation_recipe(x, ...) at parameters/R/plot.R:75:3
 5.   └─parameters:::visualisation_recipe.cluster_analysis(x, ...)
 6.     ├─base::`$<-`(`*tmp*`, "Cluster", value = `<chr>`) at parameters/R/cluster_analysis.R:473:3
 7.     └─base::`$<-.data.frame`(`*tmp*`, "Cluster", value = `<chr>`) at parameters/R/cluster_analysis.R:473:3

@strengejacke
Copy link
Member

This error is a mystery to me.

Quitting from lines 284-294 [unnamed-chunk-22] (parameters.Rmd)
Error in `map()`:In index: 6.With name: vignettes/parameters.Rmd.
Caused by error in `seq_len()`:
! (converted from warning) first element used of 'length.out' argument
Backtrace:
 1. parameters::model_parameters(ma)
 2. parameters:::model_parameters.rma(ma)
      at parameters/R/1_model_parameters.R:301:3
 3. parameters:::.model_parameters_generic(...)
      at parameters/R/methods_metafor.R:76:3
    ...
      at parameters/R/1_model_parameters.R:622:3
 5. parameters:::.format_value_labels(params, model)
      at parameters/R/utils_model_parameters.R:62:3
 6. insight::get_data(model, source = "mf", verbose = FALSE)
      at parameters/R/format_parameters.R:372:5
Execution halted

@strengejacke
Copy link
Member

Else, there seem to be no other failing checks related to this PR.

@strengejacke strengejacke merged commit 5acfa64 into main Feb 2, 2024
23 of 26 checks passed
@strengejacke strengejacke deleted the plot_n_factors_percentagevariance branch February 2, 2024 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants