let $m\in \M_\sigma(\Sigma)$ and suppose that ${\mathcal S}$ is average contracting with respect to $m$. The canonical coding map $\pi: \Sigma\to \R^d$, given by $$\label{e-pi1.4}
\begin{split}
\pi(x)&=\lim_{n\to \infty} S_{x_0}\circ S_{x_1}\circ \cdots\circ S_{x_{n}}(0)\\
&=\lim_{n\to \infty} \left(a_{x_0}+M_{x_0}a_{x_1}+\cdots +M_{x_{0}}\cdots M_{x_{n-1}}a_{x_n}\right),
\end{split}$$ is well-defined on $\Sigma$ up to a set of zero $m$-measure ([@Brandt1986; @BougerolPicard1992]); see Section \[S-3\] for a self-contained proof. The push-forward measure $m\circ \pi^{-1}$, given by $$m\circ \pi^{-1}(F)=m(\pi^{-1}(F)) \quad \mbox{ for any Borel set }F\subset\R^d,$$ is called an [*invariant measure*]{} or [*stationary measure*]{} for ${\mathcal S}$. When $m$ is ergodic, $m\circ \pi^{-1}$ is called an [*ergodic invariant measure*]{} for $\mathcal S$. Moreover if $m$ is a Bernoulli product measure, $m\circ \pi^{-1}$ is called a [*self-affine measure*]{} generated by ${\mathcal S}$; if in addition, ${\mathcal S}$ consists of similarities, then $m\circ \pi^{-1}$ is called a [*self-similar measure*]{}.

The main purpose of this paper is to study the dimension of invariant measures for affine IFSs. Recall that for a probability measure $\eta$ on a metric space $X$, the [*local upper and lower dimensions*]{} of $\eta$ at $x\in X$ are defined respectively by $$\overline{\dim}_{\rm loc}(\eta, x)=\limsup_{r\to 0}\frac{\log \eta (B(x,r))}{\log r},\quad \underline{\dim}_{\rm loc}(\eta, x)=\liminf_{r\to 0}\frac{\log \eta (B(x,r))}{\log r},$$ where $B(x,r)$ stands for the closed ball 