You need to specify inv_kappa in the parameters block (because that’s the quantity you’re sampling) and define kappa as the transformed parameter (after which you can use it for whatever in the model). So the other way around compared to what you’re doing now.
Also “sigma” is not a distribution. So the compiler doesn’t know what to do with the statement ‘inv_kappa ~ sigma’ and throws the quoted error. Instead, combined with the point above, the model block should say ‘inv_kappa ~ normal(0,1);’. And if you would stick to your current architecture (with kappa defined as a parameter) and state ‘inv_kappa ~ normal(0,1);’, the compiler would throw a warning about a change of variables and that you (may) need correct for this (Jacobian stuff). You can avoid that by implementing my first point above and letting Stan deal with the change of variables by deining kappa in the transformed parameters bliek and letting inv_kappa be the parameter instead. The online Stan docs provide more background about changes of variables, if you’re interested.