Class "MLSpawExactOutput"

Share:

Description

Output object of the function MLSpawExact.

Objects from the Class

Objects can be created by calls of the form new("MLSpawExactOutput", ...).

Slots

lme:

Object of class "merMod"

beta:

Object of class "numeric"

Methods

AIC

signature(object = "MLSpawExactOutput"): merMod of lme4

BIC

signature(object = "MLSpawExactOutput"): merMod of lme4

fixef

signature(object = "MLSpawExactOutput"): merMod of lme4

print

signature(x = "MLSpawExactOutput")

ranef

signature(object = "MLSpawExactOutput"): merMod of lme4

show

signature(object = "MLSpawExactOutput")

summary

signature(object = "MLSpawExactOutput")

VarCorr

signature(x = "MLSpawExactOutput"): merMod of lme4

Author(s)

Till Junge

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
## Perform MLSpawExact

## Import and prepare data (see details in MLSpawExact)

data(traces_ind)
traces_ind <- traces_ind[,-7]
traces_ind <- na.exclude(traces_ind)
data(traces_event)

data(homog_census)
data(d_geo)

## Step 1: Create spatial weights
geow.100 <- WeightMatrix(d_geo, bandwidth=100)

## Step 2: Create spatially weighted contextual indicators
aggregate <- SpawAggregate(contextual.data=traces_event,
                           context.id="area.name",
                           contextual.names='w_all',
                           contextual.weight.matrices=geow.100,
                           aggregation.functions="weighted.mean",
                           design.weight.names="weight",
                           nb.resamples=0)

## Step 3: Perform MLSpawExact with the spatially weighted indicator
acc_w100 <- MLSpawExact(individual.level.data=traces_ind,
              			context.id="area.name",
              			formula=cg_acc ~ victim_d + comb_d + male + age_1990 +
              			high_school + higher_edu + (1|area.name) + w_all.1,
              			precise.data=aggregate)
              			
## acc_w100 is an object of class MLSpawExactOutput              			
class(acc_w100)

## to assess standardized coefficients
acc_w100@beta

## look at the fitted mixed-effect model :
acc_w100@lme 
## to assess non-standardized fixed coefficients
fixef(acc_w100@lme)

## to assess the deviance of the fitted model
deviance(acc_w100@lme)

## for details about slots within @lme see   ?merMod-class{lme4}