

    \filetitle{diff}{First difference pseudofunction}{modellang/diff}

	\paragraph{Syntax}

\begin{verbatim}
diff(EXPR)
diff(EXPR,K)
\end{verbatim}

\paragraph{Description}

If the input argument \texttt{K} is not specified, this pseudofunction
expands to

\begin{verbatim}
((EXPR)-(EXPR{-1}))
\end{verbatim}

If the input argument \texttt{K} is specified, it expands to

\begin{verbatim}
((EXPR)-(EXPR{K}))
\end{verbatim}

The two derived expressions, \texttt{EXPR\{-1\}} and \texttt{EXPR\{K\}},
are based on \texttt{EXPR}, and have all its time subscripts shifted by
--1 or by \texttt{K} periods, respectively.

\paragraph{Example}

These two lines

\begin{verbatim}
diff(Z)
diff(log(X{1})-log(Y{-1}),-2)
\end{verbatim}

will expand to

\begin{verbatim}
((Z)-(Z{-1}))
((log(X{1})-log(Y{-1}))-(log(X{-1})-log(Y{-3})))
\end{verbatim}


