Articles

Affichage des articles du février, 2022

Credible interval for median of Weibull distribution

Image
Alternative proposed by Varin Sacha using the package weibulltools  with delta method (a little bit modified to present only the median and the CI): library(weibulltools) x <- rweibull(100000, 2, 2) data <- reliability_data(x = x, status = 1)  ml <- ml_estimation(x = data, distribution = "weibull") conf <- confint_fisher(x = ml, b_lives = 0.5, direction = "x")  The results are: > as.numeric(conf[conf$prob == 0.5, c(4, 1, 5)]) [1] 1.657227 1.663275 1.669346 The true median was : > 2*log(2)^(1/2) [1] 1.665109 Let try if the average estimate by Fisher method for 1,000 samples is biased or not: library(weibulltools) library(pbmcapply) k <- pbmclapply(1:1000, FUN=function(i) { x <- rweibull(100000, 2, 2) data <- reliability_data(x = x, status = 1)  ml <- ml_estimation(x = data, distribution = "weibull") conf <- confint_fisher(x = ml, b_lives = 0.5, direction = "x")  return(as.numeric(conf[conf$prob == 0.5, 1])) }, mc.c

Information to compile packages

From a discussion in   I am attempting to build my package using devtools::build I have verified that both Rcpp and RcppArmadillo are working properly. However, when I build, I get the following error message  Error: package or namespace load failed for ‘HACSim’ in dyn.load(file, DLLpath = DLLpath, ...):     unable to load shared object '/private/var/folders/wv/4_z4h7ns57g7qvd600qgd__w0000gn/T/RtmpGe2Cqt/Rinst118e1e9f13a0/00LOCK-HACSim/00new/HACSim/libs/HACSim.so':  dlopen(/private/var/folders/wv/4_z4h7ns57g7qvd600qgd__w0000gn/T/RtmpGe2Cqt/Rinst118e1e9f13a0/00LOCK-HACSim/00new/HACSim/libs/HACSim.so, 6): Symbol not found: ___addtf3      Referenced from: /usr/local/lib/libquadmath.0.dylib      Expected in: /usr/local/lib/libgcc_s_x86_64.1.dylib     in /usr/local/lib/libquadmath.0.dylib    Error: loading failed    Execution halted    ERROR: loading failed ─  removing ‘/private/var/folders/wv/4_z4h7ns57g7qvd600qgd__w0000gn/T/RtmpGe2Cqt/Rinst118e1e9f13a0/HACSim’          -----------

Configure Rstudio server

 sudo vi /etc/rstudio/rserver.conf # Server Configuration File #  www-port=8080 rsession-which-r=usr/bin/R auth-timeout-minutes=0 auth-stay-signed-in-days=3000 Note that the option session-timeout-minutes=0 Does not work. Perhaps it is only for the pro version