R Under development (unstable) (2024-02-22 r85974 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > > require(OneStep) Loading required package: OneStep Loading required package: fitdistrplus Loading required package: MASS Loading required package: survival Loading required package: numDeriv Loading required package: parallel Loading required package: extraDistr > > n <- 1e3 > x <- rexp(n) > > try(onestep(matrix(x, 4, n/4), "exp")) Error in onestep(matrix(x, 4, n/4), "exp") : data must be a numeric vector of length greater than 1 > > try(onestep(x[1], "exp")) Error in onestep(x[1], "exp") : data must be a numeric vector of length greater than 1 > > try(onestep(x, "exp", method="jaimeleraisindetable")) Error in match.arg(method, c("closed formula", "numeric")) : 'arg' should be one of "closed formula", "numeric" > > try(onestep(x, "jaimeleraisindetable")) Error in onestep(x, "jaimeleraisindetable") : The djaimeleraisindetable function must be defined > > try(onestep(x, "exp", init=list(jaimeleraisindetable=1))) Error in checkparamlist(start.arg = init, fix.arg = NULL, argdistname = argddistname, : 'init' must specify names which are arguments to 'distr'. > > try(onestep(x, "exp", init=list(rate=1))) Parameters: estimate rate 0.946735 Warning message: In onestep_closedformula(obs = obs, distname = distname, control = con, : The initial estimate is not taken into account for this distribution > > try(onestep(x, "gamma", init=list(rate=1))) Error in checkparamlist(start.arg = init, fix.arg = NULL, argdistname = argddistname, : Some parameter names have no initial value: shape, scale. > > try(onestep(x, "gamma", init=list(shape=1))) Error in checkparamlist(start.arg = init, fix.arg = NULL, argdistname = argddistname, : Some parameter names have no initial value: rate, scale. > > proc.time() user system elapsed 0.75 0.14 0.87