Can I use absolute values of complex numbers for logged data?

Hello, I'm currently working on a model with some residualized data that requires taking the log of terms as follows:
log(µc_it.^φ + (1 − µ)P_jt.^−φ)
where c_it and P_it are data vectors, this is just one term in the function, which I'm going to perform lsqnonlin() on with a user-defined Jacobian. At some point, the value inside the log() is negative, which produces a complex number. My question is whether I can use -abs(log(µc_it.^φ + (1 − µ)P_jt.^−φ)) for that term, or if I have to work with non-residualized data to get accurate results. From what I understand, the non-residualized data doesn't have negative values, but using it would create a lot of extra steps down the line.

Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Asked:

on 16 Aug 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!