SpawAggregateOutput-class: Class '"SpawAggregateOutput"'

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

Description

Output object of the function SpawAggregate.

Objects from the Class

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

Slots

seed:

Object of class "ANY" ~~

contains the random seed which was used in SpawAggregate. Use this seed if you want to reproduce the same resamples.

aggregated.samples:

Object of class "list" ~~

A list of matrices of dimension n by m where n is the number of contextual units and m is the number of resamples containing the aggregated context data for each resample.

frames:

Object of class "list" ~~

A list of data.frames. One data.frame per contextual name, each containing the mean estimate, standard deviation, median and confidence intervals of the corresponding contextual variable by contextual unit.

Methods

merge

signature(x = "SpawAggregateOutput", y = "SpawAggregateOutput"): Merges SpawAggregateOutput objects. This is useful if contextual data is being aggregated from different individual level data bases.

[

signature(x = "SpawAggregateOutput", i = "ANY", j = "ANY", drop = "ANY"): Allows to extract the dataframe corresponding to a bootstrap sample.

getSample

signature(object = "SpawAggregateOutput"): Also allows to extract the dataframe corresponding to a bootstrap sample.

length

signature(x = "SpawAggregateOutput"): Returns the number of bootstrap samples contained in the object.

names

signature(x = "SpawAggregateOutput"): Returns the names of aggregated variables in the object

names<-

signature(x = "SpawAggregateOutput"): Allows to assign names to the aggregates in the object

names<-

signature(x = "SpawAggregateOutput", NA = "ANY"): Allows to change names to the aggregated variables in the object.

show

signature(object = "SpawAggregateOutput"): Prints a meaningful short description of the object.

Author(s)

Till Junge, Sandra Penic, Guy Elcheroth

See Also

is generated by SpawAggregate

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
## load distance matrix
data(d_geo)
## create a weight matrix
geow.50 <- WeightMatrix(d_geo, bandwidth=50)
## load contextual data
data(traces_event)

## aggregate data

wv.int <- SpawAggregate(contextual.data=traces_event,
                        context.id="area.name",
                        contextual.names=c("w_all", "w_all"),
                        contextual.weight.matrices=list(NULL, geow.50),
                        aggregation.functions="weighted.mean",
                        design.weight.names="weight",
                        nb.resamples=4)
## check the number of samples
length(wv.int)

## check the second sample
head(wv.int[2])

## change the names of the weighted indicators to more significant ones
names(wv.int) <- c("w_all.0", "w_all.50")

showClass("SpawAggregateOutput")

spacom documentation built on May 29, 2017, 9:53 a.m.

Search within the spacom package
Search all R packages, documentation and source code