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

low priority: bug in conversion #108

Open
egouldo opened this issue Aug 12, 2024 · 0 comments
Open

low priority: bug in conversion #108

egouldo opened this issue Aug 12, 2024 · 0 comments
Assignees
Labels
bug an unexpected problem or unintended behavior manuscript

Comments

@egouldo
Copy link
Owner

egouldo commented Aug 12, 2024

Local .Rprofile detected at /Users/elliotgould/Documents/GitHub/ManyEcoEvo/.Rprofile

library(tidyverse)
devtools::load_all()
#> ℹ Loading ManyEcoEvo
#> Loading required package: rmarkdown
#> 
#> Loading required package: bookdown
#> Warning: replacing previous import 'purrr::%@%' by 'rlang::%@%' when loading
#> 'ManyEcoEvo'
#> Warning: replacing previous import 'purrr::flatten_lgl' by 'rlang::flatten_lgl'
#> when loading 'ManyEcoEvo'
#> Warning: replacing previous import 'purrr::splice' by 'rlang::splice' when
#> loading 'ManyEcoEvo'
#> Warning: replacing previous import 'purrr::flatten_chr' by 'rlang::flatten_chr'
#> when loading 'ManyEcoEvo'
#> Warning: replacing previous import 'purrr::flatten_raw' by 'rlang::flatten_raw'
#> when loading 'ManyEcoEvo'
#> Warning: replacing previous import 'purrr::flatten' by 'rlang::flatten' when
#> loading 'ManyEcoEvo'
#> Warning: replacing previous import 'purrr::flatten_dbl' by 'rlang::flatten_dbl'
#> when loading 'ManyEcoEvo'
#> Warning: replacing previous import 'purrr::invoke' by 'rlang::invoke' when
#> loading 'ManyEcoEvo'
#> Warning: replacing previous import 'purrr::flatten_int' by 'rlang::flatten_int'
#> when loading 'ManyEcoEvo'
#> Warning: replacing previous import 'recipes::fixed' by 'stringr::fixed' when
#> loading 'ManyEcoEvo'
#> Registered S3 method overwritten by 'EnvStats':
#>   method         from
#>   print.estimate lava
#> Registered S3 method overwritten by 'parsnip':
#>   method          from 
#>   print.nullmodel vegan
data("ManyEcoEvo_yi")
blue_tit_predictions <- 
  ManyEcoEvo_yi %>% 
  dplyr::filter(dataset == "blue tit") %>% 
  pluck("data", 1) %>% 
  head()
blue_tit_back_transformed <- 
  blue_tit_predictions %>% 
  back_transform_response_vars_yi(estimate_type = "yi",
                                  dataset = "blue tit") %>% 
  ungroup %>% 
  select(
    id_col,
    response_variable_name,
    contains("transformation"),
    augmented_data, 
    back_transformed_data
  ) #TODO transformation column seems wrong! but output from convert_predictions() suggests correct transformation occured!
#> ✔ Applied back-transformation for squared effect sizes or out-of-sample predictions.
#> ✔ Applied back-transformation for squared effect sizes or out-of-sample predictions.
#> ✔ Applied back-transformation for squared effect sizes or out-of-sample predictions.
#> ✔ Applied back-transformation for squared effect sizes or out-of-sample predictions.
#> ✔ Applied back-transformation for squared effect sizes or out-of-sample predictions.
#> ✔ Applied back-transformation for squared effect sizes or out-of-sample predictions.
#> ℹ No back-transformation required, identity link used.
#> ℹ No back-transformation required, identity link used.
#> ℹ No back-transformation required, identity link used.
#> ℹ No back-transformation required, identity link used.
#> ℹ No back-transformation required, identity link used.
#> ℹ No back-transformation required, identity link used.
#> ℹ No back-transformation required, identity link used.
#> ℹ No back-transformation required, identity link used.
#> ℹ No back-transformation required, identity link used.
#> ℹ No back-transformation required, identity link used.
#> ℹ No back-transformation required, identity link used.
#> ℹ No back-transformation required, identity link used.

blue_tit_back_transformed %>% select(-ends_with("_data")) %>% knitr::kable()
id_col response_variable_name response_transformation_description response_transformation_status transformation transformation_type
Bega-1-1-1 day_14_weight power2 square identity square
Bega-2-2-1 day_14_tarsus_length power2 square identity square
Bell-2-2-1 day_14_tarsus_length NA NA identity identity
Berr-1-1-1 day_14_weight z.score identity identity identity
Burr-1-1-1 day_14_tarsus_length NA NA identity identity
Burr-2-2-1 day_14_weight NA NA identity identity

Created on 2024-08-13 with reprex v2.1.0

@egouldo egouldo added bug an unexpected problem or unintended behavior manuscript labels Aug 12, 2024
@egouldo egouldo added this to the Software Manuscript Submit milestone Aug 12, 2024
@egouldo egouldo self-assigned this Aug 12, 2024
@egouldo egouldo pinned this issue Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior manuscript
Projects
None yet
Development

No branches or pull requests

1 participant