epiverse-trace / epiverse-trace/quickfit
Functionality vs. existing implementations
- Dominant language
- R
- Stars
- 1
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Some of the functionality as outlined in the README of the `init_setup` branch already exists in some form elsewhere - it might be worth adding a note for the specific use case the package aiming to address.
``` r
library("stats4")
sim_data <- rnorm(50, 4, 2)
log_l <- function(a,b) -sum(dnorm(sim_data, a, b, log = TRUE))
x <- stats4::mle(log_l, start = list(a = 3, b = 1))
#> Warning in dnorm(sim_data, a, b, log = TRUE): NaNs produced
confint(x)
#> Profiling...
#> 2.5 % 97.5 %
#> a 3.131020 4.365399
#> b 1.817015 2.693398
library("gamlss")
#> Loading required package: splines
#> Loading required package: gamlss.data
#>
#> Attaching package: 'gamlss.data'
#> The following object is masked from 'package:datasets':
#>
#> sleep
#> Loading required package: gamlss.dist
#> Loading required package: nlme
#> Loading required package: parallel
#> ********** GAMLSS Version 5.4-20 **********
#> For more on GAMLSS look at https://www.gamlss.com/
#> Type gamlssNews() to see new features/changes/bug fixes.
y <- gamlss::fitDist(
y = rlnorm(n = 100, meanlog = 1, sdlog = 1),
k = 2, type = "realplus", trace = FALSE
)
#> | | | 0% | |=== | 4% | |====== | 9% | |========= | 13% | |============ | 17% | |=============== | 22% | |================== | 26% | |===================== | 30% | |======================== | 35% | |=========================== | 39% | |============================== | 43% | |================================= | 48% | |===================================== | 52% | |======================================== | 57% | |=========================================== | 61% | |============================================== | 65% | |================================================= | 70% | |==================================================== | 74% | |======================================================= | 78% | |========================================================== | 83% | |============================================================= | 87% | |================================================================ | 91% | |=================================================================== | 96% | |======================================================================| 100%
confint(y)
#> 2.5 % 97.5 %
#> mu 0.9388532 1.3418009
#> sigma -0.1110271 0.1661535
```
Created on 2023-11-20 with [reprex v2.0.2](https://reprex.tidyverse.org)
Contributor guide
Assessment
This issue has not been assessed yet.