Hi,
I’m new here and new to Stan, I would like to know how I can build a kumarasuamy regression model for my data. How to specify Y ~ kumarasuamy(a,b) in Stan?
modeling proposal:
data {
int<lower=1> N; // sample size
int<lower=1> K; // K predictors
vector<lower=0,upper=1>[N] y; // response
matrix[N,K] X; // predictor matrix
}
parameters {
vector[K] theta; // reg coefficients
real<lower=0> phi; // dispersion parameter
}
transformed parameters{
vector[K] beta;
beta = theta * 5; // same as beta ~ normal(0, 5); fairly diffuse
}
model {
// model calculations
vector[N] LP; // linear predictor
vector[N] mu; // transformed linear predictor
LP = X * beta;
for (i in 1:N) {
mu[i] = inv_logit(LP[i]);
}
// priors
theta ~ normal(0, 1);
phi ~ cauchy(0, 5); // different options for phi
//phi ~ inv_gamma(.001, .001);
//phi ~ uniform(0, 500); // put upper on phi if using this
// likelihood
y ~ kumarasuamy (a, b);
}
from this model I want to build the kumarasuamy regression model.
thanks in advance.