multi_student_t() has been suggested for a more robust model of multivariate data, and I can imagine doing explicit inference on the degrees of freedom parameter, but if doing so, I imagine it might be the case that different dimensions of the multivariate might necessitate different values for the df. Obviously this is beyond the design of multi_student_t(), but could it be hacked together from the relation between normal(), chi-square() and student_t()?
As I understand it, if X is normal(0,1) and Z is chi_square(2), then X/sqrt(Z/2) is student_t(2,0,1). So I imagine a data-generating model as:
data{
int K ;
int N ;
vector[K] mu ;
vector<lower=0>[K] sigma ;
vector<lower=0>[K] log_df ; #note log-df instead of df
corr_matrix[K] rho ;
}
transformed data{
matrix[K,K] covmat ;
covmat = quad_form_diag(rho,sigma) ;
}
parameters{
matrix[N,K] nrml ;
matrix[N,K] chisq ;
}
model{
nrml[i] ~ multi_normal(mu, covmat) ;
for(j in 1:K){
chisq[i,j] ~ chi_sq( exp( log_df[j] ) ) ;
}
}
}
generated quantities{
matrix[N,K] Y ;
for(i in 1:N){
for(j in 1:K){
Y[i,j] = nrml[i,j] / sqrt( chisq[i,j] / exp( log_df[j] ) )
}
}
}
But I'm unsure how to convert this into a model that achieves inference rather than data generation. That is, starting with something like:
data{
int K ;
int N ;
matrix[N,K] Y ;
}
parameters{
vector[K] mu ;
vector<lower=0>[K] sigma ;
vector<lower=0>[K] log_df ;
corr_matrix[K] rho ;
#possibly other parameters? nrml? chisq?
}
transformed parameters{
matrix[K,K] covmat ;
covmat = quad_form_diag(rho,sigma) ;
...
Thoughts?
Mike