A reasonable place to start in this particular case is to recognize that the model is unidentified: tau1 and tau2 cannot be estimated separately.
Notes:
- I parametrize the normal distribution in terms of the standard deviation $\sigma$ instead of the precision
tau to be consistent with the parameterization used by Stan as I show how to use priorsense (a package in the Stan universe) for prior diagnostics and sensitivity.
- It's not clear what the observed data is as the OP refers to both
mean and A as parameters. I assume that the location u1 is a known scalar and that A is a vector of N observations.
First we show that the OP's model is unidentified; we also come up with a simpler model in which the standard deviation is identified.
$$
\begin{aligned}
\mu_1 &\sim \operatorname{N}(u_1,\sigma_1) \\
A &\sim \operatorname{N}(\mu_1,\sigma_2)
\end{aligned}
$$
implies
$$
\begin{aligned}
\mu_1 &= u_1 + \sigma_1z_1 \\
A &= \mu_1 + \sigma_2z_2 \\
&= u_1 + \sigma_1z_1 + \sigma_2z_2 \\
&= u_1 + \sqrt{\sigma_1^2+\sigma_2^2}z \\
&= u_1 + \sigma z
\end{aligned}
$$
where $z_1, z_2$ and $z$ are vectors of independent standard normal random variables.
So we can estimate a single standard deviation sigma, not two separate standard deviations sigma1 and sigma2, by fitting the following model:
A ~ normal(u1, sigma);
The OP also asks more generally how to choose a prior for $\sigma$. As @SeanEaster points out this depends on the context (+1): ideally, we will use domain knowledge to specify an appropriate informative prior. Or we can use a weakly informative prior instead; the Stan documentation recommends to use half-Student's $t$-distribution student_t(df, loc, scale) where the parameters are degrees of freedom, location and scale, respectively.
If we use Stan for model fitting, we can also use the priorsense package to check for (one type of) prior sensitivity. I demonstrate with the following R code snippet:
library("priorsense")
library("cmdstanr")
set.seed(123)
We want to estimate sigma based on observed data A.
N <- 10
u1 <- 0
sigma <- 2
A <- rnorm(N, mean = u1, sd = sigma)
code <- "
data {
// data
int N;
vector[N] A;
real u1;
// prior
real df;
real loc;
real scale;
}
parameters {
real<lower=0> sigma;
}
model {
sigma ~ student_t(df, loc, scale);
A ~ normal(u1, sigma);
}
generated quantities {
vector[N] log_lik;
real lprior;
// likelihood
for (n in 1:N) {
log_lik[n] = normal_lpdf(A[n] | u1, sigma);
}
//proir
lprior = student_t_lpdf(sigma | df, loc, scale);
}
"
model <- cmdstan_model(write_stan_file(code))
# Specify an appropriate Student's t prior on sigma
fit1 <- model$sample(
data = list(
N = N, A = A, u1 = u1,
df = 3, loc = 0, scale = 5
),
seed = 1234
)
# Specify an inappropriate Student's t prior on sigma:
# its location 100 is very far from the true location 2
fit2 <- model$sample(
data = list(
N = N, A = A, u1 = u1,
df = 30, loc = 100, scale = 1
),
seed = 1234
)
powerscale_sensitivity(fit1)
#> Loading required namespace: testthat
#> Sensitivity based on cjs_dist:
#> # A tibble: 2 × 4
#> variable prior likelihood diagnosis
#> <chr> <dbl> <dbl> <chr>
#> 1 sigma 0.0169 0.185 -
#> 2 lprior 0.0221 0.246 -
powerscale_sensitivity(fit2)
#> Sensitivity based on cjs_dist:
#> # A tibble: 2 × 4
#> variable prior likelihood diagnosis
#> <chr> <dbl> <dbl> <chr>
#> 1 sigma 0.0542 0.272 prior-data conflict
#> 2 lprior 0.0547 0.274 prior-data conflict