Dataset Rossi

Share:

Description

Dataset to test the package.

Usage

1

Format

A data frame with 432 observations on the following 63 variables.

week

A numeric vector. Response (week of arrest after release)

arrest

A numeric vector. Censoring indicator (1 = case, Study time: one year)

fin

A numeric vector. Indicator for financial support.

age

A numeric vector. Age in years.

race

A numeric vector. Race (1=black, 0=white).

wexp

A numeric vector. Indicator for work experience prior to arrest.

mar

A numeric vector. Indicator for married person.

paro

A numeric vector. Indicator for parolee.

prio

A numeric vector. Number of previous convictions.

educ

A numeric vector. Lebel of education (Scala 2-6 increasing)

emp1

52 numeric vectors. 0 = no work, 1 = work

emp2

A numeric vector.

emp3

A numeric vector.

emp4

A numeric vector.

emp5

A numeric vector.

emp6

A numeric vector.

emp7

A numeric vector.

emp8

A numeric vector.

emp9

A numeric vector.

emp10

A numeric vector.

emp11

A numeric vector.

emp12

A numeric vector.

emp13

A numeric vector.

emp14

A numeric vector.

emp15

A numeric vector.

emp16

A numeric vector.

emp17

A numeric vector.

emp18

A numeric vector.

emp19

A numeric vector.

emp20

A numeric vector.

emp21

A numeric vector.

emp22

A numeric vector.

emp23

A numeric vector.

emp24

A numeric vector.

emp25

A numeric vector.

emp26

A numeric vector.

emp27

A numeric vector.

emp28

A numeric vector.

emp29

A numeric vector.

emp30

A numeric vector.

emp31

A numeric vector.

emp32

A numeric vector.

emp33

A numeric vector.

emp34

A numeric vector.

emp35

A numeric vector.

emp36

A numeric vector.

emp37

A numeric vector.

emp38

A numeric vector.

emp39

A numeric vector.

emp40

A numeric vector.

emp41

A numeric vector.

emp42

A numeric vector.

emp43

A numeric vector.

emp44

A numeric vector.

emp45

A numeric vector.

emp46

A numeric vector.

emp47

A numeric vector.

emp48

A numeric vector.

emp49

A numeric vector.

emp50

A numeric vector.

emp51

A numeric vector.

emp52

A numeric vector.

n.work.weeks

A numeric vector. Number of weeks with work.

References

Fox, John. An R and S-PLUS Companion to Applied Regression, Sage Publications, 2002.
http://cran.r-project.org/doc/contrib/Fox-Companion/scripts.html

Rossi, P., R. Berk, and K. Lenihan (1980). Money, work, and crime: experimental evidence. Quantitative studies in social relations. Academic Press.

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
49
50
## Not run: 
### prepares the dataset 'Rossi' for the package 'GlobalDeviance'
setwd(...)

Rossi<-read.table("Rossi.txt", header=TRUE)

Rossi$n.work.weeks<-rowSums(Rossi[, grepl("emp[0-90-9]", names(Rossi))], na.rm=TRUE)

save(Rossi, file="Rossi.rda")



### load dataset 'Rossi'
data(Rossi)

str(Rossi)

names(Rossi)

# Covariables (patients x covariables)
model.dat<-Rossi[, c("arrest", "fin", "wexp")]
str(model.dat)

# data (variables/genes x patients)
xx<-rbind(t(t(t(Rossi[, c("prio", "n.work.weeks")]))), rpois(432, 1))
rownames(xx)<-c("prio", "n.work.weeks", "random")

formula.full<- ~ arrest + fin + wexp
formula.red<- ~ arrest + fin

test.vars<-list("prio", "n.work.weeks", "random", c("prio", "n.work.weeks"), 
	c("prio", "n.work.weeks", "random"))
names(test.vars)<-c("prio", "n.work.weeks", "random", "prio+n.work.weeks", 
	"prio+n.work.weeks+random")

set.seed(54321)

t.rossi1<-expr.dev.test(xx=xx, formula.full=formula.full, formula.red=formula.red, 
	model.dat=model.dat, test.vars=test.vars, glm.family=poisson(link="log"), 
	perm=100, method="permutation", cf="fisher")

t.rossi2<-expr.dev.test(xx=xx, formula.full=formula.full, formula.red=formula.red, 
	 model.dat=model.dat, test.vars=test.vars, glm.family=poisson(link="log"), 
	perm=100, method="chisqstat", cf="fisher")

summary(t.rossi1, digits=2)

summary(t.rossi2, digits=3)

## End(Not run)