Articles

Affichage des articles du mars, 2026

xcrun produce an error during package compilation

 If you have this error: Avis dans system2("xcrun", "--show-sdk-version", TRUE, TRUE) :   l'exécution de la commande ''xcrun' --show-sdk-version 2>&1' renvoie un statut 1 using SDK: ‘NA’ based on  https://gist.github.com/Justintime50/2349ff5e62555aa097acbf519bbc27af You must reinstall Xcode: 1) Check if Xcode is installed xcode-select -print-path # If the output of the above command is not similar to the following line, Xcode is not installed. Skip to Step 3. # /Library/Developer/CommandLineTools 2) Remove Bad Xcode Installation # Remove Developer folder sudo rm -rf $( xcode-select -print-path ) # Remove CommandLineTools folder sudo rm -rf /Library/Developer/CommandLineTools 3) Install Xcode sudo xcode-select --install Messing with Xcode's Path If the above didn't resolve your issue, you may have a problem with the path Xcode is installed at. Use the following to help if necessary. # Switch Xcode's path sudo xcode-s...

Comparison using WAIC

  P ( Model 1 better than Model 2 ) = Φ ( elpd_diff ​/ se_diff) prob_model_better <- function(elpd_diff, se_diff) {   z <- elpd_diff / se_diff   p <- pnorm(z)   return(p) } elpd_diff <- 5 se_diff <- 3 prob_model_better ( elpd_diff , se_diff ) Result: [1] 0.952 So there is approximately  95% probability that model 1 predicts better than model 2 . It is  not  the probability that the model is  better  — only that its  predictive accuracy is higher . You can use also the function Probability_Best_Model_WAIC() in HelpersMG packages that uses original loo results to compare the predictive accuracy of several models.

When your autocorrelation becomes negative

The negative values appearing at larger lags in the sample autocorrelation function are usually not evidence of true negative dependence but arise from the finite-sample constraint that the estimated autocorrelations must balance around zero once the sample mean has been removed. Positive autocorrelation at small lags forces the estimated ACF at larger lags to become slightly negative  because the correlations must balance around zero in a finite sample .