Removed general transformation of the raw data, only consider the log function.
parent
ddce110bf2
commit
55e3bcc5f8
|
@ -457,7 +457,7 @@ if ~isfield(options_,'nobs')
|
|||
options_.nobs = [];
|
||||
end
|
||||
|
||||
dataset_ = initialize_dataset(options_.datafile,options_.varobs,options_.first_obs,options_.nobs,transformation,options_.prefilter,xls);
|
||||
dataset_ = initialize_dataset(options_.datafile,options_.varobs,options_.first_obs,options_.nobs,logged_data_flag,options_.prefilter,xls);
|
||||
|
||||
options_.nobs = dataset_.info.ntobs;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function dataset_ = initialize_dataset(datafile,varobs,first,nobs,transformation,prefilter,xls)
|
||||
function dataset_ = initialize_dataset(datafile,varobs,first,nobs,logged_data_flag,prefilter,xls)
|
||||
% Initializes a structure describing the dataset.
|
||||
|
||||
% Copyright (C) 2011-2013 Dynare Team
|
||||
|
@ -18,8 +18,6 @@ function dataset_ = initialize_dataset(datafile,varobs,first,nobs,transformation
|
|||
% You should have received a copy of the GNU General Public License
|
||||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
|
||||
|
||||
if isempty(datafile)
|
||||
error('Estimation:: You have to declare a dataset file!')
|
||||
end
|
||||
|
@ -61,11 +59,11 @@ if size(rawdata,1)~=dataset_.info.ntobs
|
|||
end
|
||||
rawdata = rawdata(first:(first+dataset_.info.ntobs-1),:);
|
||||
|
||||
% Take the log (or anything else) of the variables if needed
|
||||
if isempty(transformation)
|
||||
dataset_.rawdata = rawdata;
|
||||
% Take the log of the variables if needed
|
||||
if logged_data_flag
|
||||
dataset_.rawdata = log(rawdata);
|
||||
else
|
||||
dataset_.rawdata = arrayfun(transformation,rawdata);
|
||||
dataset_.radata = rawdata;
|
||||
end
|
||||
|
||||
% Test if the observations are real numbers.
|
||||
|
|
Loading…
Reference in New Issue