getFE: Extract the Fixed-Effects from a 'femlm' estimation.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/MiscFuns.R

Description

This function retrives the fixed effects from a femlm estimation. It is useful only when there are more than one cluster.

Usage

1
getFE(x)

Arguments

x

A femlm object.

Value

A list containig the vectors of the fixed effects.

Author(s)

Laurent Berge

See Also

See also the main estimation function femlm. Use summary.femlm to see the results with the appropriate standard-errors, getFE to extract the cluster coefficients, and the functions res2table and res2tex to visualize the results of multiple estimations.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Bilateral network
nb = 20
n = nb**2
k = nb
id1 = factor(rep(1:k, each=n/k))
id2 = factor(rep(1:(n/k), times=k))
d = rep(rnorm(k)**2, each=n/k)
x = rnorm(n, 1, 5)**2
y = rnorm(n, -1, 5)**2
z = rpois(n, x*y+rnorm(n, sd = 3)**2) + rpois(n, 2)
base = data.frame(x, y, z, id1, id2)

# We want to use the ID's of each observation as a variable: we use the option cluster
est_poisson = femlm(z~log(x)+log(y), base, family="poisson", cluster=c("id1", "id2"))

# To get the FE:
myFE = getFE(est_poisson)

FENmlm documentation built on Feb. 12, 2018, 5:01 p.m.