calc_supplycurve: Calculate points of fitted curve for plotting using fit...

View source: R/calc_supplycurve.R

calc_supplycurveR Documentation

Calculate points of fitted curve for plotting using fit coefficients

Description

This function uses the raw data on which you performed the fit (calculate_fit) and the resulting fit coefficients to calculate a couple of points on the fitted curve that can be used to plot the curve (plot_curve).

Usage

calc_supplycurve(data_in, fitcoef, myform, ylimit = "common")

Arguments

data_in

MAgPIE object containing the same data that was used to calculate the fitcoefficients.

fitcoef

MAgPIE object containing the fitcoefficients (output of calculate_fit)

myform

Function that was fitted and is used here to calculate curve

ylimit

Choose the method to calculate the upper limit for the y values. Options: "individual", the maximal value up to which the y values of the supplycurve are calculated is done individualy for each reagion and year. "common" (default), the upper limit of the y values of the supplycurve for all regions and years is the same and is the maximum of the raw data. This is useful for plotting, because it expands "short" supplycurves beyond the maximal demand of the respective region and year and makes them better comparable.

Value

MAgPIE object containing the points on the curve.

Author(s)

David Klein

See Also

calculate_fit plot_curve


pik-piam/remulator documentation built on Oct. 19, 2023, 4:07 p.m.