The reasoning for this behavior is that a skipmissing of a vector Int[missing, missing] should be have kind of the same behavior as an empty Int vector, Int[]. Mean is just mean(x) = sum(x) / length(x) so it’s clear that mean(Int[]) should return NaN.
Are you coming from Stata, by chance? Julia’s behavior mimics R’s, but Stata propagates missing they way you expect it to.
The best approach would be to make a little helper function
meanmissing(x) = all(ismissing, x) ? missing : mean(skipmissing(x))