update.femlm | R Documentation |
Updates and re-estimates a femlm
model. This function updates the formulas and use previous starting values to estimate a new femlm
model. The data is obtained from the original call
.
## S3 method for class 'femlm'
update(object, fml.update, ...)
object |
An object of class |
fml.update |
Changes to be made to the original argument |
... |
Other arguments to be passed to the function |
It returns a femlm
object (see details in femlm
.
Laurent Berge
femlm
, predict.femlm
, summary.femlm
, vcov.femlm
, getFE
.
# Example using trade data
data(trade)
# main estimation
est_pois <- femlm(Euros ~ log(dist_km) | Origin + Destination, trade)
# we add the variable log(Year)
est_2 <- update(est_pois, . ~ . + log(Year))
# we add another cluster: "Product"
est_3 <- update(est_2, . ~ . | . + Product)
# we remove the cluster "Origin" and the variable log(dist_km)
est_4 <- update(est_3, . ~ . - log(dist_km) | . - Origin)
# Quick look at the 4 estimations
res2table(est_pois, est_2, est_3, est_4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.