Description Usage Arguments Value Examples
fastplm
solves a fixed effects model.
1 2 3 4 5 6 7 8  fastplm(formula = NULL, data = NULL, index = NULL,
y = NULL, x = NULL, ind = NULL,
sfe = NULL, cfe = NULL,
PCA = TRUE, sp = NULL, knots = NULL,
degree = 3, se = 1, vce = "robust",
cluster = NULL, wild = FALSE,
refinement = FALSE, test_x = NULL, parallel = FALSE,
nboots = 200, seed = NULL, core.num = 1)

formula 
An object of class "formula": a symbolic description of the model to be fitted. 
data 
An object of class "dataframe" or "matrix". If both 
index 
A string vector specifying the indicators. Omissible if

y 
The Y vector. Omissible if 
x 
The X matrix. Omissible if 
ind 
A matrix where each row corresponds to the row (observation) in the XY dataset and each column represents an effect. The entry of row X of effect Y represents the group in Y that X belongs to. Groups can be specified by either numbers or strings, i.e. the input matrix can
be of mode 
sfe 
A vector index of simple (i.e. noncomplex) fixed effects.
Each can be specified either by effect name or position as in If omitted, 
cfe 
A list index of complex fixed effects. Specifically, an complex fixed effect is a generalized fixed effect. It consists a
pair of two effects, (I, E), interacting with each other. "I" stands for influence,
whose level has an observed vector Each element is a vector whose length is 2. The 1st item of each element is the
index of effect and the 2nd item is the index of influence. For index, see
If omitted, complex fixed effects will not be estimated. 
PCA 
A logical flag indicating whether to perform principal components analysis
for influence in complex fixed effects (see 
sp 
A character value or a numeric vector specifying the variable for fitting a bspline curve. 
knots 
A numeirc value specifying the knots point for 
degree 
A positive integer speficying the order of the spline curve.
Default value is 
se 
A logical flag indicating whether uncertainty estimates of covariates will be produced. 
vce 
A character value indicating type for variance estimator. Choose from: "standard" for standard ols standard errors, "robust" for the Huber White robust standard errors (default value), "clustered" (or "cl") for clustered standard errors, "jackknife" for jackknife standard errors, and "bootstrap" (or "boot") for bootstrapped standard errors. 
cluster 
A character value of the clustered variable(s) in the data frame if

wild 
A logical flag specifies if wild bootstrap will be performed to obtain
uncertainty estimates. Omissible if 
refinement 
A logical flag specifies if clutser bootstrap refinement will be
performed to obtain uncertainty estimates. Omissible if 
test_x 
A character specifies the variable of interest for wild cluster
bootstrap refinement. Omissible if 
parallel 
A logical flag indicating whether to perform parallel computing for the bootstrap procedure. 
nboots 
An integer specifying the number of bootstrap
runs. Omissible if 
seed 
An integer that sets the seed in random number generation.
Omissible if 
core.num 
The number of cores that will be used for computation. Default is one. Do not use more than the number of your physical cores. 
An object of class fastplm
with at least the following properties:
demeaned 
A list represents the demeaned linear model. It has, among other
properties, 
coefficients 
The coefficients for the demeaned linear model. 
sfe.coefs 
A list of estimated simple fixed effects. Each is a column
vector, in which row names correspond to names of levels in 
cfe.coefs 
A list of estimated complex fixed effects. Each is a matrix in
which each row represents a level. The naming convention is the same as in

fitted.values 
The fitted values of the fixed effect model. 
residuals 
The residuals of the fixed effect model, which is numerically the same as the residual of the demeaned linear model. 
intercept 
The intercept of the fixed effect model. Arbitrary if complex fixed effects are present. 
inds 
As in the input. 
fe 
An object of "fixed.effects" created for intermediate computing. 
refinement 
A list that restores results from cluster bootsrap refinement. 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  SEED < 19260817
N < 2000
LEVEL < 50
set.seed(SEED)
x < matrix(rnorm(N * 5, 3), N, 5)
e < matrix(rnorm(N, 1), N, 1)
raw.inds < matrix(sample(LEVEL, N * 3, replace = TRUE), N, 3)
sfe.coefs < matrix(runif(LEVEL * 3), LEVEL, 3)
with.effects < function(j) sapply(1 : N,
function(i) sfe.coefs[raw.inds[i, j], j])
beta < c(7, 3, 2, 5, 8)
effs < rowSums(sapply(1 : 3, with.effects))
y < x
###########################################
model < fastplm(y = y, x = x, ind = raw.inds, se = 0)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.