Re: [R-sig-eco] Correction: negative binomial mixed model using glmmadmb

2016-06-10 Thread Ben Bolker
Heather Major writes: > > A small correction to my original post: the arrival > fixed effect is a number (a count) and ranges between 0 - 52. > > Hello, I am new to R and working to understand the programming > language and how the different tests work. I've jumped a bit

Re: [R-sig-eco] cloglog logistic regression interpretation

2015-01-08 Thread Ben Bolker
discouraged), it's polite to mention that you're doing so (to save people the trouble of answering if the question has already been answered elsewhere). cheers Ben Bolker ___ R-sig-ecology mailing list R-sig-ecology@r-project.org https://stat.ethz.ch

Re: [R-sig-eco] Fitting a Weibull with a 0 dose

2015-01-04 Thread Ben Bolker
Dixon, Philip M [STAT] pdixon@... writes: Katie, I second Ben's suggestion to use functions in the drc library, not nls(). Not only do those functions model binomial or overdispersed binomial data, but they provide estimates and confidence intervals for the EC50 and any other EC, e.g. EC10.

Re: [R-sig-eco] EC50 Calculations using Insect Size

2015-01-03 Thread Ben Bolker
Katie Harding katiemharding@... writes: I have insect size measurements that I fit to a Weibull curve to determine EC50.  This is my model fit:model=nls(y~SSweibull(x,asym,drop,lrc,pwr)) I need to use the untreated buffer samples as the maximum size (the left most asymptope).  If I put

Re: [R-sig-eco] ANCOVA with random effects for slope and intercept

2014-11-05 Thread Ben Bolker
peterhouk1 . peterhouk@... writes: Greetings Mollie - Sure, the first general approach without explicitly telling R of my grouping factor (not sure if that makes a difference, but second example below does this). My best guess is that the full model has significance, but the random

Re: [R-sig-eco] Nested factors in GLMER

2014-07-11 Thread Ben Bolker
and plot is the random variable and you're testing for an interaction between year and plot. You might want to try r-sig-mixed-mod...@r-project.org with this one. (Do mention that you tried r-sig-ecology first) Ben Bolker ___ R-sig-ecology mailing

Re: [R-sig-eco] k-truncated negative binomial

2014-05-16 Thread Ben Bolker
Lee, Laura laura.lee@... writes: Hi all! Is there a package or function to model data using a k-truncated negative binomial distribution? I know the truncated function in the 'aster' package can be used to simulate data, but I need to model. Thanks! Laura You could write a

Re: [R-sig-eco] reporting non significant glmmPQL results of a fixed factor with two three levels

2014-01-02 Thread Ben Bolker
this thread (which also suggests alternatives) http://r.789695.n4.nabble.com/combining-P-values-using-Fisher-s-method- td832459.html [URL broken] or http://finzi.psych.upenn.edu/R/library/MADAM/html/fisher.method.html good luck Ben Bolker ___ R-sig

Re: [R-sig-eco] Dealing with overdispersion in mixed model with count data

2013-12-04 Thread Ben Bolker
, and a variety of references on observation-level random effects, at http://glmm.wikidot.com/faq#overdispersion Ben Bolker ___ R-sig-ecology mailing list R-sig-ecology@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

[R-sig-eco] Fwd: Fwd: Re: cozigam

