# How to work with log data

I can get Dynare to estimate my model based on the log of my data in two ways. But is there a third way?

1. Use the log-linear argument in the Dynare command estimate [and enter the data without taking logs: Dynare does this for you].

2. Re-write the model equations as function[exp(log of data)]. For example if my model equation is
y = (k(-1)/dA)^chi * lab^(1 - chi), where y=output/technology, k=capital stock/A, dA=A/A(-1), lab=labor supply
then I could re-write this as
exp[lny]=(exp(lnk(-1)/exp(dlnA)^chi * lab^(1-chi), where lny=log(y), lnk=log(k), and dlnA=log(dA). [Now labor supply does not enter as a log-linear. The data that is to be log-linearized is read in in logs.]

3. Will this work? I leave all the model equations unchanged, read in the data I want the log taken of already in logs [so I read in lnY_obs=log(Y_obs)] and use observer equations like this one
lnY_obs - lnY_obs(-1) = log(dA) + log(y) - log(y(-1));
instead of the usual observer equation [where I read in the data Y_obs, not in logs]
Y_obs/Y_obs(-1) = dA * y/y(-1);

Will this last method work? It means that none of my model equations will be log-linearized, right? Except the observer equations, which need to be log-linearized so that it will not matter where the Taylor expansion is done.

One other point about method 3: the variables in the model equations are all divided by the trend, A. This ensures that all the variables (except for the observed variables like Y_obs) are stationary. It also probably should ensure that there is no problem with heteroscedasticity. As a result, it seems to us that there is no real need to use a log-linear approximation (and use the log of the data for the estimation). Or are we missing something?

Thank you for any help on this matter.