-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New initial estimate for new base classification of sectors.
- Loading branch information
Hanspeter85
committed
Jan 27, 2022
1 parent
244cb70
commit 0df7b8c
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
function [RegMap,IndMap,ProdMap]=Ind20Pro21v1_InitialEstimate(handles) | ||
|
||
disp('Launching initial estimate for the extended PIOT version 1'); | ||
|
||
% Write handles variables into mat-file for R to read | ||
% Working directory | ||
filename = [handles.processeddatadir,'WorkingDirectory4R.mat']; | ||
out = handles.motherALANGdir; | ||
save(filename,'out'); | ||
|
||
% Write region aggregator to file | ||
filename = [handles.processeddatadir,'RegionAggFile4R.mat']; | ||
out = handles.regionaggfile; | ||
save(filename,'out'); | ||
|
||
% Region aggregator | ||
RegMap = csvread(handles.regionagg); | ||
|
||
if size(RegMap,1) > size(RegMap,2) % check orientation of aggregator | ||
RegMap = RegMap'; | ||
end | ||
|
||
reg_proxy = ones(size(RegMap,2),1); | ||
RegMap = prorate(RegMap,'col_proxy',reg_proxy); | ||
|
||
% Product aggregator | ||
ProdMap = csvread(handles.sectoraggprod); | ||
|
||
if size(ProdMap,1) > size(ProdMap,2) % check orientation of aggregator | ||
ProdMap = ProdMap'; | ||
end | ||
|
||
prod_proxy = ones(size(ProdMap,2),1); | ||
ProdMap = prorate(ProdMap,'col_proxy',prod_proxy); | ||
|
||
% Industry aggregator | ||
IndMap = csvread(handles.sectoragg); | ||
|
||
if size(IndMap,1) > size(IndMap,2) % check orientation of aggregator | ||
IndMap = IndMap'; | ||
end | ||
|
||
ind_proxy = ones(size(IndMap,2),1); | ||
IndMap = prorate(IndMap,'col_proxy',ind_proxy); | ||
|
||
% To run Lab on Sydney machine: command = 'Rscript /import/emily1/isa/IELab/Roots/PIOLab/Rscripts/IEfeeds_code/Ind20Pro21v1_InitialEstimate.R'; | ||
command = 'Rscript /data/WULab/Roots/PIOLab/Rscripts/IEfeeds_code/Ind20Pro21v1_InitialEstimate.R'; | ||
system(command,'-echo'); | ||
|
||
end |