Stan

Please don’t mind this post. I use this to try out various highlighting styles for my code and formats.

\begin{algorithm}
\caption{Quicksort}
\begin{algorithmic}
\PROCEDURE{Quicksort}{$A, p, r$}
    \IF{$p < r$} 
        \STATE $q = $ \CALL{Partition}{$A, p, r$}
        \STATE \CALL{Quicksort}{$A, p, q - 1$}
        \STATE \CALL{Quicksort}{$A, q + 1, r$}
    \ENDIF
\ENDPROCEDURE
\PROCEDURE{Partition}{$A, p, r$}
    \STATE $x = A[r]$
    \STATE $i = p - 1$
    \FOR{$j = p$ \TO $r - 1$}
        \IF{$A[j] < x$}
            \STATE $i = i + 1$
            \STATE exchange
            $A[i]$ with $A[j]$
        \ENDIF
        \STATE exchange $A[i]$ with $A[r]$
    \ENDFOR
\ENDPROCEDURE
\end{algorithmic}
\end{algorithm}

This would render to


\begin{algorithm}
\caption{Quicksor1t}
\begin{algorithmic}
\PROCEDURE{Quicksort}{$y_{obs}, X_{obs},n_{1},(y_{obs}, X_{obs})$}
        \STATE Calculate cross-product matrix $S = X_{obs}$
        \STATE \CALL{Quicksort}{$A, p, q - 1$}
        \STATE \CALL{Quicksort}{$A, q + 1, r$}
    \ENDIF
\ENDPROCEDURE
\PROCEDURE{Partition}{$A, p, r$}
    \STATE $x = A[r]$
    \STATE $i = p - 1$
    \FOR{$j = p$ \TO $r - 1$}
        \IF{$A[j] < x$}
            \STATE $i = i + 1$
            \STATE exchange
            $A[i]$ with $A[j]$
        \ENDIF
        \STATE exchange $A[i]$ with $A[r]$
    \ENDFOR
\ENDPROCEDURE
\end{algorithmic}
\end{algorithm}

\begin{algorithm}
\caption{The original \textsf{Relief} algorithm for ranking predictor variables in classification models with two classes.}
\begin{algorithmic}
\STATE Initialize the predictor scores $S_j$ to zero;
\FOR{$i = 1\ldots m$ randomly selected training set samples ($R_i$)}
\STATE Find the nearest miss and hit in the training set;
\FOR{$j = 1\ldots p$ predictor variables}
   \STATE Adjust the score for each predictor  based on the proximity of $R_j$ to the nearest miss and hit:\\
   $S_j = S_j - diff_j(R_j, Hit)^2/m + diff_j(R_j, Miss)^2/m$;
\ENDFOR
\ENDFOR
\end{algorithmic}
\end{algorithm}
library(katex)
c <-  "Y^{\\operatorname{Post}} = \\beta_{0} + \\beta_{1}^{\\operatorname{Group}} + \\beta_{2}^{\\operatorname{Base}} + \\beta_{3}^{\\operatorname{Age}} + \\beta_{4}^{\\operatorname{Z}} + \\beta_{5}^{\\operatorname{R1}} + \\beta_{6}^{\\operatorname{R2}} + \\epsilon"
katex_html(c, displayMode = TRUE,
  include_css = TRUE)
YPost=β0+β1Group+β2Base+β3Age+β4Z+β5R1+β6R2+ϵY^{\operatorname{Post}} = \beta_{0} + \beta_{1}^{\operatorname{Group}} + \beta_{2}^{\operatorname{Base}} + \beta_{3}^{\operatorname{Age}} + \beta_{4}^{\operatorname{Z}} + \beta_{5}^{\operatorname{R1}} + \beta_{6}^{\operatorname{R2}} + \epsilon

\[Y^{\operatorname{Post}} = \beta_{0} + \beta_{1}^{\operatorname{Group}} + \beta_{2}^{\operatorname{Base}} + \beta_{3}^{\operatorname{Age}} + \beta_{4}^{\operatorname{Z}} + \beta_{5}^{\operatorname{R1}} + \beta_{6}^{\operatorname{R2}} + \epsilon\]


R Markdown


This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:


blogdown::shortcode('tweet', '852205086956818432')

blogdown::shortcode('youtube', '8SuDpRujc78')


Stan


