spedygiorgio / mbbefd Goto Github PK
View Code? Open in Web Editor NEWDestruction rate modeling with the Maxwell Boltzmann Bose Einstein Fermi Dirac (MBBEFD) distribution
Destruction rate modeling with the Maxwell Boltzmann Bose Einstein Fermi Dirac (MBBEFD) distribution
Hi Giorgio,
I run into a problem with the function mbbefdExposure. It doesn’t seem to like parameter of c>4.1, in particular I can’t reproduce the Lloyd’s curve (c=5):
mbbefdExposure(0.5, b=swissRe(5.0)['b'], g=swissRe(5.0)['g'])
b
NaN
Warning messages:
1: In log(a + b^x) : NaNs produced
2: In log(a + b) : NaNs produced
I ended up writing the following function, taken from the Bernegger paper:
mbbefdCurve <- function(x, C){
g <- exp((0.78 + 0.12_C)C)
b <- exp(3.1 - 0.15(1+C)_C)
if(identical(g, 1) | identical(b, 0))
x
if(identical(b, 1) & g > 1)
log(1+(g-1)_x)/log(g)
if(identical(b_g, 1) & g>1)
(1-b^x)/(1-b)
else
log(((g-1)_b + (1-g_b)_b^x)/(1-b))/log(g_b)
}
Hi, Cran says:
so I would move all the help into roxygen2 files.
Dear maintainers,
This concerns CRAN packages maintained by one of you, see the long list
at the end of this message.
These packages document package metadata (specifically, package
versions) in their *-package Rd file(s) which have gotten out of sync
with the actual package metadata in the DESCRIPTION file.
Most likely, these Rd files were generated by older versions of
utils::promptPackage() (maybe via utils::package.skeleton()), which
generated package documentation shells/skeletons with copies of the
current package metadata. This was not a good idea, as inevitably such
copies go out of sync with their master values. The R 3.2.0 release
(3 years ago) did
A number of macros have been added in the new 'share/Rd' directory for
use in package overview help pages, and promptPackage() now makes use
of them.
(so that package documentation shells/skeletons generated with current
versions of utils::promptPackage() use Rd macro references to the
package metadata values instead of making copies).
Can you please bring package Rd files "up to date"? The simplest may be
using a current utils::promptPackage() to re-generate the
shell/skeleton, and merge with the content of the current package Rd
file. (In case the updated package Rd file would more or less only
duplicate the package metadata, feel free to drop the package Rd file
from your package sources.)
Best
-k
Maybe it has been already solved btw I copy and paste
Dear maintainer,
Presumably following a recent update of 'fitdistrplus', we now see
base::assign(".ptime", proc.time(), pos = "CheckExEnv")
Name: fitDR
Title: Fit of destruction rate models
Aliases: fitDR
Keywords: distribution
** Examples
(1) fit of a one-inflated beta distribution by maximum likelihood estimation
n <- 1e3
set.seed(12345)
x <- roibeta(n, 3, 2, 1/6)f1 <- fitDR(x, "oibeta", method="mle")
Warning in cbind(as.matrix(f1$vcov), rep(0, npar - 1)) :
number of rows of result is not a multiple of vector length (arg 2)
Warning in rbind(cbind(as.matrix(f1$vcov), rep(0, npar - 1)), c(rep(0, npar - :
number of columns of result is not a multiple of vector length (arg 2)
Error in fitDR(x, "oibeta", method = "mle") :
length of 'dimnames' [1] not equal to array extent
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... ERROR
Running the tests in ‘tests/test-beaonre.R’ failed.
Last 13 lines of output:
[1] "oistpareto"
[1] "oibeta"
Error in fitDR(x, d, method = "mle") :
length of 'dimnames' [1] not equal to array extent
Calls: lapply -> FUN -> fitDR
In addition: Warning messages:
1: In mledist(data, distname, start, fix.arg, ...) :
The BFGS method cannot be used with bounds without provided the gradient. The method is changed to L-BFGS-B.
2: In cov2cor(f1$vcov) :
diag(.) had 0 or NA entries; non-finite result is doubtful
3: In cbind(as.matrix(f1$vcov), rep(0, npar - 1)) :
number of rows of result is not a multiple of vector length (arg 2)
4: In rbind(cbind(as.matrix(f1$vcov), rep(0, npar - 1)), c(rep(0, npar - :
number of columns of result is not a multiple of vector length (arg 2)
Execution halted- checking for unstated dependencies in vignettes ... OK
- checking package vignettes in ‘inst/doc’ ... OK
- checking re-building of vignette outputs ... WARNING
Error in re-building vignettes:
...
Loading required package: fitdistrplus
Loading required package: MASS
Loading required package: survival
Loading required package: alabama
Loading required package: numDeriv
Package: mbbefd
Version: 0.8-0
Date: 2016-02-23 22:30:54
BugReport: http://github.com/spedygiorgio/mbbefd/issues
Warning in cbind(as.matrix(f1$vcov), rep(0, npar - 1)) :
number of rows of result is not a multiple of vector length (arg 2)
Warning in rbind(cbind(as.matrix(f1$vcov), rep(0, npar - 1)), c(rep(0, npar - :
number of columns of result is not a multiple of vector length (arg 2)
Quitting from lines 682-688 (Introduction_to_mbbefd.Rmd)
Error: processing vignette ‘Introduction_to_mbbefd.Rmd’ failed with diagnostics:
length of ‘dimnames’ [1] not equal to array extent
Execution halted
Hello
Thank you for the great package.
I think the formula for G(x) in 2.1.2 within https://cran.r-project.org/web/packages/mbbefd/vignettes/Introduction_to_mbbefd.pdf isn’t correct.
The correct formula, when reduced, is I think B(x,a+1,b)+x*(a+b)/a*(1-B(x,a,))
Hi all,
it could be nice to add ORCID links if you have one R-Bloggers on Orcid
Forthcoming release of 3.4 R has changed something in compiled code management. See this GitHub issue GitHub Rcpp
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.