From vasishth.shravan at gmail.com Sun Apr 6 21:52:30 2008 From: vasishth.shravan at gmail.com (S Vasishth) Date: Mon, 7 Apr 2008 06:52:30 +0200 Subject: [R-lang] R-Forge listing of published or in-press work using lme4 Message-ID: Hello all, Many of you are aware of the statistical package lme4 used in R for carrying out mixed-effects modeling. The R-Forge [ https://r-forge.r-project.org/projects/lme4/] is going to maintain a list of all dissertations and articles (accepted for publication, in press, or published) that use lme4 or its precursor, nlme. It would be helpful if members of the r-lang, cuny and amlap lists could send me citation details of any of their articles that have appeared in psycholinguistics (or other areas) that use lme4 or nlme. I will them put them up on the R-Forge page. Currently we would like to focus only on published or accepted work, but later on we can expand to unpublished work that nevertheless appears in proceedings volumes. An exception is articles in Association for Computational Linguistics-type proceedings volumes, which count as publications. Although the citations can we send in vanilla form, it would save me loads of time in maintaining the list of articles and automatically reformatting them for displaying on the web if the format of the submission were in bibtex. I give some examples below. If there are questions, just write to me and ask. IMPORTANT: When submitting a list of articles etc., please have the SUBJECT line: lme4 pubs R-Forge Examples of bibtex entries: @Article{greenspansegal84, author = {Greenspan, S. L. and Segal, E. M.}, title = {Reference and comprehension: {A} topic-comment analysis of sentence-picture verification}, journal = {Cognitive Psychology}, year = {1984}, key = {lme4}, %% this is just an example!!! volume = {16}, number = {4}, pages = {556-606}, OPTmonth = {}, OPTnote = {}, OPTannote = {} url = {http://www.somewhere.org/thepaper.pdf} %% example!!! } @Proceedings{, title = {}, year = {}, OPTkey = {}, OPTbooktitle = {}, OPTeditor = {}, OPTvolume = {}, OPTnumber = {}, OPTseries = {}, OPTaddress = {}, OPTmonth = {}, OPTorganization = {}, OPTpublisher = {}, OPTnote = {}, OPTannote = {} } @PhdThesis{, author = {}, title = {}, school = {}, year = {}, OPTkey = {}, OPTtype = {}, OPTaddress = {}, OPTmonth = {}, OPTnote = {}, OPTannote = {} } Many thanks, -- Professor Dr. Shravan Vasishth Empirical Methods in Syntax Institute for Linguistics, Potsdam, Germany Tel: +49-(0)331-977-2016, -2457 Fax: -2087 http://www.ling.uni-potsdam.de/~vasishth -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pidgin.ucsd.edu/pipermail/r-lang/attachments/20080407/30647f43/attachment.htm From schack at humnet.ucla.edu Wed Apr 23 12:53:19 2008 From: schack at humnet.ucla.edu (Schack Tang, Katie) Date: Wed, 23 Apr 2008 12:53:19 -0700 Subject: [R-lang] question about model interpretation using lmer Message-ID: <31C1DA6A7615F74EAE7A4262334C447F02023DE5@hermes.humnet.ucla.edu> Hi, I have a question about interpreting a mixed effects model. I am modeling median F0 on a vowel based on a variety of factors. The one I am concerned with here, PrecedingSegment, has 6 levels. I give the R output from a lmer function below. PrecSegment(none) -1.716815 4.3652 0.393 PrecSegment(son) 3.488424 0.919801 3.793 PrecSegment(vce) 0.745261 0.948666 0.786 PrecSegment(vceless) 7.233391 0.928507 7.79 PrecSegment(vowel) 8.319552 4.782556 1.74 The withheld value is implosive. I have two questions: 1) Does the fact that voiced (vce) fails to reach significance on its own indicate that its effect on F0 is not significantly different from the effect of an implosive on F0? 2) What can I conclude about the sonorant (son) and voiceless (vceless)? Can I just conclude that they both raise F0 compared to implosives? Or can I also conclude that voiceless raises F0 more than sonorant does? If the former, how can I test the latter--is it possible to specify which level of a factor is withheld in lmer? Thanks, Katie Tang -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pidgin.ucsd.edu/pipermail/r-lang/attachments/20080423/35b77651/attachment.htm From austin.frank at gmail.com Wed Apr 23 16:59:22 2008 From: austin.frank at gmail.com (Austin Frank) Date: Wed, 23 Apr 2008 19:59:22 -0400 Subject: [R-lang] question about model interpretation using lmer References: <31C1DA6A7615F74EAE7A4262334C447F02023DE5@hermes.humnet.ucla.edu> Message-ID: On Wed, Apr 23 2008, Schack Tang, Katie wrote: > Hi, > > I have a question about interpreting a mixed effects model. I am > modeling median F0 on a vowel based on a variety of factors. The one > I am concerned with here, PrecedingSegment, has 6 levels. I give the > R output from a lmer function below. > > PrecSegment(none) -1.716815 4.3652 0.393 > PrecSegment(son) 3.488424 0.919801 3.793 > PrecSegment(vce) 0.745261 0.948666 0.786 > PrecSegment(vceless) 7.233391 0.928507 7.79 > PrecSegment(vowel) 8.319552 4.782556 1.74 > > The withheld value is implosive. > > I have two questions: > > 1) Does the fact that voiced (vce) fails to reach significance on its > own indicate that its effect on F0 is not significantly different > from the effect of an implosive on F0? Assuming you're using the default contrasts (contr.treatment), then yes, this is the correct interpretation. If you change to sum-to-zero contrasts (contr.sum), then you'd be comparing each level to the mean. You can change which contrast coding scheme is used by --8<---------------cut here---------------start------------->8--- options(contrasts=c("contr.sum", "contr.poly")) --8<---------------cut here---------------end--------------->8--- The first element of the vector defines which contrasts to use for unordered factors, the second is for ordered factors. > 2) What can I conclude about the sonorant (son) and voiceless > (vceless)? Can I just conclude that they both raise F0 compared to > implosives? You can conclude this. > Or can I also conclude that voiceless raises F0 more than sonorant > does? You cannot conclude this. > If the former, how can I test the latter? I have recently seen a recommendation for the method glht from the package Multcomp. I haven't used it myself. If you use it, please report back and let us know if it's useful! > is it possible to specify which level of a factor is withheld in lmer? Sure. This --8<---------------cut here---------------start------------->8--- data$factor1 <- relevel(data$factor1, ref="none") --8<---------------cut here---------------end--------------->8--- will change the factor so that the level coded as "none" is the reference level. If you care about the ordering of the levels (this can be important for graphing the results, for example), you can try --8<---------------cut here---------------start------------->8--- data$factor1 <- factor(data$factor1, levels=c("none", "vowel", "vce", "vceless", "son")) --8<---------------cut here---------------end--------------->8--- This will place the levels of the factor in that specific order. If you don't do this, R defaults to ordering the levels of the factor alphabetically. Even if you use relevel(), R will still order the remaining levels alphabetically. HTH, /au -- Austin Frank http://aufrank.net GPG Public Key (D7398C2F): http://aufrank.net/personal.asc -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 193 bytes Desc: not available Url : http://pidgin.ucsd.edu/pipermail/r-lang/attachments/20080423/216b46ee/attachment.pgp From dreitter at inf.ed.ac.uk Thu Apr 24 10:23:45 2008 From: dreitter at inf.ed.ac.uk (David Reitter) Date: Thu, 24 Apr 2008 18:23:45 +0100 Subject: [R-lang] question about model interpretation using lmer In-Reply-To: <31C1DA6A7615F74EAE7A4262334C447F02023DE5@hermes.humnet.ucla.edu> References: <31C1DA6A7615F74EAE7A4262334C447F02023DE5@hermes.humnet.ucla.edu> Message-ID: On 23 Apr 2008, at 20:53, Schack Tang, Katie wrote: > > 1) Does the fact that voiced (vce) fails to reach significance on > its own indicate that its effect on F0 is not significantly > different from the effect of an implosive on F0? > Yes. Your example suggests you're using the default contrasts. > 2) What can I conclude about the sonorant (son) and voiceless > (vceless)? Can I just conclude that they both raise F0 compared to > implosives? > Yes. > Or can I also conclude that voiceless raises F0 more than sonorant > does? > No. > If the former, how can I test the latter--is it possible to specify > which level of a factor is withheld in lmer? > Normally, the first factor is withheld; manipulating the contrasts matrix will give you the right results. Usually, calculating effect sizes and confidence intervals is very informative. First, you will need to manipulate the contrasts: F0 ~ 1/PrecSegment instead of F0 ~ 1 + PrecSegment (the "1" intercept is implicit) should give you a model without explicit intercept, but separate estimates for all PrecSegment levels. To estimate confidence intervals, I've had comparatively good results with the pvals.fnc function (languageR package) and its Markov Chain Monte-Carlo sampling strategy. I had to slightly patch this function to accept "glmer" rather than just "lmer" type models, and I also understand (p.c.) that recent versions do not yet work well with more than one random effect. There are occasional problems with minimal (i.e. zero-sized) confidence intervals; manipulating the number of simulations (a parameter to the pvals.fnc function) can help. As far as I know, the confidence intervals that are estimated this way are non-simultaneous. Thus, fishing for effects without defining explicit hypotheses will have the usual consequences. (If you have corpus data, the use of separate samples for each hypothesis should give you reliable p's and confidence intervals in that respect.) -- David Reitter ICCS/HCRC, Informatics, University of Edinburgh http://www.david-reitter.com -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2450 bytes Desc: not available Url : http://pidgin.ucsd.edu/pipermail/r-lang/attachments/20080424/515db72a/attachment.bin From njs at pobox.com Thu Apr 24 17:05:02 2008 From: njs at pobox.com (Nathaniel Smith) Date: Thu, 24 Apr 2008 17:05:02 -0700 Subject: [R-lang] question about model interpretation using lmer In-Reply-To: References: <31C1DA6A7615F74EAE7A4262334C447F02023DE5@hermes.humnet.ucla.edu> Message-ID: <20080425000502.GA31788@frances.vorpus.org> On Wed, Apr 23, 2008 at 07:59:22PM -0400, Austin Frank wrote: > > is it possible to specify which level of a factor is withheld in lmer? > > Sure. This > > --8<---------------cut here---------------start------------->8--- > data$factor1 <- relevel(data$factor1, ref="none") > --8<---------------cut here---------------end--------------->8--- > > will change the factor so that the level coded as "none" is the > reference level. If you care about the ordering of the levels (this can > be important for graphing the results, for example), you can try > > --8<---------------cut here---------------start------------->8--- > data$factor1 <- factor(data$factor1, > levels=c("none", "vowel", "vce", "vceless", "son")) > --8<---------------cut here---------------end--------------->8--- > > This will place the levels of the factor in that specific order. If you > don't do this, R defaults to ordering the levels of the factor > alphabetically. Even if you use relevel(), R will still order the > remaining levels alphabetically. In addition to reordering the levels of your factor, you can also explicitly tell contr.treatment which level to use as the "base". Unfortunately, it wants to know the *index* of the level, not its name, so if "none" is the third level, you can use factor1 <- C(factor1, base=3) # Set it permanently lm(y ~ C(factor1, base=3)) # Use it for just this fit or whatever. Stupid R tricks: my.contr.treatment <- function(n, base=1, contrasts=TRUE, ref) { if (!missing(ref)) base <- match(ref, levels(n)) contr.treatment(n, base=base, contrasts=contrasts) } lm(y ~ C(factor1, my.contr.treatment, ref="none") -- Nathaniel -- Electrons find their paths in subtle ways.