/*  Variable naming:
 obs       = observed
 cen       = (right) censored
 N         = number of samples
 M         = number of covariates
 bg        = established risk (or protective) factors
 biom      = candidate biomarkers (candidate risk factors)
 tau       = scale parameter
*/
// Tomi Peltola, tomi.peltola@aalto.fi

functions {
  vector sqrt_vec(vector x) {
    vector[dims(x)[1]] res;

    for (m in 1:dims(x)[1]){
      res[m] <- sqrt(x[m]);
    }

    return res;
  }

  vector hs_prior_lp(real r1_global, real r2_global, 
  vector r1_local, vector r2_local, real nu) {
    r1_global ~ normal(0.0, 1.0);
    r2_global ~ inv_gamma(0.5, 0.5);

    r1_local ~ normal(0.0, 1.0);
    r2_local ~ inv_gamma(0.5 * nu, 0.5 * nu);

    return (r1_global * sqrt(r2_global)) * r1_local .* sqrt_vec(r2_local);
  }

  vector bg_prior_lp(real r_global, vector r_local) {
    r_global ~ normal(0.0, 10.0);
    r_local ~ inv_chi_square(1.0);

    return r_global * sqrt_vec(r_local);
  }
}

data {
  int<lower=0> Nobs;
  int<lower=0> Ncen;
  int<lower=0> M_bg;
  int<lower=0> M_biom;
  vector[Nobs] yobs;
  vector[Ncen] ycen;
  matrix[Nobs, M_bg] Xobs_bg;
  matrix[Ncen, M_bg] Xcen_bg;
  matrix[Nobs, M_biom] Xobs_biom;
  matrix[Ncen, M_biom] Xcen_biom;
  real<lower=1> nu;
}

transformed data {
  real<lower=0> tau_mu;
  real<lower=0> tau_al;

  tau_mu <- 10.0;
  tau_al <- 10.0;
}

parameters {
  real<lower=0> tau_s_bg_raw;
  vector<lower=0>[M_bg] tau_bg_raw;

  real<lower=0> tau_s1_biom_raw;
  real<lower=0> tau_s2_biom_raw;
  vector<lower=0>[M_biom] tau1_biom_raw;
  vector<lower=0>[M_biom] tau2_biom_raw;

  real alpha_raw;
  vector[M_bg] beta_bg_raw;
  vector[M_biom] beta_biom_raw;

  real mu;
}

transformed parameters {
  vector[M_biom] beta_biom;
  vector[M_bg] beta_bg;
  real alpha;

  beta_biom <- hs_prior_lp(tau_s1_biom_raw, 
  tau_s2_biom_raw, tau1_biom_raw, tau2_biom_raw, nu) .* beta_biom_raw;
  beta_bg <- bg_prior_lp(tau_s_bg_raw, tau_bg_raw) .* beta_bg_raw;
  alpha <- exp(tau_al * alpha_raw);
}

model {
  yobs ~ weibull(alpha, exp(-(mu + Xobs_bg * 
  beta_bg + Xobs_biom * beta_biom)/alpha));
  increment_log_prob(weibull_ccdf_log(ycen, alpha, 
  exp(-(mu + Xcen_bg * beta_bg + Xcen_biom * beta_biom)/alpha)));

  beta_biom_raw ~ normal(0.0, 1.0);
  beta_bg_raw ~ normal(0.0, 1.0);
  alpha_raw ~ normal(0.0, 1.0);

  mu ~ normal(0.0, tau_mu);
}

