Attachment 'graff-script.R'

Download

   1 #You will have to have languageR and Design installed to run this code.
   2 
   3 library(languageR)
   4 library(Design)
   5 
   6 lrm = lrm(RealizationOfRec~AnimacyOfRec+AnimacyOfTheme+LengthOfTheme,data=verbs)
   7 lrm
   8 glm = glm(RealizationOfRec~AnimacyOfRec+AnimacyOfTheme+LengthOfTheme,data=verbs,family="binomial")
   9 summary(glm)
  10 lmer = lmer(RealizationOfRec~AnimacyOfRec+AnimacyOfTheme+LengthOfTheme+(1|Verb),data=verbs,family="binomial")
  11 lmer
  12 
  13 #LRM Stepwise
  14 
  15 anova(lrm)
  16 
  17 #LRM Comparison
  18 
  19 lrm = lrm(RealizationOfRec~AnimacyOfRec+AnimacyOfTheme+LengthOfTheme,data=verbs)
  20 lrm.length = lrm(RealizationOfRec~LengthOfTheme,data=verbs)
  21 lrm.animac = lrm(RealizationOfRec~AnimacyOfRec+AnimacyOfTheme,data=verbs)
  22 
  23 dchisq(deviance(lrm.length)[2]-deviance(lrm)[2],lrm$stat[4]-lrm.length$stat[4])
  24 dchisq(deviance(lrm.animac)[2]-deviance(lrm)[2],lrm$stat[4]-lrm.animac$stat[4])
  25 
  26 #LMER Comparison
  27 
  28 lmer = lmer(RealizationOfRec~AnimacyOfRec+AnimacyOfTheme+LengthOfTheme+(1|Verb),data=verbs,family="binomial")
  29 lmer.length = lmer(RealizationOfRec~LengthOfTheme+(1|Verb),data=verbs,family="binomial")
  30 lmer.animac = lmer(RealizationOfRec~AnimacyOfRec+AnimacyOfTheme+(1|Verb),data=verbs,family="binomial")
  31 
  32 anova(lmer,lmer.length)
  33 anova(lmer,lmer.animac)
  34 
  35 d=read.csv(file="PluralComparisonMontreal.csv",header=T)
  36 
  37 head(d)
  38 
  39 #Your turn! Go nuts!
  40 
  41 lmer(resp~(1|as.factor(d$subj))+(1|as.factor(d$item))+(1|as.factor(d$order))
  42 +MatuRuys
  43 +catMean
  44 +probMean
  45 ,data=d,family="binomial")

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2021-04-22 12:56:04, 10.9 KB) [[attachment:Day1.R]]
  • [get | view] (2021-04-22 12:56:04, 1697.7 KB) [[attachment:Day1.pdf]]
  • [get | view] (2021-04-22 12:56:04, 2625.1 KB) [[attachment:Day2.pdf]]
  • [get | view] (2021-04-22 12:56:04, 2261.1 KB) [[attachment:Groningen11.pdf]]
  • [get | view] (2021-04-22 12:56:05, 63.3 KB) [[attachment:PluralComparisonMontreal.csv]]
  • [get | view] (2021-04-22 12:56:04, 10.9 KB) [[attachment:day1-script.R]]
  • [get | view] (2021-04-22 12:56:04, 23.0 KB) [[attachment:fakedata.txt]]
  • [get | view] (2021-04-22 12:56:04, 3.8 KB) [[attachment:gillespie-script.R]]
  • [get | view] (2021-04-22 12:56:04, 624.2 KB) [[attachment:gillespie-tutorial.pdf]]
  • [get | view] (2021-04-22 12:56:04, 1.4 KB) [[attachment:graff-script.R]]
  • [get | view] (2021-04-22 12:56:04, 514.0 KB) [[attachment:graff-tutorial.pdf]]
  • [get | view] (2021-04-22 12:56:05, 6860.5 KB) [[attachment:lecture1McGill.pdf]]
  • [get | view] (2021-04-22 12:56:05, 2614.6 KB) [[attachment:lecture2McGill.pdf]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.

MoinMoin Appliance - Powered by TurnKey Linux