data_elevator: Elevator data

Description Usage Format Examples

Description

An example dataset to illustrate how the arrival of an elevator may affect subsequent operation of this elevator.

Usage

1
data("elevator")

Format

A data frame with 14 observations on the following 3 variables.

VIDELT

a numeric vector indicating the segment or episode of observations

TAR

a character vector indicating the ID of the person using the elevator

BEH

a character vector indicating whether the elevator was called (o), non-arrival (x), or arrival (A).

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
48
data(elevator)


## Overall Probabilities (using "o" as Target and "A" as reinforcer)
#$descriptive_statistics$prob_tar_uncorrected
#[1] 0.3571429

#$descriptive_statistics$prob_tar_corrected
#[1] 0.4166667

## Recounted Single Data frame
recounted_elevator<-recounter(elevator,BEH,"o","A","TAR")$recounted_data_frame

## Recounted Contingency Table Stats
recount_elevator_tables<-tables_recount_table(recounted_elevator)

#$output_list$avg_prob
#     B_NT       B_T      A_NT       A_T
#0.7638889 0.2361111 0.4027778 0.5972222

## Split by VIDLET
#elevator_split<-group_splitter(elevator, BEH, "o","x","A", group = "VIDELT")
#elevator_split
#$`1`
# A tibble: 7 x 3
#  VIDELT TAR   BEH
#   <dbl> <chr> <chr>
#1      1 S     o
#2      1 S     x
#3      1 S     x

#$`2`
# A tibble: 7 x 3
#  VIDELT TAR   BEH
#   <dbl> <chr> <chr>
#1      2 S     x
#2      2 S     x
#3      2 S     A

## Recounted for each VIDELT
#elevator_split_recount<-group_split_recounter(elevator_split, behaviorstream #= "BEH","o","A", actor = "TAR" )

## Recounted Split Contingency Table Stats
#tables_recount_table(elevator_split_recount)

#$output_list$avg_prob
#     B_NT       B_T      A_NT       A_T
#0.8333333 0.1666667 0.3333333 0.6666667

delaneyj1786/REINFORCINATOR documentation built on Jan. 14, 2022, 3:47 a.m.