2012-06-13 Thread Ben Bolker
[oops, cc'd to r-sig-mixed by mistake. Sorry. Re-posting to r-sig-ecology.] Original Message Subject: Fwd: Re: [R-sig-eco] cozigam Date: Wed, 13 Jun 2012 07:40:08 -0400 From: Ben Bolker bbol...@gmail.com To: r-sig-mixed-mod...@r-project.org r-sig-mixed-mod...@r-project.org

Re: [R-sig-eco] cozigam

2012-06-13 Thread Ben Bolker
at the new Zuur et al. book on zero-inflated models for guidance? thanks On Wed, Jun 13, 2012 at 4:10 PM, Ben Bolker bbol...@gmail.com mailto:bbol...@gmail.com wrote: [cc'ing back to r-ecology] Original Message Subject:Re: [R-sig-eco] cozigam

Re: [R-sig-eco] Fixing heteroscedasticity in mixed-effects model?

2012-03-29 Thread Ben Bolker
Malin Pinsky malin.pinsky@... writes: I'm having problems fitting a mixed-effects model for an ecological meta-analysis, and I'm curious if anyone has advice. In particular, it's pretty clear that the variance in the residuals increases with the predicted mean, but my normal fixes don't seem

Re: [R-sig-eco] Create new corStruct class for lme model

2012-01-21 Thread Ben Bolker
Shawn O'Neil oneil.shawnt@... writes: I am running mixed effects models using the nlme package. I am working with a dataset where spatial autocorrelation is inherent in the response variable. I have tested each of the five correlation structures that are available for mixed models in nlme,

Re: [R-sig-eco] papers about using MCMC in ecological study

2011-11-26 Thread Ben Bolker
Jakub Szymkowiak qbaszym@... writes: Duncan, Rob, Peter - thanks a lot for suggestions about literature! Peter - by MCMC methods I mean Markov Chain Monte Carlo ;) I have great book by Ben Bolker - Ecological Models and Data in R, but I'm searching for more examples of using MCMC

Re: [R-sig-eco] Marrying Tukey's HSD and ANOVA results

2011-11-18 Thread Ben Bolker
Lara R. Appleby 04 Lara.R.Appleby.04@... writes: I've done a standard two way ANOVA using glm on the dependent variable clutchsize with the two factors treatment (which has 3 levels called 1, 2, and 3) and species (which has two levels called 1 and 2). Apparently there is no significant

Re: [R-sig-eco] error produced when using function mle2()

2011-11-11 Thread Ben Bolker
idea to test your objective function outside of mle2() first. Ben Bolker ___ R-sig-ecology mailing list R-sig-ecology@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

Re: [R-sig-eco] Calculate Prediction Interval for Regression by hand...

2011-10-24 Thread Ben Bolker
Johannes Radinger JRadinger@... writes: thank you all for you tips with predict, predict.lm etc. From summary(lm-model), I can get the Estimate and the Standard Error for intercept and slopes. With confint I can get confidence intervals (?) for these parameters for different levels. I want

Re: [R-sig-eco] NaNs produced in the process of maximum likelihood

2011-10-23 Thread Ben Bolker
lgj200306 lgj200306@... writes: Thaks David very much, but how can I improve my model? Should I change my likelihood function or do some thing else? Best wishes for all list members! Your choices are: (1) if the final result looks sensible, and none of the final predicted values

Re: [R-sig-eco] Confidence intervals in lmer

2011-10-23 Thread Ben Bolker
Chris Howden chris@... writes: U could try the predict function with se.fit=true. I believe this should give u the predicted score and se and u can calculate CI from there. U'll have to create an input matrix with the score u want to predict for. Unfortunately, predict() doesn't

Re: [R-sig-eco] Continuous distribution for zero or positive values (inGLM or GLMM)

2011-05-20 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/19/2011 06:24 PM, Fred Takahashi wrote: Ben and Ruben, thank you very much for the suggestions. I started the “homework” and I had the impression that I can forget to find a GLMM implementation with Tweedie distribution (in a preliminar GLM,

Re: [R-sig-eco] quasi-complete seperation in logistic regression

2011-05-19 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/19/2011 02:41 PM, Stolen, D Eric (KSC-IHA-4400)[Innovative Health Applications LLC] wrote: Hello; I am working on a logistic regression model in which I have quasi-complete separation on an explanatory variable (see table below). The

Re: [R-sig-eco] subsetting data in R

2011-04-26 Thread Ben Bolker
If this isn't already answered: I don't quite understand the question: what do you mean by do a complete data set from an object in R? What do you mean by the subsetting is dangerous ... as you need to specify the levels for all your factors again? (What do your 3000 columns of data

Re: [R-sig-eco] zero-truncated Poisson

2011-04-10 Thread Ben Bolker
+year), data=subset(blja,mass10), start=list(logmu=1)) It also changes the estimate of the mass effect considerably: confint(m1) confint(m2) Ben Bolker ___ R-sig-ecology mailing list R-sig-ecology@r-project.org https

Re: [R-sig-eco] zero-truncated Poisson

2011-04-08 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/08/2011 04:10 PM, Stratford, Jeffrey wrote: Hi everyone, I'm attempting to run a zero-truncated Poisson using VGAM and I run into this error: Error in if ((temp - sum(wz[, 1:M, drop = FALSE] wzepsilon))) warning(paste(temp, :

Re: [R-sig-eco] Linear Model of Data in Matrix Form

2011-04-04 Thread Ben Bolker
On 11-04-03 11:05 PM, Jane Shevtsov wrote: Thanks, but that doesn't quite work. Using your toy example gives an error about variable lengths. z - matrix(1:9,nrow=3,dimnames=list(1:3,4:6)) z.melt - melt(z) z.melt X1 X2 value 1 1 4 1 2 2 4 2 3 3 4 3 4 1 5 4 5

Re: [R-sig-eco] Linear Model of Data in Matrix Form

2011-04-03 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11-04-02 10:39 PM, Jane Shevtsov wrote: I have data in matrix form from a parameter scan of a food web simulation. (The matrix entry M[i,j] gives the variable of interest for a web size i and connectance j.) How would I find an equation

Re: [R-sig-eco] correlated residuals

2011-03-31 Thread Ben Bolker
, but if the phase of the cycle is consistent through the whole time period you could add a sinusoidal component (with known phase and period) to the model ... Ben Bolker -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http

Re: [R-sig-eco] Help with mixed effects model using lme

2011-03-17 Thread Ben Bolker
On 03/17/2011 06:27 PM, Gabe Strain wrote: Hi all, I am relatively new to R and am having problems modelling my data. I sampled a single salamander species along streams (Sites, random effect, n=16) over five months (fixed effect) with three methods (TRMT, fixed effect). Philosophically,

Re: [R-sig-eco] marginal vs sequential results of lme

2011-01-20 Thread Ben Bolker
On 11-01-20 12:24 PM, Iannone, Basil wrote: Dear R users, I am having a problem with interpreting anova results of a linear mixed effects model. The data I am analyzing is from study that was set up as a randomized block design with two factors at two levels. The model is: m1 -

Re: [R-sig-eco] omit levels from boxplots

2011-01-06 Thread Ben Bolker
On 11-01-06 12:16 PM, Jarrett Byrnes wrote: Ah, so, you have factors that are no longer present in the data. I use a quick function I wrote called purgef to get rid of zombie factors. purgef-function(x) lapply(x, function(x) x[drop = TRUE]) So, here, before your boxplot dat$ageclass

Re: [R-sig-eco] Stochastic Model Gives Deterministic Output

2010-12-31 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Works for me? occ - c(2,5,3) n1 - nullModel.spsite(occ, iter=5, plots=10) n2 - nullModel.spsite(occ, iter=5, plots=10) n1[,,1] n2[,,1] all(n1[,,1]==n2[,,1]) ## FALSE Can you show an example that doesn't work? (This is with R 2.12.1, but

Re: [R-sig-eco] SEM with time series?

2010-11-29 Thread Ben Bolker
treatment of multi-level modeling in general] or (3) my book [not as specific to Bayes/WinBUGS, but long on general explanation] for tackling your real problem. good luck ... Ben Bolker ___ R-sig-ecology mailing list R-sig-ecology@r-project.org https

