You are on page 1of 2

################################################################################

#
# Appendix A
#
################################################################################
no <- 1:10
native_language <- factor(c(1, 1, 2, 2, 1, 1, 2, 2, 1, 1), levels = c(1, 2),
labels = c("German", "Turkish"))
age <- c(6, 7, 8, 9, 8, 9, 6, 7, 9, 8)
sex <- factor(c(1, 2, 1, 2, 1, 2, 1, 2, 1, 2), levels = c(1, 2),
labels = c("female", "male"))
age_birth <- c(39, 40, 38, 36, 37, 40, 39, 36, 40, 41)
no_siblings <- c(1, 2, 3, 2, 3, 0, 1, 4, 0, 2)
pos_sibling <- factor(c(1, 2, 3, 1, 2, 1, 1, 5, 1, 2),
levels = c(1, 2, 3, 4, 5, 6),
labels = c("first-born", "second-born",
"third-born", "fourth-born",
"fifth-born", "sixth-born"))
social_status <- factor(c(2, 3, 3, 2, 4, 1, 2, 3, 6, 1),
levels = c(1, 2, 3, 4, 5, 6),
labels = c("upper classes", "middle classes",
"lower middle class", "upper lower class",
"lower classes",
"single mother in household"))
urban_rural <- factor(c(1, 1, 3, 1, 1, 1, 1, 1, 1, 1), levels = c(1, 2, 3),
labels = c("city (over 20 000 inhabitants)",
"town (5000 to 20 000 inhabitants)",
"rural (up to 5000 inhabitants)"))
marital_mother <- factor(c(2, 2, 2, 2, 3, 2, 2, 2, 3, 3),
levels = c(1, 2, 3, 4),
labels = c("never married", "married",
"divorced", "widowed"))
test_set <- factor(c(1, 1, 2, 3, 1, 1, 2, 3, 1, 1), levels = c(1, 2, 3),
labels = c("German speaking child",
"Turkish speaking child tested in German at first test date",
"Turkish speaking child tested in Turkish at first test date"))
sub1_t1 <- c(52, 54, 46, 58, 37, 50, 48, 60, 56, 56)
sub3_t1 <- c(56, 59, 55, 47, 50, 59, 53, 49, 61, 62)
sub4_t1 <- c(43, 52, 47, 59, 38, 55, 40, 62, 53, 53)
sub5_t1 <- c(55, 57, 40, 47, 36, 52, 36, 57, 55, 57)
sub7_t1 <- c(50, 64, 50, 50, 50, 64, 47, 64, 57, 68)
sub1_t2 <- c(50, 56, 54, 60, 38, 52, 50, 60, 58, 60)
sub3_t2 <- c(55, 62, 47, 48, 48, 60, 52, 50, 59, 65)
sub4_t2 <- c(45, 53, 52, 57, 38, 57, 43, 64, 57, 57)
sub5_t2 <- c(55, 59, 55, 45, 36, 50, 45, 67, 57, 48)
sub7_t2 <- c(54, 65, 50, 54, 46, 61, 46, 69, 61, 65)
Example_1.1 <- data.frame(no, native_language, age, sex, age_birth, no_siblings,
pos_sibling, social_status, urban_rural,
marital_mother, test_set, sub1_t1, sub3_t1, sub4_t1,
sub5_t1, sub7_t1, sub1_t2, sub3_t2, sub4_t2, sub5_t2,
sub7_t2)
rm(no, native_language, age, sex, age_birth, no_siblings, pos_sibling,
social_status, urban_rural, marital_mother, test_set, sub1_t1, sub3_t1,
sub4_t1, sub5_t1, sub7_t1, sub1_t2, sub3_t2, sub4_t2, sub5_t2, sub7_t2)

################################################################################
# Import SPSS data set
# Install and load package foreign
install.packages("foreign")
library(foregin)
setwd(choose.dir())
Example_1.1 <- read.spss("Example_1.1.sav", to.data.frame = TRUE)
################################################################################

You might also like