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

bumbl() assumes there is a switchpoint, doesn't test for one #62

Open
Aariq opened this issue Apr 8, 2021 · 0 comments
Open

bumbl() assumes there is a switchpoint, doesn't test for one #62

Aariq opened this issue Apr 8, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@Aariq
Copy link
Owner

Aariq commented Apr 8, 2021

bumbl() might fail to find a switchpoint, but it also can find one when there clearly isn't one. For now I'll note this in the documentation, but in the future it would be good to test if the switchpoint model was a better fit than a line, perhaps.

library(bumbl)
library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
noswitch <- 
  bombus %>% 
  filter(colony == 9) %>% 
  mutate(d.mass = 0.1)

bumbl(noswitch, colonyID = colony, t = week, formula = d.mass ~ week)
#> # A tibble: 1 x 7
#>   colony converged   tau logN0    logLam    decay logNmax
#>   <chr>  <lgl>     <dbl> <dbl>     <dbl>    <dbl>   <dbl>
#> 1 9      TRUE       4.29 -2.30 -1.63e-16 1.77e-16   -2.30

Created on 2021-04-08 by the reprex package (v0.3.0)

@Aariq Aariq changed the title Add note that bumbl() assumes there is a switchpoint, doesn't test for one bumbl() assumes there is a switchpoint, doesn't test for one Apr 9, 2021
@Aariq Aariq added the enhancement New feature or request label Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant