search for: habitat

Displaying 20 results from an estimated 216 matches for "habitat".

2011 Sep 29
1
How to Code Random Nested Variables within Two-way Fixed Model in lmer or lme
...er. Once I have the equivalent syntax down, I would ideally like to re-run my analysis using "family = poisson", as CO is actually count data. I have a dataset including a response variable CO, measured once per Week (for 11 weeks) at 13 Locations. The 13 Locations are divided into 2 habitat types (Control and Treatment). Thus: CO is a continuous response variable, Week is a fixed categorical factor, Habitat is a fixed categorical factor, and Location is a random categorical factor nested within Habitat. Here is my model in R: mCO = aov(CO ~ Week * Habitat + Error(Location/Week)...
2012 Jul 07
4
replacement has length zero
...code but keep getting an err message. My current thinking is that the problem is on the indexing but do not know how to fix it. Any help please? ungulate <- read.csv("Ungulate.csv",row.names=1) ungulate <- as.matrix(ungulate);colnames(ungulate)<-NULL;rownames(ungulate)<-NULL habitat <- read.csv("Ungulate_vegetation.csv") habitat <- habitat[,3] site.data <- read.csv("Ungulate_site.csv") site <- site.data$SiteId visit <- site.data$Visit date <- site.data$Date date <- matrix(date,nrow=20,ncol=7,byrow=TRUE) S <- dim(ungulate)[1] m <-...
2006 Jun 08
2
nested mixed-effect model: variance components
...I am trying to assess variance components for a nested, mixed-effects model. I think I got an answer that make sense from R, but I have a warning message and I wanted to check that what I am looking at is actually what I need: my data are organized as transects within stations, stations within habitats, habitats within lagoons. lagoons: random, habitats: fixed the question is: how much variation is due to lagoons? habitats? lagoons*habitat? transects? Here is my code: res <- aov(COVER ~ HABITAT + Error(HABITAT+LAGOON+LAGOON/HABITAT), data=cov) summary(res) and I get Sum Sq for each to ca...
2006 Feb 26
2
subtotal, submean, aggregate
Dear All, I would like to make partial sums (or means or any other function) of the values in intervals along a sequence (spatial transect) where groups are defined. For instance: habitats<-rep(c("meadow","forest","meadow","pasture"),c(10,5,12,6)) observations<-rpois(length(habitats),2) transect<-data.frame(observations=observations,habitats=habitats) aggregate() is not suitable for my purpose because I want a result respecting the...
2002 Jul 11
2
Nested anovas in R not doing what they ought to...
...he list today for replies. I am currently attempting to perform an ANOVA with both nested and normal factors. My problem is that R is treating my nested factors the exact same way as it would interaction terms. My output for the nested model is as follows: > nested <- anova(lm(ltotinv ~ habitat + fish/lake + habitat:fish + habitat:(la\ ke %in% fish))) > nested Analysis of Variance Table Response: ltotinv Df Sum Sq Mean Sq F value Pr(>F) habitat 1 17.0829 17.0829 50.0917 3.083e-09 *** fish 1 0.9131 0.9131 2.6774 0.107600 habitat:fi...
2010 Oct 21
2
nested anova
Hello all, Can any of you R gurus help me out? I?m not all that great at stats to begin with, and I?m also learning the R ropes (former SAS user). Here?s what I need help with? I have a nested sample design and ran a nested anova, but I don?t know how to interpret the results habitat (four different types) is nested in site (three types), and site is nested in gear (two types) My code: pat2<-aov(catchrate~habitat/site/gear, data=pat) This created the following outcome: Df Sum Sq Mean Sq...
2012 Oct 26
1
Openbugs- Array Index
...GS I keep getting the error message: array index is greater than array upper bound for hab. Any help would be greatly appreciated, Suzie Codes: ungulate <- read.csv(file.choose ()) #ungulate ungulate <- as.matrix(ungulate);colnames(ungulate)<-NULL;rownames(ungulate)<-NULL habitat <- read.csv(file.choose ()) #ungulate habitat habitat <- habitat[,3] site.data <- read.csv(file.choose ()) #ungulate site site <- site.data$SiteId visit <- site.data$visit date <- site.data$date date <- matrix(date,nrow=4,ncol=5,byrow=TRUE)...
2009 May 29
1
data manipulation involving aggregate
hi all, I often have a data frame like this example data.frame(sq=c(1,1,1,2,2,3,3,3,3),area=c(1,2,3,1,2,3,1,2,3),habitat=c("garden","garden","pond","field","garden","river","garden","field","field")) for each "sq" I have multiple "habitat"s each with an associated "area". I want to aggregate the...
2009 Oct 26
1
explalinig the output of my linear model analysis
Hi, I am new in statistics and i manage to make the linear model analysis but i have some difficulties in explaining the results. Can someone help me explalinig the output of my linear model analysis ? My data are with 2 variables habitat (e,s) and treatment (a,c,p) with multiple trials within. Thank you in advance Call: lm(formula = a$wild ~ a$habitat/a$treatment/a$trial) Residuals: Min 1Q Median 3Q Max -58.905 -19.958 -5.774 16.693 88.890 Coefficients: Estimate Std. Erro...
2006 Aug 23
0
Random structure of nested design in lme
..., this appears to solve my problem to a great extend. However, one of my response variables is survival of my plants, which is a binary variable (alive = 1; dead = 0). To analyze this case, I added family = "binomial" to the command line: fit.lme4 <- lmer(binary.response~soiltype*habitat+(1|destination)+(1|origin), Dat0, family = "binomial") > anova(fit.lme4) Analysis of Variance Table Df Sum Sq Mean Sq Denom F value Pr(>F) soiltype 1 0.029 0.029 32.000 0.0238 0.8784 habitat 1 0.029 0.029 32.000 0.0238 0.8784 soil...
2008 Mar 27
1
panel function question
I have two data sets with locations, X, Y of houses (df.house) and habitats(df.habitat), respectively. In each dataset, there are 3 replicates (Repeat). Because each replicate has different locations of houses and habitats, I would like to plot them in panels. I wrote something like this: mypanel<-function(x,y,subscripts,...){ panel.xyplot(x,y,pch=20) panel.xyp...
2008 Apr 10
1
adonis (vegan package) and subsetted factors
Hi, I'm trying to use adonis on a subset of data from a dataframe. The actual data is in columns 5:118, and the first four columns are various factors. There are 3 levels of the factor Habitat, and I want to examine differences among only two of them. So I started with: > CoastNear = subset(gel_data, Habitat != "I") The resulting data.frame has three levels for Habitat, but only two of those levels have any records. Then I run: > adonis(CoastNear[,5:118]~Habitat, data...
2002 May 03
0
Nested anovas in R
...se cc: a response to me? I am currently attempting to perform an ANOVA with both nested and normal factors. My problem is that R is treating my nested factors the exact same way as it would interaction terms. My output for the nested model is as follows: > nested <- anova(lm(ltotinv ~ habitat + fish/lake + habitat:fish + habitat:(la\ ke %in% fish))) > nested Analysis of Variance Table Response: ltotinv Df Sum Sq Mean Sq F value Pr(>F) habitat 1 17.0829 17.0829 50.0917 3.083e-09 *** fish 1 0.9131 0.9131 2.6774 0.107600 habitat:...
2010 Jul 20
1
logistic regression with repeated measures for species-habitat associations
Hi, I have three years of species presence/absence data for a set of ~100 ponds, with a list of associated habitat characteristics (park, vegetation, hydroperiod, etc.). The datasets differ slightly by year because some ponds were dry in some years and not in others. My goal is to look at habitat associations for a couple focal species. For each year, I have a data table that looks like (an expanded version...
2012 Jan 09
2
Unexpected results using the oneway_test in the coin package
...I am fresh out of ideas. I have carried out a Kruskal-Wallis test to compare breeding strategy variance of my study organisms (rank data, therefore non-parametric, in oder of increasing degree of "terrestrialization", in this case: adaptations to breeding on land as opposed to in aquatic habitats) between habitat groups (I, II and III). Subsequently I would like to do a "Post-Hoc test" or in other words a set of corrected pair-wise comparisons to test the relationship between individual groups. For this I would like to use the Nemenyi-Damico-Wolfe-Dunn test in the "coin&quot...
2017 Nov 15
1
Rasterize function with maximum in R
Hi all, I have some concerns regarding the rasterize option in R and I would like to know if the fun=max in rasterize in R provides similar results to the one achieved by using "Polygon to Raster using maximum-combined-area" in ArcGIS? I'm trying to rasterize a habitat layer to a raster of 10m spatial resolution using the function 'max' (e.g. r <- rasterize(ht, r, "Priority", fun = 'max') and I would like to assign the habitat of the largest overlapping area, which is similar to the ?maximum-combined-area?. My original layer contains...
2009 Mar 10
1
help structuring mixed model using lmer()
Hi all, This is partly a statistical question as well as a question about R, but I am stumped! I have count data from various sites across years. (Not all of the sites in the study appear in all years). Each site has its own habitat score "habitat" that remains constant across all years. I want to know if counts declined faster on sites with high "habitat" scores. I can construct a model that tests for the effect of habitat as a main effect, controlling for year model1<-lmer(count~habitat+yr+(1|site),...
2006 Jul 19
1
Random structure of nested design in lme
All, I'm trying to analyze the results of a reciprocal transplant experiment using lme(). While I get the error-term right in aov(), in lme() it appears impossible to get as expected. I would be greatful for any help. My experiment aimed to identify whether two fixed factors (habitat type and soil type) affect the development of plants. I took soil from six random sites each of two types (arable and grassland) and transplanted them back into the sites of origin in such way that in each of the sites there were six pots containing arable soil and six pots of grassland soil, each...
2010 Nov 12
2
minimum AIC mixed model selection
Hi! I am trying to know which habitat variables most affect bird counts in a radius of 100m. I obtained bird counts in 2751 spatial points, and measured percentage of 21 habitat variables in these points. I applied a mixed model using the "lmer" function to these data, but I do not know how to select the best model using...
2012 Sep 12
7
multinomial MCMCglmm
...to use MCMCglmm for that. The main problem I face: my data set consits of a trapping data set, where the observation at eah trap (1 or 0 for each species) have been aggregated per traplines. Therefore we have a proportion of presence/absence for each species per trapline. ex: ID_line mesh habitat Apsy Mygl Crle Crru Miag Miar Mimi Mumu Misu Soar Somi 11 028S6A 28 copse 2 0 0 0 0 0 0 0 0 0 0 12 028S6B 28 copse 1 1 0 0 0 0 0 0 0 0 0 13 028S6C 28 hedge 2 0 0 4 0 0 0 0 0 0 0 14...