names of the independent variables in "x1 x2 x3" format. To include a variable as a categorical variable (when you would use "i.state" to get state dummies in Stata), include it as "factor(state)".
subset
conditions to subset the data
effect
either "twoways", "individual", or "time" for fixed effects. Dataset must already have been xtset.
robust
whether to use robust standard errors
hac
which variable to order by to compute heteroskedastic and auto correlation standard errors (if unspecified, do not do HAC correction)
cluster
a variable list giving the names of the variables to cluster by in producing clustered standard errors
rtype
gives the type of heteroskedasticity correction to make. By default, it is "1" to implement HC1 which is the same as Stata's small sample corrected standard errors. rtype can be any integer from 0 to 3 with each value corresponding to a different heteroskedastic correction (HCx). See documention for vcovHC in package sandwich.
# NOT RUN {library(plm)
data(Produc)
use(Produc, clear=TRUE)
r = reg(emp, unemp)
r
xtset(year,state)
r = reg(emp, unemp, hac=year)
r
r = reg(emp, unemp, cluster=year)
r
# }