Re: [R-sig-eco] SPEI index

2014-12-23 Thread ONKELINX, Thierry
If the file is tab delimited then you need to use read.table(sep = \t) instead of read.table(sep = ). read.delim() is another option. ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie Kwaliteitszorg / team Biometrics Quality

Re: [R-sig-eco] How do I interpret linear mixed model contrast estimates from multcomp::glht()?

2014-12-12 Thread ONKELINX, Thierry
Dear Matthew, The part before == 0 are the rownames of the matrix passed to linfct. When the rownames are missing, the rownumbers are used. Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie Kwaliteitszorg /

Re: [R-sig-eco] Logistic regression with 2 categorical predictors

2014-10-21 Thread ONKELINX, Thierry
Tukey Van: Andrew Halford [mailto:andrew.half...@gmail.com] Verzonden: dinsdag 21 oktober 2014 16:19 Aan: ONKELINX, Thierry Onderwerp: Re: [R-sig-eco] Logistic regression with 2 categorical predictors Hi Thierry, Thanks for the response. I have run your code but it seems you cant call the summary

Re: [R-sig-eco] Logistic regression with 2 categorical predictors

2014-10-20 Thread ONKELINX, Thierry
Dear Andrew, anova() and summary() test different hypotheses. anova() tests is at least one level is different from the others. summary() tests if the coefficient is different from zero. Multiple comparison of different interaction levels is probably the most relevant in this case. The

Re: [R-sig-eco] Question about GEE and interaction plot

2014-10-17 Thread ONKELINX, Thierry
Dear Luis, 1) Have a look at the multcomp package for the multiple comparisons. You will have to define the relevant contrasts manually. 2) reorder() will help you. reorder(C$Comportamiento, C$Conteo, FUN = mean) Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek /

Re: [R-sig-eco] Mixed Effects Model with Post-hoc interaction contrasts (lme + glht)

2014-04-08 Thread ONKELINX, Thierry
Dear Alyse, The easiest way it to create a new variable that has the interaction. E.g. apa3$TimeReach - interaction(apa3$Time, apa3$Reach). Then refit your model with this variable instead of Time and Reach. lme(APA~ TimeReach, random=~1|Station, method=REML, data=apa3) The coefficient can be

Re: [R-sig-eco] lme4 for pseudoreplication avoidance

2013-02-25 Thread ONKELINX, Thierry
Dear Lara, I think you want lmer(AntSize ~ ColonySize + (1|ColonyID)) Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie Kwaliteitszorg / team Biometrics Quality Assurance Kliniekstraat 25 1070 Anderlecht

Re: [R-sig-eco] Zuur or Pinheiro Bates

2012-11-29 Thread ONKELINX, Thierry
Try to buy both books ;-) Zuur et al is great if you want to see how you can apply mixed models in ecology or when your math skills are not that high. Pinheiro Bates give a deeper theoretical inside and require a higher math skill. ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek

Re: [R-sig-eco] gam result

2012-05-22 Thread ONKELINX, Thierry
Given the failry complex model you want to fit on a relative small dataset, you should better seek some local (face-to-face) advise on your problem. Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie

Re: [R-sig-eco] Mixed effects models with ordinal response variable

2012-04-23 Thread ONKELINX, Thierry
Dear Omer, How much data do you have? And how strong is the effect of the variables? Do you get similar parameter estimates from clmm and MCMCglmm? It's not uncommon that when you have plenty of data non-relevant (small) effects become significant. Best regards, Thierry ir. Thierry Onkelinx

Re: [R-sig-eco] Understanding the output from lme anova

2010-12-06 Thread ONKELINX, Thierry
Dear Peter, A * B is just a shorthand notation for A + B + A:B The model will auto-expand those term to the : notation. Best regards, Thierry PS Creating the factors in your dataset and the use of spaces will increase the readability of your code!

Re: [R-sig-eco] New to R

