magclass (version 4.107.0)

calibrate_it: calibrate_it

Description

Standardized functions to calibrate values to a certain baseyear.

Usage

calibrate_it(origin, cal_to, cal_type = "convergence", cal_year = NULL,
  end_year = NULL, report_calibration_factors = FALSE)

Arguments

origin

Original Values (MAgPIE object)

cal_to

Values to calibrate to (MAgPIE object).

cal_type

"none" leaves the values as they are, "convergence" starts from the aim values and then linearily converges towards the values of origin, "growth_rate" uses the growth-rates of origin and applies them on aim.

cal_year

year on which the dataset should be calibrated.

end_year

only for cal_type="convergence". Year in which the calibration shall be faded out.

report_calibration_factors

prints out the multipliers which are used for calibration.

Value

Calibrated dataset.

See Also

convergence,lin.convergence

Examples

Run this code
# NOT RUN {
  data(population_magpie)
  test<-as.magpie(array(1000,dim(population_magpie[,,"A2"]),dimnames(population_magpie[,,"A2"])))
  calibrate_it(origin=population_magpie,cal_to=test[,"y1995",],cal_type="growth_rate")
  calibrate_it(origin=population_magpie,cal_to=test[,"y1995",],cal_type="convergence", 
               cal_year="y1995", end_year="y2055")
  calibrate_it(origin=population_magpie,cal_to=test[,"y1995",],cal_type="none")

# }

Run the code above in your browser using DataCamp Workspace