ok, thanks. So properly written out, I want to split each block out of the
dataset and run mvabund, manyglm, and anova on each subset, pulling
coefficients out of the manyglm object and p values out of the anova. I can
split the species matrix and env matrix by hand within the commands, so for
On 10/29/2014 04:27 PM, Ludovico Frate wrote:
> Dear all,I'am trying to fit a very simple linear model. I am analyzing the
> differences in the number of species (DS) found in several permanent plots in
> two year of observations.
> Firstly, I have calculated the differences per plot (i.e. numb
Ludovico Frate píše v St 29. 10. 2014 v 16:27 +0100:
> Dear all,I'am trying to fit a very simple linear model. I am analyzing the
> differences in the number of species (DS) found in several permanent plots in
> two year of observations.
> Firstly, I have calculated the differences per plot (i.e
Since you asked, this is a minimally reproducible example:
install.packages('plyr')
install.packages('mvabund')
library(mvabund)
library(plyr)
data(Tasmania)
tas.abund <- data.frame(Tasmania$abund)
tas.env <- data.frame(Tasmania$treatment, Tasmania$block)
mva.out <- dlply(tas.abund, ~tas.env$bloc
I tried to replicate my problem with the data that is supplied with the mvabund
package. How is that not a minimally reproducible example? Because I stop
after the first step?
From: Hadley Wickham [h.wick...@gmail.com]
Sent: Wednesday, October 29, 201
Dear all,I'am trying to fit a very simple linear model. I am analyzing the
differences in the number of species (DS) found in several permanent plots in
two year of observations.
Firstly, I have calculated the differences per plot (i.e. number of species in
Plot 1 in Time A - number of species
Dear list,
I write for a surely trivial doubt about plotting 95% CI of regression lines.
I saw that someone draw them even for non significant regression lines. I think
that this is not correct
as , in the majority of cases, Ho is that beta is not significantly different
from 0 and consequently
It's really hard to help with out a minimal reproducible example, but
normally a dlply call would look more like this:
mva.out <- dlply(Tasmania, "block", function(df) {
mvabund(block ~ treatment, data = df)
})
Hadley
On Tue, Oct 28, 2014 at 6:31 PM, Maas, Kendra wrote:
> I'm trying to run mv
On Wed, Oct 29, 2014 at 4:23 AM, Eduard Szöcs wrote:
> Hai Kendra,
>
> i've used a simple for-loop to do this in the past.
>
> Something along these lines:
>
>
> ###-
> mymv <- function(response, env, zone) {
> df <- data.frame(env
Forgotten to mention, that mymv() returns a list with two components
(the model and the anova).
You can then extract the information you need from this list, maybe like
this:
###---
per_zone <- mymv(response, env, zone)
# p-values from univariate GLMs
s
Hai Kendra,
i've used a simple for-loop to do this in the past.
Something along these lines:
###-
mymv <- function(response, env, zone) {
df <- data.frame(env = env, zone = zone)
out <- NULL
for (i in levels(zone)) {
rsp
11 matches
Mail list logo