Re: [R-sig-eco] Relating species abundance and cover

2010-10-31 Thread Ben Bolker
that this can be done using an object/approach called 'copulas' but this is a whole new can of worms which I have not opened myself ... Ben Bolker -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

[R-sig-eco] demographic matrix diagrams?

2010-10-30 Thread Ben Bolker
before I waste time doing it, has anyone written code that uses Rgraphviz to translate demographic (Leslie/Lefkovitch) matrices into state diagrams? Can't find anything on the web ... Ben Bolker ___ R-sig-ecology mailing list R-sig-ecology@r

[R-sig-eco] demographic matrix graphs: ugly but a start

2010-10-30 Thread Ben Bolker
library(Rgraphviz) X - matrix(c(0, 0.1, 1.5, 1, 0, 0, 0, 0.4, 0.2), byrow=TRUE, nrow=3) dimnames(X) - list(c(J,A1,A2),c(J,A1,A2)) X Xg - as(t(X),graphNEL) plot(Xg,recipEdges=distinct) ew - as.character(unlist(edgeWeights(Xg))) ew -

Re: [R-sig-eco] Relating abundance and cover data

2010-10-26 Thread Ben Bolker
other way where there is no natural denominator, I would either (sigh) use transformations or look into beta regression. I'd be interested to hear other opinions. good luck, Ben Bolker Boughton, Elizabeth H., Pedro F. Quintana-Ascencio, and Patrick J. Bohlen. 2010. Refuge effects of Juncus

Re: [R-sig-eco] Suggestion for Paired Population Trend Analysis

2010-09-24 Thread Ben Bolker
for autocorrelation, nonlinear trends, etc.), I don't know that it would be worth it except for the purposes of learning how to do it. Ben Bolker -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

Re: [R-sig-eco] Symmetrical dot density graph

