Search results

  1. L

    JAGS error for MCMC Bayesian inference

    In R, I am running an MCMC Bayesian inference for data from mixture of Gamma distributions. JAGS is used here. The model file gmd.bug is as follows model { for (i in 1:N) { y[i] ~ dsum(p*one, (1-p)*two) } one ~ dgamma(alpha1, beta1) two ~ dgamma(alpha2, beta2) alpha1 ~ dunif(0, 10) beta1 ~...
  2. L

    Finding correlation for penalized regression in R

    I need to use the penalized models (lasso, ridge) for linear regression. In R, I use the "penalized" package. The output is a penfit object. If I want to find the in-sample and predictive correlation, how can I do that in R? Converting the penfit oject to glm maybe a good idea,but I don't...
  3. L

    Normality test

    I will use Normal probability plot or Shapiro-Wilk test for normality check. But is it that straightforward or there is some subtlety in this? Many Thanks