# The file <201_03-04_vpcs.csv> contains data from a corpus study on the alternation of particle placement that was introduced in Section 1.3.1.
# - column 1: the number of the data point
# - column 2: whether the example is from spoken or written language
# - column 3: which construction is used
# - column 4: how complex the direct object is (3 levels)
# - column 5: how long the direct object is (in syllables)
# - column 6: whether the verb-particle construction is followed by a directional PP (2 levels)
# - column 7: whether the referent of the direct object is animate or inanimate (2 levels)
# - column 8: whether the referent of the direct object is concrete or abstract (2 levels)
# Clear all memory, read in this file, make the column names available, and test whether the input was successful.
rm(list=ls(all=TRUE)) # clear all memory
summary(vpcs <- read.delim("201_03-04_vpcs.csv"))
str(vpcs)
attach(vpcs)
# (1) You want to test whether the average lengths of direct objects in the two constructions differ from each other.
# (a) Formulate the text and statistical hypotheses for this study.
# (b) Explore/summarize the data and represent them graphically.
# (c) Compute the required statistical test and briefly summarize the result.
# (2) You want to test whether a particular grammar exercise can help improve the performance of second language learners. 10 learners do a grammar test and you note their numbers of correct answers. Then, the learners first do the grammar exercise you want to test and then participate in a second test (with the same number of questions). Again, you note the numbers of correct responses, hoping and expecting that the exercise leads to a better performance. Read in the data from <201_07_question2.csv>, make the column names available, and test whether the input was successful.
# (a) Formulate the text and statistical hypotheses for this study.
# (b) Explore/summarize the data and represent them graphically.
# (c) Compute the required statistical test and briefly summarize the result.
# (3) What does this script show and exemplify?
rm(list=ls(all=TRUE)) # clear all memory
set.seed(2) # don't bother about this line!
x1 <- rnorm(50); y1 <- rnorm(50)
x2 <- rnorm(50)+5; y2 <- rnorm(50)+5
x <- append(x1, x2); y <- append(y1, y2)
plot(y ~ x, pch=19); abline(lm(y ~ x))
points(y1 ~ x1, col="blue", pch=19); abline(lm(y1 ~ x1), col="blue")
points(y2 ~ x2, col="red", pch=19); abline(lm(y2 ~ x2), col="red")
# (4) The constituent order of verb-particle constructions in English has been argued to be dependent on the degree of entrenchment of the direct object's referent such that low-entrenchment referents prefer the constituent order in (1a) whereas high-entrenchment referents prefer the constituent order in (1b).
# (1) a. John picked up the book.
# b. John picked the book up.
# In order to determine whether this hypothesis is correct, examples of the two constructions were crossed with eleven different entrenchment levels (yielding 22 factor level combinations). Subjects were then given test sentences representing these factor level combinations and were instructed to rate the acceptability of the test sentences; 60 judgments were collected per factor level combination. The file in <201_07_question4.csv> contains the average judgments for each of the 22 combinations resulting from the experiment. Evaluate the data statistically to determine whether entrenchment does in fact have an effect on the acceptability of the verb-particle constructions and briefly discuss your results.
# (a) Formulate the text and statistical hypotheses for this study.
# (b) Explore/summarize the data and represent them graphically.
# (c) Compute the required statistical test and briefly summarize the result.