2010-09-20 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10-09-20 12:10 PM, Conrado Galdino wrote: Dear all, I would like to know how to do a 'symmetrical dot density graphic' (example image in the link http://imgfrog.com/?v=2fP0.png ) with R. I tried hard but with no success. If some one can help

Re: [R-sig-eco] Fwd: AIC for Tps

2010-09-10 Thread Ben Bolker
On 10-09-09 03:52 PM, Jorge Velasquez wrote: Hi there, Is anyone aware of a method I could use to calculate AIC values for models obtained using the thin plate splines function (Tps) from the package fields? Thanks, Jorge Don't know, but does the mgcv package also fit the model you

Re: [R-sig-eco] hurdle model for experiment anlysis

2010-09-01 Thread Ben Bolker
in ecology with R. Chapter 11 Zero-Truncated and Zero-Inflated Models for Count Data. Am 31/08/2010 11:21, schrieb Ben Bolker: A few comments: are the habitats replicated? If not, you have a fairly serious experimental design problem -- you can't statistically distinguish between the measured

Re: [R-sig-eco] AIC / BIC vs P-Values in lmer

2010-08-05 Thread Ben Bolker
Chris Mcowen chrismco...@... writes: Hi Philip, Thanks very much for this, i was completely unaware. I have read various papers using lmer to calculate the AIC statistic and none have mentioned this? I have just run through a random section of my models with this correction, however

Re: [R-sig-eco] AIC / BIC vs P-Values / MAM

2010-08-04 Thread Ben Bolker
hypotheses about which factors are important**, simply fit the full model and base your inference on the estimates and confidence intervals from the full model. good luck, Ben Bolker ___ R-sig-ecology mailing list R-sig-ecology@r-project.org https

Re: [R-sig-eco] AIC / BIC vs P-Values / MAM

2010-08-04 Thread Ben Bolker
On 10-08-04 01:13 PM, Chris Mcowen wrote: Hi Ben, That is great thanks. whether you select models via p-value or AIC *should* be based on whether you are trying to test hypotheses or make predictions I have 7 factors of which 5 have been shown, theoretically and empirically, to

Re: [R-sig-eco] AIC / BIC vs P-Values / MAM

2010-08-04 Thread Ben Bolker
, and i have never used a model to predict unknown values. But i am sure i will come to it if  read around! Thanks for all your help, it is greatly appreciated On 4 Aug 2010, at 20:09, Ben Bolker wrote: On 10-08-04 01:13 PM, Chris Mcowen wrote: Hi Ben, That is great thanks. whether

Re: [R-sig-eco] GLM mixed model with quasibinomial family

2010-07-30 Thread Ben Bolker
to get the book by Zuur et al on mixed models in ecology. Ben Bolker On Fri, Jul 30, 2010 at 11:49 AM, Javier Martinez javi.martinez.lo...@gmail.com wrote: Hello again Mr. Bolker, I have now tried glmmPQL and look very promising because I have in fact the expected results. Since I do not get

Re: [R-sig-eco] Corrected AIC for binary response variables?

2008-12-18 Thread Ben Bolker
to figure out AICc? Great question. I think I would probably go with 32, but I'd like to hear other opinions. Ben Bolker ___ R-sig-ecology mailing list R-sig-ecology@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

Re: [R-sig-eco] Power analysis on mixed model

2008-12-17 Thread Ben Bolker
? Thanks, Caitlin Please don't cross-post if you can avoid it (you just posted an almost identical query to r-sig-mixed-models, which was probably a better venue) ... cheers Ben Bolker -- Ben Bolker Associate professor, Biology Dep't, Univ. of Florida bol...@ufl.edu / www.zoology.ufl.edu

Re: [R-sig-eco] Question About Syntax For Complex ANOVA Design

2008-11-10 Thread Ben Bolker
throw everything into the models), but that data-driven model selection has some very fundamental problems ... cheers Ben Bolker -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

Re: [R-sig-eco] glmer , quasipoisson and standard errors of the coefficients

2008-09-01 Thread Ben Bolker
. means / standard errors ... good luck, Ben Bolker ___ R-sig-ecology mailing list R-sig-ecology@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

Re: [R-sig-eco] glm-model evaluation

2008-05-29 Thread Ben Bolker
the fitted model many times and calculate the summary statistics for the simulated data (which represent the null hypothesis that the data really do come from the fitted model) and see where your observed statistic falls in the distribution.) ~cheers ~ Ben Bolker -BEGIN PGP SIGNATURE

Re: [R-sig-eco] documentation available that further explains error messages?

2008-05-07 Thread Ben Bolker
A couple more suggestions: Mark Bravington's debug package (mvbdebug, available on CRAN) can be a more powerful debugging tool if you want to do a more graphical stepping-through your code; a cruder but effective technique is to put a cat() statement into your objective function, e.g.