ResampleMLSpawOutput-class: Class '"ResampleMLSpawOutput"'

Description Objects from the Class Slots Methods Author(s) Examples

Description

Output object of the function ResampleMLSpaw.

Objects from the Class

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

Slots

individual.sample.seed:

Object of class "integer"

fixed:

Object of class "data.frame"

random.var:

Object of class "data.frame"

model.fit:

Object of class "data.frame"

ranefs:

Object of class "matrix"

nb.resamples:

Object of class "integer"

betas:

Object of class "data.frame"

Methods

print

signature(x = "ResampleMLSpawOutput")

show

signature(object = "ResampleMLSpawOutput")

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
47
## Perform ResampleMLSpawExact

## Data preparation (see ResampleMLSpawExact)

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

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

## Step 2: Create spatially weighted precise contextual indicator
homog.100 <- SpawExact(precise.data=homog_census,
                       context.id="area.name",
                       contextual.names="Homog_00",
                       contextual.weight.matrices=geow.100)
## rename weighted variable names so they reflect the used weighting
## matrix
names(homog.100)[2] <- "Homog.100"                       

## Step 3: Perform ResampleMLSpawExact
acc_homog100 <-
  ResampleMLSpawExact(
    individual.level.data=traces_ind,
    context.id="area.name",
    formula=cg_acc ~ victim_d + comb_d + male + age_1990 + high_school +
    higher_edu + Homog.100 + (1|area.name), precise.data=homog.100,
    nb.resamples=10)

## acc_homog100 is an object of class ResampleMLSpawOutput
class(acc_homog100)

## to assess standardized fixed effects coefficients
acc_homog100@betas

## to assess non-standardized fixed effects coefficients
acc_homog100@fixed

## to assess only median of non-standardized fixed effects coefficients
## Not run: 
acc_homog100@fixed["50%"] 
## End(Not run)

## to assess random effects
acc_homog100@random.var

spacom documentation built on May 1, 2019, 7:35 p.m.