Extract the Fixed-Effects from a feNmlm estimation.

Share:

Description

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

Usage

1
getFE(x)

Arguments

x

A feMmlm object.

Value

A list containig the vectors of the fixed effects.

Author(s)

Laurent Berge

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)
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 dummy
est_poisson = femlm(z~log(x)+log(y),base,family="poisson",dummy=c("id1","id2"))

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