Description Usage Arguments Value Further Details Examples
Estimate coefficients for an index via the hedonic approach (generic method)
1 |
estimator |
Type of model to estimates (base, robust, weighted) |
hed_df |
Repeat sales dataset from hedCreateSales() |
hed_spec |
Model specification ('formula' object) |
... |
Additional arguments |
'hedmodel' object: model object of the estimator (ex.: 'lm')
‘estimator' argument must be in a class of ’base', 'weighted' or 'robust' This function is not generally called directly, but rather from 'hpiModel()'
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # Load example data
data(ex_sales)
# Create hedonic data
hed_data <- hedCreateTrans(trans_df = ex_sales,
prop_id = 'pinx',
trans_id = 'sale_id',
price = 'sale_price',
date = 'sale_date',
periodicity = 'monthly')
# Estimate Model
hed_model <- hedModel(estimator = structure('base', class = 'base'),
hed_df = hed_data,
hed_spec = as.formula(log(price) ~ baths + tot_sf))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.