data {
  int<lower=1> N;
  int<lower=1> J;
  int<lower=1> K;
  int condition[N];
  int idx[N];
  vector[N] prob;
  vector[N] prompt;
  vector[3] a;
}
parameters {
  simplex[3] phi;
  real<lower=0> mu[J];
  real<lower=0> sigma[J];
  matrix[K,J] mu_idx;
  matrix<lower=0>[K,J] sigma_idx;
  real<lower=0> sigma_mu[J];
  real<lower=0> sigma_sigma[J];
}
transformed parameters {
  vector[N] y;
  vector[N] alpha;
  vector[N] beta;
  vector[K] e_mu;
  vector[K] e_sigma;
  
  for (n in 1:N) {
    y[n] = Phi((prompt[n] - mu_idx[idx[n], condition[n]]) / 
    sigma_idx[idx[n], condition[n]]);
    alpha[n] = sigma_idx[idx[n], condition[n]] * y[n];
    beta[n] = sigma_idx[idx[n], condition[n]] * (1.0 - y[n]);
  }

  for (k in 1:K) {
    e_mu[k] = mu_idx[k,1] - mu[1];
    e_sigma[k] = sigma_idx[k,1] - sigma[1];
  }
}
model {
  phi ~ dirichlet(a);
  mu ~ normal(0,1);
  sigma ~ normal(0,1);
  sigma_mu ~ normal(0,1);
  sigma_sigma ~ normal(0,1);
  for (k in 1:K) {
    for (j in 1:J) {
      mu_idx[k,j] ~ normal(mu[j], sigma_mu[j]);
      sigma_idx[k,j] ~ normal(sigma[j], sigma_sigma[j]);
    }
  }
  for (n in 1:N) {
    if (prob[n] == 0) {
      target += bernoulli_lpmf(1 | phi[1]); 
    }
    else if (prob[n] == 1) {
      target += bernoulli_lpmf(1 | phi[2]); 
    }
    else {
      target += bernoulli_lpmf(1 | phi[3]) + 
      beta_lpdf(prob[n] | alpha[n], beta[n]); 
    }
  }
}

Python


from pandas import DataFrame
Error in py_call_impl(callable, dots$args, dots$keywords): ModuleNotFoundError: No module named 'pandas'

