similar to: lme4 glmer general help wanted - code included

Displaying 20 results from an estimated 1000 matches similar to: "lme4 glmer general help wanted - code included"

2012 Oct 24
1
randomly select another observation with same grouping factor and year value, do for every record in dataframe
Hello, I am trying to create a function that will move through each record of a data frame, find the value in the "HUC" column, then randomly select another observation from the dataframe with the same value in "HUC" column, as well as the same value in "Yr" column as the first observation. I want the function to produce a list of the RchID of the first observation,
2008 Nov 19
1
F-Tests in generalized linear mixed models (GLMM)
Hi! I would like to perform an F-Test over more than one variable within a generalized mixed model with Gamma-distribution and log-link function. For this purpose, I use the package mgcv. Similar tests may be done using the function "anova", as for example in the case of a normal distributed response. However, if I do so, the error message "error in eval(expr, envir, enclos) :
2009 Jan 23
1
predict function problem for glmmPQL
Hi all, I am using cross-validation to validate a generalized linear mixed effects model fitted using glmmPQL. i found that the predict function has a problem and i wonder if anyone has encountered the same problem? glmm1 = glmmPQL(y~aX+b,random=~1|sample,data=traindata) predict(glmm1,newdata=testdata,level=1,type="response") gives me all "NA"s. it works for level=0 (the
2004 Nov 09
1
Some questions to GLMM
Hello all R-user I am relative new to the R-environment and also to GLMM, so please don't be irritated if some questions don't make sense. I am using R 2.0.0 on Windows 2000. I investigated the occurrence of insects (count) in different parts of different plants (plantid) and recorded as well some characteristics of the plant parts (e.g. thickness). It is an unbalanced design with 21
2013 Nov 25
1
Independent variable dependent on offset in GLMM
Hi! I’m running glmer (lme4) models with biodiversity data and I’m having trouble with understanding/finding information on how the offset() option is implemented. Explicitly, I’m wondering if the offset is only implemented on the dependent variable (as I think it is), or does it also affect independent variables in the model (was told this by a stat guy at our department)? My data is
2006 Nov 20
1
sem package subscript out of bounds error
I'm having the most curious error while using the sem package. For the model I'm working with, I keep getting the following error: Error in J[cbind(1:n, observed)] <- 1 : subscript out of bounds I''ve used debug=TRUE with sem, and there don't appear to be any problems with model - there are no latent variables in this model. The variables in the covariance matrix
2009 May 01
3
adding zeros to dataframe
Greetings, I am new to R and am hoping to get some tips from experienced R-programmers. I have a dataset that I've read into R as a dataframe. There are 5 columns: Plot location,species name, a species number code (unique to each species name), abundance, and treatment. There are 272 plots in each treatment, but only the plots in which the species was recorded have an abundance value. For
2011 Jun 13
2
log2() and -min() very quick question
I'm looking over good-code a post-doc in my lab wrote and trying to learn how it works. I came across the following: rel.abundance <- as.matrix(read.delim("rel.abundance.csv",row.names=1,as.is =TRUE)) rel.abundance <- log2(rel.abundance-min(rel.abundance)+1) I'm not sure what the second line is doing. I ran each line in R and couldn't see a noticeable difference in
2011 Sep 13
1
mvpart analyses with covariables
Hi all, I am fairly new to R and I am trying to run mvpart and create a MRT using explanatory variables and covariables. I've been following the procedures in Numerical Ecoogy with R. The command (no covariables) which works fine - ABUNDTMRT <- mvpart(abundance ~ .,factors,margin=0.08,cp=0,xv="1se",xval=nrow(abundance),xvmult=100,which=4) where abundance is 4th root
2010 May 15
1
Barchart reorder
Hi fellow R users, I have a dataset that looks something like this. species class abundance K 1 592 K 2 288 G 1 254 G 2 239 C 2 173 D 2 123 E 3 89 F 2 87 B 2 86 H 2 82 I 1 79 J 2 76 B 1 73 D 3 72 A 2 62 L 2 58 I want to plot a stacked barchart. species is the x-axis, abundance is y-axis, and class will appear as the stacks in different colours. I need the species to be displayed in descending
2007 Apr 01
4
Abundance data ordination in R
Um texto embutido e sem conjunto de caracteres especificado associado... Nome: n?o dispon?vel Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070401/33921c2a/attachment.pl
2011 Mar 07
4
png inside loop
hello list! I'm sorry, I just stumbled over this strange behaviour (at least I am not able to explain the behaviour, therefore I assume it to be a strange behaviour): attach(water) # I know, this is not recommended names(water[3:10]) [1] "temp" "pH" "DO" "BOD" "COD" "no3" "no2" "po4" for (i in
2013 Jan 18
1
lattice: loess smooths based on y-axis values
Hi there, I'm using the lattice package to create an xy plot of abundance vs. depth for 5 stages of barnacle larvae from 5 species. Each panel of the plot represents a different stage, while different loess smoothers within each panel should represent different species. However, I would like depth to be on the y-axis and abundance to be on the x-axis, because this is more intuitive as an
2006 Dec 05
1
Spearman correlation ties and discrepancies
Hi. I am currently trying to run some Spearman correlations, and have encountered two issues. 1) When using cor.test() with a variable that includes ties, I get the "Cannot compute exact p-values with ties" error. I have read that this function now uses an asymptotic formula that allows for ties, so do not understand why I am getting this error. (I am running version 2.4.0.) I
2011 Aug 11
1
Mixed effect models
I am using two mixed effect models. Firstly, what I am trying to do is to compare green roofs abundance with brownfield, green roof with green space abundance, and finally green space with brownfield abundance. I am unsure if I have done the correct model. I have to use a mixed effect model because my data is nested. This is the code and output >
2012 Jan 14
2
Estimate the average abundance using Poisson regression with a log link.
Hello, please excuse the simplicity of this question as I am not very good with stats. I am taking a class, using R which I am learning at the same time, and the questions asks us to "Estimate the average abundance using Poisson regression with a log link". I can estimate the abundance from "x", but I can seem to figure out how to get the average abundance in this method. Any
2012 May 23
3
barplot
Hey, I am trying to create barplot of abundances over time (in days). The period is over 171 days, so I don't want to have all labels there but only the first day of the month. I couldn't find anything like this on the forum yet. Mostrly it's about year to year data. This is the relevant part of my table: datum month abundance 26/03/11 March 1 27/03/11 March 0 28/03/11 March 1
2010 Nov 16
3
Population abundance, change point
I am trying to understand my population abundance data and am looking into analyses of change point to try and determine, at approximately what point do populations begin to change (either decline or increasing). Can anyone offer suggestions on ways to go about this? I have looked into bcp and strucchange packages but am not completely convinced that these are appropriate for my data. Here is
2011 Dec 21
3
black and white in qplot? layout 4 graphs in one screen
Hello, I am trying to plot means and standard errors conditioned by a factor, using qplot. I am successful at getting the bar graph I want with a error bar, however I have tried many things and cannot get the bars to change colors. Currently showing as red and blue, but need it to be black and white for publication. Any suggestions please? Using a data set June, which is str:
2011 Jul 06
1
relative euclidean distance
Hi, I would like to calculate the RELATIVE euclidean distance. Is there a function in R which does it ? (I calculated the abundance of 94 chemical compounds in secretion of several individuals, and I would like to have the chemical distance between 2 individuals as expressed by the relative euclidean distance. Some compounds are in very low abundance whereas others are in high abundance,