matchedPortfolio-class {portfolio} | R Documentation |
Class "matchedPortfolio"
Description
An object of the class "matchedPortfolio" that contains an object of class "portfolioBasic" and a matrix of weights for portfolios that have been matched to the "portfolioBasic" according to variables specified in a formula.
Objects from the Class
Objects can be created by calls of the form new("matchedPortfolio", ...)
.
Slots
formula
:an object of class
formula
specifying the treatment variable and the covariates on which to match.original
:an object of class
"portfolioBasic"
, the attributes of which will be used for matching.matches
:Object of class
"matrix"
with a column for each matched portfolio.method
:Object of class
"character"
specifying the matching method used to generate the matched portfolio.omitted.control
:Object of class
"numeric"
containing the number of observations omitted from the control.omitted.treatment
:Object of class
"numeric"
containing the number of observations omitted from the treatment.
Methods
- show
signature(object = "matchedPortfolio")
: prints basic information about theoriginal
portfolio and its matches.- summary
signature(object = "matchedPortfolio")
: prints detailed information about theoriginal
portfolio and its matches.- performance
signature(object = "matchedPortfolio")
: calculates the mean performance across all matched portfolios.- exposure
signature(object = "matchedPortfolio", exp.var = "character")
: calculates the exposure across each variable inexp.var
.- contribution
signature(object = "matchedPortfolio", contrib.var = "character")
: calculates the contribution across each variable incontrib.var
.- plot
signature(x = "matchedPortfolio", y = "missing")
: graphsexposure
andcontribution
.
Details
The matches
matrix contains as many rows as there are stocks in
the data
slot of original
and as many columns as there
are matched portfolios. The row labels of the matrix are the values of
original@data[["id.var"]]
and each column is a matched
portfolio. The cell values are the weights of the stock in the
portfolio.
Author(s)
Daniel Gerlanc dgerlanc@gmail.com
See Also
Examples
m.p <- new("matchedPortfolio")