unpanel | R Documentation |
fixest
panelTransforms a fixest_panel
object into a regular data.frame.
unpanel(x)
x |
A |
Returns a data set of the exact same dimension. Only the attribute 'panel_info' is erased.
Laurent Berge
Alternatively, the function panel
changes a data.frame
into a panel from which the
functions l
and f
(creating leads and lags) can be called. Otherwise you can set the panel
'live' during the estimation using the argument panel.id
(see for example in the function
feols
).
data(base_did)
# Setting a data set as a panel
pdat = panel(base_did, ~id+period)
# ... allows you to use leads and lags in estimations
feols(y~l(x1, 0:1), pdat)
# Now unpanel => returns the initial data set
class(pdat) ; dim(pdat)
new_base = unpanel(pdat)
class(new_base) ; dim(new_base)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.