fillin: Fully rectangularize a dataset

Description Usage Arguments Value Examples

Description

Make the dataset have one observation for every possible interaction of a list of variables.

Usage

1
fillin(varlist)

Arguments

varlist

a variable list in "var1 var2 var3 x*" format where "*" matches zero or more of any character and "?" matches one of any character (an unquoted list will work as well with one variable). On exit, the data set will contain one observation for every possible interaction of variables with missing values filled in where appropriate.

Value

returns NULL, invisibly

Examples

1
2
3
4
5
6
7
library(plm)
data(Produc)
use(Produc, clear=TRUE)
keepvar("state year emp unemp")
addobs("state='Mars',year=1990,emp=100,unemp=4.0")
fillin("state year")
listif()

genvar documentation built on Jan. 21, 2020, 9:07 a.m.