Good afternoon, how can I define the Log Skew Normal (LSN) distribution?

What are you trying to use it for? In most cases, I’d imagine that modeling the log of a parameter/data with a regular skew normal would make things easier.

```
data {
int N;
vector[N] Y;
...
}
transformed data {
vector[N] log_Y = log(Y);
}
parameters {
real log_theta;
...
}
transformed parameters {
real theta = exp(log_theta);
}
model {
log_theta ~ skew_normal(...);
log_Y ~ skew_normal(...);
...
}
```

2 Likes

I want to implement a marginalized model using the Log-Skew-Normal (LSN) distribution, for semi-continuous longitudinal data

You just need a definition of the density then you can define it as a function and use it like any other desnity.

You might want to start with Aki’s tutorial on adding custom probability functions. There are also examples in the chapter of the user’s guide on user-defined functions.

1 Like