2010-11-18 Thread ONKELINX, Thierry
Dear Bob, I enjoyed reading Zuur et al (2009) @BOOK{ title = {Mixed Effects Models and Extensions in Ecology with R}, publisher = {Springer New York}, year = {2009}, author = {Zuur, Alain F. and Ieno, Elena N. and Walker, Neil J. and Saveliev, Anatoly A. and Smith, Graham M.},

Re: [R-sig-eco] Zero-truncated Poisson model in R

2010-05-17 Thread ONKELINX, Thierry
Have a look at hurdle() from the pscl package. HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek team Biometrie Kwaliteitszorg Gaverstraat 4 9500 Geraardsbergen Belgium Research Institute for

Re: [R-sig-eco] GLS, GEE or LMM ??

2010-04-16 Thread ONKELINX, Thierry
be extracted from a given body of data. ~ John Tukey -Oorspronkelijk bericht- Van: Jens Oldeland [mailto:oldel...@gmx.de] Verzonden: vrijdag 16 april 2010 14:59 Aan: Ben Bolker CC: ONKELINX, Thierry; r-sig-ecology@r-project.org Onderwerp: Re: [R-sig-eco] GLS, GEE or LMM ?? Dear Ben

Re: [R-sig-eco] multiple regression (ONKELINX, Thierry)

2010-02-08 Thread ONKELINX, Thierry
Dear Alain, Thank you for your comments. Interesting thought. Maybe correct. But there are a few things to think about: 1. You have to assume that sampling was such that all species out there have ended up in the data. Formulated differently...you need to know the N_i (maximum number of

Re: [R-sig-eco] nested mixed model?

2010-02-03 Thread ONKELINX, Thierry
I aggree with Luciano. You should take the individual into account. The point is only relevant as a random effect if you have multiple records per point. I would use something like lme(response ~ species, data=tooth, random=~1|individual/bone/tooth) HTH, Thierry

Re: [R-sig-eco] FW: mixed effect model: compare seed families

2010-01-21 Thread ONKELINX, Thierry
for an answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey -Oorspronkelijk bericht- Van: Zoltan Botta-Dukat [mailto:b...@botanika.hu] Verzonden: donderdag 21 januari 2010 9:30 Aan: Dunbar, Michael CC: r-sig-ecology@r-project.org; ONKELINX, Thierry

Re: [R-sig-eco] mixed effect model: compare seed families

2010-01-19 Thread ONKELINX, Thierry
Dear Zoltan, You random effects are not nested but crossed. Use lmer from the lme4 package for that kind of problem. lmer(Y ~ soil * mother_size + (1|plot) + (1|site/seed_family)) HTH, Thierry ir. Thierry Onkelinx

Re: [R-sig-eco] pollination experiment with missing value

2009-12-08 Thread ONKELINX, Thierry
Dear Humberto, I suppose you are interessed in the significance of the treatment factor. You can test that effect by comparing models with and without the term. You can get the multiple comparisons with the multcomp package. Here is an example using the Pastes dataset. library(lme4)

Re: [R-sig-eco] mixed effects model in lme

2009-09-21 Thread ONKELINX, Thierry
-ecology@r-project.org; ONKELINX, Thierry; m...@ceh.ac.uk Onderwerp: Re: [R-sig-eco] mixed effects model in lme Dear List Members, Thank you very much for your helpful replies and advice. I would greatly appreciate any additional advice on how to rewrite my lme model to account for repeated

Re: [R-sig-eco] Log transforming zero value data

2009-06-24 Thread ONKELINX, Thierry
Dear Nate, Much depend on the nature of your data. If they are counts, then I would recommend to use glm(count ~x + y + z, family = poisson) instead of lm(log(count) ~ x + y + z). Otherwise people tend to use a log(x+1) transformation. HTH, Thierry

Re: [R-sig-eco] ANOVA Output

2008-11-13 Thread ONKELINX, Thierry
Dear Katrina, The F-value are different because you test different hypotheses since anova yields Type I SS. It looks like you expect Type III SS. HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en