==1931219== Memcheck, a memory error detector ==1931219== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==1931219== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info ==1931219== Command: /data/blackswan/ripley/R/R-devel-vg/bin/exec/R --vanilla --encoding=UTF-8 ==1931219== R Under development (unstable) (2020-09-23 r79246) -- "Unsuffered Consequences" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) 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. Natural language support but running in an English locale 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. > pkgname <- "rsBayes" > source(file.path(R.home("share"), "R", "examples-header.R")) > options(warn = 1) > library('rsBayes') > > base::assign(".oldSearch", base::search(), pos = 'CheckExEnv') > base::assign(".old_wd", base::getwd(), pos = 'CheckExEnv') > cleanEx() > nameEx("pheno") > ### * pheno > > flush(stderr()); flush(stdout()) > > ### Name: pheno > ### Title: Generates posterior samples from a phenology model > ### Aliases: pheno > > ### ** Examples > > > ##select a single pixel and a few years > df <- subset(aoi_hls, pixel == 1 & year %in% c(2017,2018,2019)) > plot(df$doy, df$evi) > > set.seed(1) > > m.beta <- pheno(evi~doy, data=df, family="beta", + starting=list(alpha.1=0.1, alpha.2=0.5, alpha.3=0.25, + alpha.4=50, alpha.5=0.0001, alpha.6 = 0.25, alpha.7=200, sigma.sq=0.01), + tuning=list(alpha.1=0.001, alpha.2=0.01, alpha.3=0.001, + alpha.4=0.1, alpha.5=0.00005, alpha.6=0.001, alpha.7=0.5, sigma.sq=0.1), + n.samples=50000, n.report=25000, + priors=list(alpha=list(alpha.5=c(-1, 1)), sigma.sq.IG=c(2, 0.01)), + fitted = TRUE, sub.sample=list("start"=25000) + ) Modifying default prior for alpha.5 ---------------------------------------- Model description ---------------------------------------- Model fit with 60 observations. Beta likelihood Number of MCMC samples 50000. Parameter, starting, tuning, prior: alpha.1, 0.10000, 0.00100, Unif(0.00000, 1.00000) alpha.2, 0.50000, 0.01000, Unif(0.00000, 0.90000) alpha.3, 0.25000, 0.00100, Unif(0.00000, 1.00000) alpha.4, 50.00000, 0.10000, Unif(1.00000, 200.00000) alpha.5, 0.00010, 0.00005, Unif(-1.00000, 1.00000) alpha.6, 0.25000, 0.00100, Unif(0.00000, 1.00000) alpha.7, 200.00000, 0.50000, Unif(1.00000, 366.00000) phi, 0.01000, 0.10000, IG(2.00000, 0.01000) ==1931219== Invalid read of size 8 ==1931219== at 0x16EDF582: phenoMod0 (packages/tests-vg/rsBayes/src/phenoMod0.cpp:79) ==1931219== by 0x49CB6D: R_doDotCall (svn/R-devel/src/main/dotcode.c:683) ==1931219== by 0x49D2A3: do_dotcall (svn/R-devel/src/main/dotcode.c:1281) ==1931219== by 0x4D2BE6: bcEval (svn/R-devel/src/main/eval.c:7121) ==1931219== by 0x4EF6F7: Rf_eval (svn/R-devel/src/main/eval.c:727) ==1931219== by 0x4F110D: R_execClosure (svn/R-devel/src/main/eval.c:1895) ==1931219== by 0x4F1E03: Rf_applyClosure (svn/R-devel/src/main/eval.c:1821) ==1931219== by 0x4EF8C3: Rf_eval (svn/R-devel/src/main/eval.c:850) ==1931219== by 0x4F3B99: do_set (svn/R-devel/src/main/eval.c:2967) ==1931219== by 0x4EFB44: Rf_eval (svn/R-devel/src/main/eval.c:802) ==1931219== by 0x52027C: Rf_ReplIteration (svn/R-devel/src/main/main.c:264) ==1931219== by 0x5205C7: R_ReplConsole (svn/R-devel/src/main/main.c:314) ==1931219== Address 0x108fad80 is 3,472 bytes inside a block of size 7,960 alloc'd ==1931219== at 0x483A809: malloc (/builddir/build/BUILD/valgrind-3.16.1/coregrind/m_replacemalloc/vg_replace_malloc.c:307) ==1931219== by 0x52A8C0: GetNewPage (svn/R-devel/src/main/memory.c:946) ==1931219== by 0x52C4FB: Rf_allocVector3 (svn/R-devel/src/main/memory.c:2784) ==1931219== by 0x588B7C: Rf_allocVector (svn/R-devel/src/include/Rinlinedfuns.h:593) ==1931219== by 0x588B7C: ReadBCConsts (svn/R-devel/src/main/serialize.c:2083) ==1931219== by 0x588B7C: ReadBC1 (svn/R-devel/src/main/serialize.c:2119) ==1931219== by 0x587F69: ReadBC (svn/R-devel/src/main/serialize.c:2130) ==1931219== by 0x587F69: ReadItem (svn/R-devel/src/main/serialize.c:1967) ==1931219== by 0x586FA1: ReadItem (svn/R-devel/src/main/serialize.c:1874) ==1931219== by 0x586F84: ReadItem (svn/R-devel/src/main/serialize.c:1872) ==1931219== by 0x586FA1: ReadItem (svn/R-devel/src/main/serialize.c:1874) ==1931219== by 0x586FA1: ReadItem (svn/R-devel/src/main/serialize.c:1874) ==1931219== by 0x586FA1: ReadItem (svn/R-devel/src/main/serialize.c:1874) ==1931219== by 0x586FA1: ReadItem (svn/R-devel/src/main/serialize.c:1874) ==1931219== by 0x586FA1: ReadItem (svn/R-devel/src/main/serialize.c:1874) ==1931219== ---------------------------------------- Sampling ---------------------------------------- Sampled: 25000 of 50000, 50.00% Report interval Metrop. Acceptance rate: 61.03% Overall Metrop. Acceptance rate: 61.03% ------------------------------------------------- > > summary(m.beta) Chain sub.sample: start = 1 end = 25001 thin = 1 samples size = 25001 2.5% 25% 50% 75% 97.5% alpha.1 0.0966 0.1330 0.1514 0.1666 0.1821 alpha.2 0.0004 0.0050 0.0123 0.0239 0.0620 alpha.3 0.2114 0.2289 0.2722 0.2873 0.3108 alpha.4 60.5711 62.9787 64.3252 66.6454 70.1263 alpha.5 -0.0025 -0.0022 -0.0021 -0.0019 -0.0017 alpha.6 0.0321 0.0409 0.0467 0.0531 0.0663 alpha.7 275.3621 279.6584 282.5150 285.5362 292.7609 sigma.sq 0.0239 0.0298 0.0338 0.0383 0.0491 > > > > > ### *