Detailed traceback:
  File "<string>", line 1, in <module>
  File "/Users/zad/Dropbox/LessLikely/renv/library/R-4.1/aarch64-apple-darwin20/reticulate/python/rpytools/loader.py", line 39, in _import_hook
    module = _import(
import statsmodels.api as sm
Error in py_call_impl(callable, dots$args, dots$keywords): ModuleNotFoundError: No module named 'statsmodels'

Detailed traceback:
  File "<string>", line 1, in <module>
  File "/Users/zad/Dropbox/LessLikely/renv/library/R-4.1/aarch64-apple-darwin20/reticulate/python/rpytools/loader.py", line 39, in _import_hook
    module = _import(
Stock_Market = {'Year': [2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2016,2016,2016,2016,2016,2016,2016,2016,2016,2016,2016,2016],
                'Month': [12, 11,10,9,8,7,6,5,4,3,2,1,12,11,10,9,8,7,6,5,4,3,2,1],
                'Interest_Rate': [2.75,2.5,2.5,2.5,2.5,2.5,2.5,2.25,2.25,2.25,2,2,2,1.75,1.75,1.75,1.75,1.75,1.75,1.75,1.75,1.75,1.75,1.75],
                'Unemployment_Rate': [5.3,5.3,5.3,5.3,5.4,5.6,5.5,5.5,5.5,5.6,5.7,5.9,6,5.9,5.8,6.1,6.2,6.1,6.1,6.1,5.9,6.2,6.2,6.1],
                'Stock_Index_Price': [1464,1394,1357,1293,1256,1254,1234,1195,1159,1167,1130,1075,1047,965,943,958,971,949,884,866,876,822,704,719]        
                }

df = DataFrame(Stock_Market,columns=['Year','Month','Interest_Rate','Unemployment_Rate','Stock_Index_Price']) 
Error in py_call_impl(callable, dots$args, dots$keywords): NameError: name 'DataFrame' is not defined

Detailed traceback:
  File "<string>", line 1, in <module>
X = df[['Interest_Rate','Unemployment_Rate']] # here we have 2 variables for the multiple linear regression. If you just want to use one variable for simple linear regression, then use X = df['Interest_Rate'] for example
Error in py_call_impl(callable, dots$args, dots$keywords): NameError: name 'df' is not defined

Detailed traceback:
  File "<string>", line 1, in <module>
Y = df['Stock_Index_Price']
Error in py_call_impl(callable, dots$args, dots$keywords): NameError: name 'df' is not defined

Detailed traceback:
  File "<string>", line 1, in <module>
X = sm.add_constant(X) # adding a constant
Error in py_call_impl(callable, dots$args, dots$keywords): NameError: name 'sm' is not defined

Detailed traceback:
  File "<string>", line 1, in <module>
model = sm.OLS(Y, X).fit()
Error in py_call_impl(callable, dots$args, dots$keywords): NameError: name 'sm' is not defined

Detailed traceback:
  File "<string>", line 1, in <module>
predictions = model.predict(X) 
Error in py_call_impl(callable, dots$args, dots$keywords): NameError: name 'model' is not defined

Detailed traceback:
  File "<string>", line 1, in <module>
print_model = model.summary()
Error in py_call_impl(callable, dots$args, dots$keywords): NameError: name 'model' is not defined

Detailed traceback:
  File "<string>", line 1, in <module>
print(print_model)

Error in py_call_impl(callable, dots$args, dots$keywords): NameError: name 'print_model' is not defined

Detailed traceback:
  File "<string>", line 1, in <module>

R


fit <- lm(mpg ~ cyl + disp, mtcars)
# show the theoretical model
equatiomatic::extract_eq(fit)

Stata


sysuse auto2, clear
mfp: glm price mpg
twoway (fpfitci price mpg, estcmd(glm) fcolor(dkorange%20) alcolor(%40))  || scatter price mpg, mcolor(dkorange) scale(0.75)
graph export "mfp.png", replace
Deviance for model with all terms untransformed = 1373.079, 74 observations

Variable     Model (vs.)   Deviance  Dev diff.   P      Powers   (vs.)
----------------------------------------------------------------------
mpg          Lin.   FP2    1373.079    19.565  0.000+   1         -2 -2
             FP1           1356.927     3.413  0.182    -2        
             Final         1356.927                     -2


Transformations of covariates:

-> gen double Impg__1 = X^-2-.2204707671 if e(sample) 
   (where: X = mpg/10)

Final multivariable fractional polynomial model for price
--------------------------------------------------------------------
    Variable |    -----Initial-----          -----Final-----
             |   df     Select   Alpha    Status    df    Powers
-------------+------------------------------------------------------
         mpg |    4     1.0000   0.0500     in      2     -2
--------------------------------------------------------------------

Generalized linear models                         Number of obs   =         74
Optimization     : ML                             Residual df     =         72
                                                  Scale parameter =    5533697
Deviance         =  398426217.4                   (1/df) Deviance =    5533697
Pearson          =  398426217.4                   (1/df) Pearson  =    5533697

Variance function: V(u) = 1                       [Gaussian]
Link function    : g(u) = u                       [Identity]

                                                  AIC             =    18.3909
Log likelihood   = -678.4632599                   BIC             =   3.98e+08

------------------------------------------------------------------------------
             |                 OIM
       price | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     Impg__1 |   13163.85   2013.016     6.54   0.000      9218.41    17109.29
       _cons |   5538.395   289.7737    19.11   0.000     4970.449    6106.341
------------------------------------------------------------------------------
Deviance = 1356.927.


file /Users/zad/Dropbox/LessLikely/content/post/statistics/mfp.png saved as
    PNG format
version
clear
set obs 100
/**
Generate variables from a normal distribution like before
*/
generate x = rnormal(0, 1)
generate y = rnormal(0, 1)
/**
We set up our model here 
*/
bayesmh y x, likelihood(normal({var})) prior({var}, normal(0, 10)) ///
prior({y:}, normal(0, 10)) rseed(1031) saving(coutput_pred, replace) mcmcsize(1000)
/**
We use the bayespredict command to make predictions from the model
*/
bayespredict (mean:@mean({_resid})) (var:@variance({_resid})), ///
rseed(1031) saving(coutput_pred, replace) 
/**
Then we calculate the posterior predictive P-values
*/
bayesstats ppvalues {mean} using coutput_pred
Number of observations (_N) was 0, now 100.



  
Burn-in ...
Simulation ...

Model summary
------------------------------------------------------------------------------
Likelihood: 
  y ~ normal(xb_y,{var})

Priors: 
  {y:x _cons} ~ normal(0,10)                                               (1)
        {var} ~ normal(0,10)
------------------------------------------------------------------------------
(1) Parameters are elements of the linear form xb_y.

Bayesian normal regression                       MCMC iterations  =      3,500
Random-walk Metropolis–Hastings sampling         Burn-in          =      2,500
                                                 MCMC sample size =      1,000
                                                 Number of obs    =        100
                                                 Acceptance rate  =      .1758
                                                 Efficiency:  min =     .06502
                                                              avg =     .08702
Log marginal-likelihood = -148.23414                          max =      .1192
 
------------------------------------------------------------------------------
             |                                                Equal-tailed
             |      Mean   Std. dev.     MCSE     Median  [95% cred. interval]
-------------+----------------------------------------------------------------
y            |
           x |  .0755581   .1033197   .012813   .0920823  -.1139972   .2535904
       _cons |  .0764099   .1028003   .011731   .0768325  -.1117462   .2936906
-------------+----------------------------------------------------------------
         var |  .9489507   .1378202   .012621   .9255239   .7467658   1.289911
------------------------------------------------------------------------------

file coutput_pred.dta saved.


Computing predictions ...

file coutput_pred.dta saved.
file coutput_pred.ster saved.


Posterior predictive summary   MCMC sample size =     1,000

-----------------------------------------------------------
           T |      Mean   Std. dev.  E(T_obs)  P(T>=T_obs)
-------------+---------------------------------------------
        mean |  .0003456   .0937852   .0027069         .486
-----------------------------------------------------------
Note: P(T>=T_obs) close to 0 or 1 indicates lack of fit.
─ Session info ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.1.3 (2022-03-10)
 os       macOS Monterey 12.3
 system   aarch64, darwin20
 ui       X11
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       America/New_York
 date     2022-03-14
 pandoc   2.17.1.1 @ /Applications/RStudio.app/Contents/MacOS/quarto/bin/ (via rmarkdown)

─ Packages ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 ! package           * version   date (UTC) lib source
 P abind               1.4-5     2016-07-21 [?] CRAN (R 4.1.0)
 P assertthat          0.2.1     2019-03-21 [?] CRAN (R 4.1.0)
 P backports           1.4.1     2021-12-13 [?] CRAN (R 4.1.1)
 P base64enc           0.1-3     2015-07-28 [?] CRAN (R 4.1.0)
 P bcaboot             0.2-3     2021-05-09 [?] CRAN (R 4.1.0)
 P blogdown            1.8.1     2022-02-18 [?] Github (rstudio/blogdown@2bc20aa)
 P bookdown            0.24      2021-09-02 [?] CRAN (R 4.1.1)
   boot                1.3-28    2021-05-03 [2] CRAN (R 4.1.3)
 P brio                1.1.3     2021-11-30 [?] CRAN (R 4.1.1)
   broom               0.7.12    2022-01-28 [1] CRAN (R 4.1.1)
 P bslib               0.3.1     2021-10-06 [?] CRAN (R 4.1.1)
 P cachem              1.0.6     2021-08-19 [?] CRAN (R 4.1.1)
 P callr               3.7.0     2021-04-20 [?] CRAN (R 4.1.0)
 P car                 3.0-12    2021-11-06 [?] CRAN (R 4.1.1)
 P carData             3.0-5     2022-01-06 [?] CRAN (R 4.1.1)
 P cli                 3.2.0     2022-02-14 [?] CRAN (R 4.1.2)
   codetools           0.2-18    2020-11-04 [2] CRAN (R 4.1.3)
 P colorspace          2.0-3     2022-02-21 [?] CRAN (R 4.1.1)
 P concurve          * 2.7.7     2020-10-12 [?] CRAN (R 4.1.0)
 P crayon              1.5.0     2022-02-14 [?] CRAN (R 4.1.2)
 P curl                4.3.2     2021-06-23 [?] CRAN (R 4.1.0)
 P data.table          1.14.2    2021-09-27 [?] CRAN (R 4.1.1)
 P DBI                 1.1.2     2021-12-20 [?] CRAN (R 4.1.1)
 P desc                1.4.0     2021-09-28 [?] CRAN (R 4.1.1)
 P devtools            2.4.3     2021-11-30 [?] CRAN (R 4.1.1)
 P digest              0.6.29    2021-12-01 [?] CRAN (R 4.1.1)
 P dplyr               1.0.8     2022-02-08 [?] CRAN (R 4.1.1)
 P ellipsis            0.3.2     2021-04-29 [?] CRAN (R 4.1.0)
 P evaluate            0.15      2022-02-18 [?] CRAN (R 4.1.1)
 P fansi               1.0.2     2022-01-14 [?] CRAN (R 4.1.1)
 P fastmap             1.1.0     2021-01-25 [?] CRAN (R 4.1.0)
 P flextable           0.6.10    2021-11-15 [?] CRAN (R 4.1.1)
 P fs                  1.5.2     2021-12-08 [?] CRAN (R 4.1.1)
 P gdtools             0.2.4     2022-02-14 [?] CRAN (R 4.1.1)
   generics            0.1.2     2022-01-31 [1] CRAN (R 4.1.1)
   ggplot2           * 3.3.5     2021-06-25 [1] CRAN (R 4.1.1)
 P ggpubr              0.4.0     2020-06-27 [?] CRAN (R 4.1.0)
 P ggsignif            0.6.3     2021-09-09 [?] CRAN (R 4.1.1)
 P glue                1.6.1     2022-01-22 [?] CRAN (R 4.1.2)
 P gridExtra           2.3       2017-09-09 [?] CRAN (R 4.1.1)
 P gtable              0.3.0     2019-03-25 [?] CRAN (R 4.1.1)
 P htmltools           0.5.2     2021-08-25 [?] CRAN (R 4.1.1)
 P httr                1.4.2     2020-07-20 [?] CRAN (R 4.1.0)
 P inline              0.3.19    2021-05-31 [?] CRAN (R 4.1.0)
 P jquerylib           0.1.4     2021-04-26 [?] CRAN (R 4.1.0)
   jsonlite            1.8.0     2022-02-22 [1] CRAN (R 4.1.3)
 P JuliaCall         * 0.17.4    2021-05-16 [?] CRAN (R 4.1.0)
 P kableExtra        * 1.3.4     2021-02-20 [?] CRAN (R 4.1.1)
   katex             * 1.4.0     2022-02-08 [1] CRAN (R 4.1.1)
 P km.ci               0.5-2     2009-08-30 [?] CRAN (R 4.1.0)
 P KMsurv              0.1-5     2012-12-03 [?] CRAN (R 4.1.0)
   knitr               1.37      2021-12-16 [1] CRAN (R 4.1.1)
   lattice             0.20-45   2021-09-22 [2] CRAN (R 4.1.3)
 P lifecycle           1.0.1     2021-09-24 [?] CRAN (R 4.1.1)
   loo                 2.4.1     2020-12-09 [2] CRAN (R 4.1.0)
   magrittr            2.0.2     2022-01-26 [1] CRAN (R 4.1.1)
 P mathjaxr            1.4-0     2021-03-01 [?] CRAN (R 4.1.0)
   Matrix              1.4-0     2021-12-08 [2] CRAN (R 4.1.3)
 P matrixStats         0.61.0    2021-09-17 [?] CRAN (R 4.1.1)
 P memoise             2.0.1     2021-11-26 [?] CRAN (R 4.1.1)
 P metafor             3.0-2     2021-06-09 [?] CRAN (R 4.1.0)
 P munsell             0.5.0     2018-06-12 [?] CRAN (R 4.1.0)
   nlme                3.1-155   2022-01-16 [2] CRAN (R 4.1.3)
 P officer             0.4.1     2021-11-14 [?] CRAN (R 4.1.1)
 P pbmcapply           1.5.0     2019-07-10 [?] CRAN (R 4.1.0)
   pillar              1.7.0     2022-02-01 [1] CRAN (R 4.1.1)
   pkgbuild            1.3.1     2021-12-20 [1] CRAN (R 4.1.1)
 P pkgconfig           2.0.3     2019-09-22 [?] CRAN (R 4.1.0)
 P pkgload             1.2.4     2021-11-30 [?] CRAN (R 4.1.1)
 P png                 0.1-7     2013-12-03 [?] CRAN (R 4.1.0)
 P prettyunits         1.1.1     2020-01-24 [?] CRAN (R 4.1.0)
 P processx            3.5.2     2021-04-30 [?] CRAN (R 4.1.0)
 P ProfileLikelihood   1.1       2011-11-19 [?] CRAN (R 4.1.0)
 P ps                  1.6.0     2021-02-28 [?] CRAN (R 4.1.0)
 P purrr               0.3.4     2020-04-17 [?] CRAN (R 4.1.0)
 P R6                  2.5.1     2021-08-19 [?] CRAN (R 4.1.1)
   Rcpp              * 1.0.8.2   2022-03-11 [2] CRAN (R 4.1.2)
   RcppEigen         * 0.3.3.9.1 2020-12-17 [2] CRAN (R 4.1.0)
   RcppParallel        5.1.5     2022-01-05 [1] CRAN (R 4.1.1)
 P remotes             2.4.2     2021-11-30 [?] CRAN (R 4.1.1)
 P renv                0.15.4    2022-03-03 [?] CRAN (R 4.1.1)
   reticulate        * 1.24      2022-01-26 [1] CRAN (R 4.1.1)
   rlang               1.0.1     2022-02-03 [1] CRAN (R 4.1.1)
 P rmarkdown           2.11      2021-09-14 [?] CRAN (R 4.1.1)
 P rprojroot           2.0.2     2020-11-15 [?] CRAN (R 4.1.0)
   rstan             * 2.21.3    2021-12-19 [2] CRAN (R 4.1.1)
 P rstatix             0.7.0     2021-02-13 [?] CRAN (R 4.1.0)
 P rstudioapi          0.13      2020-11-12 [?] CRAN (R 4.1.0)
 P rvest               1.0.2     2021-10-16 [?] CRAN (R 4.1.1)
 P sass                0.4.0     2021-05-12 [?] CRAN (R 4.1.0)
 P scales              1.1.1     2020-05-11 [?] CRAN (R 4.1.0)
 P sessioninfo         1.2.2     2021-12-06 [?] CRAN (R 4.1.1)
   StanHeaders       * 2.21.0-7  2020-12-17 [2] CRAN (R 4.1.2)
 P Statamarkdown     * 0.7.0     2022-01-25 [?] Github (hemken/Statamarkdown@a68a8b9)
 P stringi             1.7.6     2021-11-29 [?] CRAN (R 4.1.1)
 P stringr             1.4.0     2019-02-10 [?] CRAN (R 4.1.1)
   survival            3.2-13    2021-08-24 [2] CRAN (R 4.1.3)
 P survminer           0.4.9     2021-03-09 [?] CRAN (R 4.1.1)
 P survMisc            0.5.5     2018-07-05 [?] CRAN (R 4.1.0)
 P svglite             2.1.0     2022-02-03 [?] CRAN (R 4.1.1)
   systemfonts         1.0.4     2022-02-11 [1] CRAN (R 4.1.1)
 P testthat            3.1.2     2022-01-20 [?] CRAN (R 4.1.2)
 P tibble              3.1.6     2021-11-07 [?] CRAN (R 4.1.1)
   tidyr               1.2.0     2022-02-01 [1] CRAN (R 4.1.1)
 P tidyselect          1.1.2     2022-02-21 [?] CRAN (R 4.1.1)
 P usethis             2.1.5     2021-12-09 [?] CRAN (R 4.1.1)
 P utf8                1.2.2     2021-07-24 [?] CRAN (R 4.1.0)
 P uuid                1.0-3     2021-11-01 [?] CRAN (R 4.1.1)
   V8                  4.1.0     2022-02-06 [1] CRAN (R 4.1.1)
 P vctrs               0.3.8     2021-04-29 [?] CRAN (R 4.1.0)
 P viridisLite         0.4.0     2021-04-13 [?] CRAN (R 4.1.0)
 P webshot             0.5.2     2019-11-22 [?] CRAN (R 4.1.0)
   withr               2.5.0     2022-03-03 [1] CRAN (R 4.1.1)
 P xfun                0.29      2021-12-14 [?] CRAN (R 4.1.1)
 P xml2                1.3.3     2021-11-30 [?] CRAN (R 4.1.1)
 P xtable              1.8-4     2019-04-21 [?] CRAN (R 4.1.0)
 P yaml                2.3.5     2022-02-21 [?] CRAN (R 4.1.1)
 P zip                 2.2.0     2021-05-31 [?] CRAN (R 4.1.0)
 P zoo                 1.8-9     2021-03-09 [?] CRAN (R 4.1.0)

 [1] /Users/zad/Dropbox/LessLikely/renv/library/R-4.1/aarch64-apple-darwin20
 [2] /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library

 P ── Loaded and on-disk path mismatch.

─ Python configuration ─────────────────────────────────────────────────────────────────────────────────────────────────────────
 python:         /usr/bin/python3
 libpython:      /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/config-3.8-darwin/libpython3.8.dylib
 pythonhome:     /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8:/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8
 version:        3.8.9 (default, Oct 26 2021, 07:25:53)  [Clang 13.0.0 (clang-1300.0.29.30)]
 numpy:           [NOT FOUND]
 
 NOTE: Python version was forced by RETICULATE_PYTHON

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────


Help support the website!






See also: