• Keine Ergebnisse gefunden

age = as.character(with(nicole, rep(age, 3

N/A
N/A
Protected

Academic year: 2021

Aktie "age = as.character(with(nicole, rep(age, 3"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Page 1 of 2

nicole.R 31.01.13 07:14

library(lattice); library(lme4); library(lattice)

########################################################### Nicoles Daten einlesen nicole = read.table(file.path(pfadu, "nicole.txt"), header=T)

vpn = as.character(with(nicole, rep(vpn, 3))) age = as.character(with(nicole, rep(age, 3)))

gender = as.character(with(nicole, rep(gender, 3)))

bos = as.character(c(rep("b1", nrow(nicole)), rep("b2", nrow(nicole)), rep("b3", nrow (nicole))))

pant = with(nicole, rep(pantomime, 3)) Q = with(nicole, c(Bosu_1, Bosu_2, Bosu_3)) P = 10 - Q

############################################################ Kurz-Format kurz.df = data.frame(P, Q, Vpn = factor(vpn), Age = factor(age),

Gen=factor(gender), Bos = factor(bos), pant = pant)

############################################################# Kurz in Lang-Format vpnl = with(kurz.df, c(rep(as.character(Vpn), P), rep(as.character(Vpn), Q))) agel = with(kurz.df, c(rep(as.character(Age), P), rep(as.character(Age), Q))) genl = with(kurz.df, c(rep(as.character(Gen), P), rep(as.character(Gen), Q))) bosl = with(kurz.df, c(rep(as.character(Bos), P), rep(as.character(Bos), Q))) pantl = with(kurz.df, c(rep(pant, P), rep(pant, Q)))

urteil = with(kurz.df, c(rep("JA", sum(P)), rep("N", sum(Q))))

############################################################## Lang-Format

lang.df = data.frame(Urteil = factor(urteil), Vpn = factor(vpnl), Age = factor(agel), Gen=factor(genl),

Bos = factor(bosl), pant = pantl)

############################################################### Analyse Lang-Format

# Inwiefern wird Urteil von Bos und Age beeinflusst?

# Abbildung

tab = with(lang.df, table(Bos, Age, Urteil)) prop = prop.table(tab, 1:2)

barchart(prop, auto.key=T, horizontal=F, ylab = "Proportion")

# Statistik

o = lmer(Urteil ~ Age * Bos + (1|Vpn), family=binomial, data = lang.df)

# Interaktion?

o2 = update(o, ~ . -Age:Bos) anova(o, o2)

# Keine Interaktion

# Age sig?

o3 = update(o2, ~ . -Age)

# Ja: X2[1] = 27.1, p < 0.001 anova(o2,o3)

# Bos-type sig?

o4 = update(o2, ~ . -Bos)

# Ja: X2[2] = 84.6, p < 0.001 anova(o2, o4)

############################################################### Analyse Kurz-Format

(2)

Page 2 of 2

nicole.R 31.01.13 07:14

# Analyse Kurz-Format

# Inwiefern wird Urteil von Bos und Age beeinflusst?

# Abbildung

psum = with(kurz.df, aggregate(P, list(Age, Bos), sum)) qsum = with(kurz.df, aggregate(Q, list(Age, Bos), sum)) psum = cbind(psum, qsum$x)

names(psum) = c("Age", "Bos", "P", "Q")

# Häufigkeit

barchart(cbind(P, Q) ~ Age | Bos, data = psum, ylab = "Häufigkeit")

# Proportion

prop.kurz = with(psum, P/(P+Q))

barchart(prop.kurz ~ Age | Bos, data = psum, ylab = "Proportion", ylim=c(0,1))

# Statistik

okurz = lmer(cbind(P, Q) ~ Age * Bos + (1|Vpn), family=binomial, data = kurz.df) okurz2 = update(okurz, ~ . -Age:Bos)

anova(okurz, okurz2)

# Keine Interaktion

# Age sig?

okurz3 = update(okurz2, ~ . -Age)

# Ja: X2[1] = 27.1, p < 0.001 anova(okurz2,okurz3)

# Bos-type sig?

okurz4 = update(okurz2, ~ . -Bos)

# Ja: X2[2] = 84.6, p < 0.001 anova(okurz2, okurz4)

Referenzen

ÄHNLICHE DOKUMENTE

Coming to aggregated values, we studied the distribution of ages at the time of the work that later won the award, and found that the time constant is exactly the same for the

karistati muuhulgas KrK § 1411 lg 3 p 1 (võõra vara suures ulatuses omastamine ametiseisundi kuritarvi- tamise teel) alusel selle eest, et ta aktsiaseltsi KKH juhatuse liikmena

By using a latent variable approach, the outline of this study allows the investigation of the differential impact of specific personality dimensions, medication intake

Numerous studies were performed to understand the formation processes of these objects leading to two important discoveries: (1) the GCs show a bimodal metallicity/color

Es soll ihm erm¨ oglicht werden die Schriftform, -farbe und -gr¨ osse selbst zu bestimmen und diese auch gegen¨ uber den Inhalt- und Benutzerprogramm ein- gestellten

nau inihre angewiefene Stelle Eommt, und auch bey jeder Wendung der Noniusfyeibe darin verbleibt. Hierauf führt man den Zeiger des Nonius 1 dur) die Schrauben A und ö genau auf

1 are sandwiched between the westerlies’ 4.2 ka BP event proxies at the Mavri Trypa coastal Peloponnesian Greece speleothem, sampling resolution 5 years (Finné et al., 2017),

Eve ry person and every company who purchases an Altair 8800 is entitled to a free, one year membership in the Altair Users Group_ This group (now numbering over 3,000)