Skip to content
Prev 6496 / 7420 Next

modeling variation along a gradient

Jeff,

This is also possible in brms and in Stan directly. There is vignette that describes how to do it: https://cran.r-project.org/web/packages/brms/vignettes/brms_distreg.html. You can fit relatively simple unequal variance models with "fixed effects" or complex smooth terms (via splines). The learning curve might be steep if you're not familiar with Bayesian models. Richard McElreath's Statistical Rethinking and lectures are a good introduction, and has lots of ecology content. 
 
Jason


-----Original Message-----
From: R-sig-ecology <r-sig-ecology-bounces at r-project.org> On Behalf Of Stratford, Jeff
Sent: Wednesday, October 26, 2022 5:25 PM
To: r-sig-ecology at r-project.org
Subject: [R-sig-eco] modeling variation along a gradient

Hi all,

I have several data sets that relate some ecological phenomenon to a gradient (e.g., avian species richness and urbanization, weevil prevalence in acorns and latitude - see https://www.mdpi.com/1424-2818/13/7/303). Most of these data sets have more variation on one end than the other. I have considered quantile regression but this seems inadequate. I would like to model variation per se along a gradient.

Is there an R function that models sd or variance along a gradient. I was thinking that it would require a moving window of some sorts.

Any suggestions would be appreciated.

Thanks,

Jeff
********************************************************
Jeffrey A. Stratford, PhD.
Department of Biology and Earth System Sciences
84 W South Street
Wilkes University, PA 18766 USA
https://sites.google.com/a/wilkes.edu/stratford/
********************************************************


_______________________________________________
R-sig-ecology mailing list
R-sig-ecology at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
Message-ID: <SA0PR09MB7212D129F76AAC2D93F3FE5C87329@SA0PR09MB7212.namprd09.prod.outlook.com>
In-Reply-To: <CAP5kizRWLzo-XH2h=t5K0KPge5nWhBnM3va0yYOqj_J+9nSn=A@mail.gmail.com>