Description Objects from the Class Slots Methods Author(s) Examples
Output object of the function ResampleMLSpaw
.
Objects can be created by calls of the form new("ResampleMLSpawOutput", ...)
.
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"
signature(x = "ResampleMLSpawOutput")
signature(object = "ResampleMLSpawOutput")
Till Junge
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.