Displaying 20 results from an estimated 10000 matches similar to: "Looping over groups"
2013 Feb 28
2
data grouping and fitting mixed model with lme function
Dear all,
I have data from the following experimental design and trying to fit a mixed model with lme function according to following steps but struggling. Any help is deeply appreciated.
1) Experimental design: I have 40 plants each of which has 4 clones. Each clone planted to one of 4 blocks. Phenotypes were collected from each clone for 3 consecutive years. I have genotypes of plants. I
2009 Nov 09
1
Using something like the "by" command, but on rows instead of columns
Hello R Forum users,
I was hoping someone could help me with the following problem. Consider the following "toy" dataset:
Accession SNP_CRY2 SNP_FLC Phenotype
1 NA A 0.783143079
2 BQ A 0.881714811
3 BQ A 0.886619488
4 AQ B 0.416893034
5 AQ B 0.621392903
6 AS B 0.031719125
7 AS NA 0.652375037
"Accession"
2011 Mar 08
1
NaNs in Nested Mixed Model
Dear R users,
I have a problem with something called "NaNs" in a nested mixed model.
The background is that I have studied the number of insect nymphs
emerging from replicated Willow genotypes in the field. I have 15
replicates each of 4 Willow genotypes belonging two 2 Willow species.
Now I want to elucidate the effect of Willow genotype on the number of
emerging nymphs. Previously I
2008 Mar 05
1
testing for significantly different slopes
Hi,
How would one go about determining if the slope terms from an analysis of
covariance model are different from eachother?
Based on the example from MASS:
library(MASS)
# parallel slope model
l.para <- lm(Temp ~ Gas + Insul, data=whiteside)
# multiple slope model
l.mult <- lm(Temp ~ Insul/Gas -1, data=whiteside)
# compare nested models:
anova(l.para, l.mult)
Analysis of Variance
2012 Nov 03
2
reorder() in the latticeExtra library
Hello all, thanks for your time and help. Below are my commands, and it
generates a really nice plot, however I am not happy with the reorder()
function. I would like the order to be the same as they appear in the
genotype variable "genotype <- c("CJ1450 NW 4/25/12","CJ1450 BAL
4/25/12","CJ1450 NW 4/27/12","CJ1450 BAL 4/27/12","CJ1721 NW
2006 May 23
1
standardization of values before call to pam() or clara()
Greetings,
Experimenting with the cluster package, and am starting to scratch my head in
regards to the *best* way to standardize my data. Both functions can
pre-standardize columns in a dataframe. according to the manual:
Measurements are standardized for each variable (column), by subtracting the
variable's mean value and dividing by the variable's mean absolute deviation.
This
2006 Oct 04
2
compiling rgdal package on windows / macos
Greetings:
As I am not a windows user, I cannot try this: is it possible to install rgdal
on windows without having to compile it from source ?
Compilation on MacOS is within my abilities, however each time i try and
install the rgdal package it dies complaining that it cannot find
gdal-config --- which was recently installed with GRASS. I have updated my
PATH environment variable, logged
2007 May 14
1
cross-validation / sensitivity anaylsis for logistic regression model
Hi,
I have developed a logistic regression model in the form of (factor_1~ numeric
+ factor_2) and would like to perform a cross-validation or some similar
form of sensitivity analysis on this model.
using cv.glm() from the boot package:
# dataframe from which model was built in 'z'
# model is called 'm_geo.lrm'
# as suggested in the man page for a binomial model:
cost <-
2006 Sep 20
2
mysterious error on compile R 2.3.1
Getting a very strange error with a new install of R from source on x86;
make[3]: Leaving directory `/tmp/R.INSTALL.r20887/cluster/src'
** R
** data
** moving datasets to lazyload DB
Error in factor(c(1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1), :
invalid labels; length 2 should be 1 or 1
Execution halted
ERROR: lazydata failed for package 'cluster'
** Removing
2007 Oct 02
1
Trouble obtaining results from a loop
#Hello,
#I have a question about obtaining results from a loop I have written.
#Below is a sample of individual genotypes from a genetic question I am
working on called "P.genotype.sample ".
P.genotype.sample<-matrix(10,10,10)
P.genotype.sample[,1]<-c(2,2,1,5,1,1,5,6,1,3)
P.genotype.sample[,2]<-c(6,3,3,6,8,1,6,7,2,3)
P.genotype.sample[,3]<-c(2,2,2,3,3,2,2,2,3,3)
2009 Jun 30
2
odd behaviour in quantreg::rq
Hi,
I am trying to use quantile regression to perform weighted-comparisons of the
median across groups. This works most of the time, however I am seeing some
odd output in summary(rq()):
Call: rq(formula = sand ~ method, tau = 0.5, data = x, weights =
area_fraction)
Coefficients:
Value Std. Error t value Pr(>|t|)
(Intercept) 45.44262 3.64706 12.46007
2010 Sep 16
2
parallel computation with plyr 1.2.1
Hi,
I have been trying to use the new .parallel argument with the most recent
version of plyr [1] to speed up some tasks. I can run the example in the NEWS
file [1], and it seems to be working correctly. However, R will only use a
single core when I try to apply this same approach with ddply().
1. http://cran.r-project.org/web/packages/plyr/NEWS
Watching my CPUs I see that in both cases
2005 Nov 28
1
overlay additional axes
Greetings,
I am trying to add an extra labled axis in position 3 (top x-axis), with
numbers that do not match up with the existing axes.
Surely this must be possible, and I am just doing it incorectly.
So far I have tried the following:
#make a plot
plot(TIK, type="l", cex=.25, xlim=c(2,32), ylim=c(0,1600))
#try and add a new axis with different numbers in position 3
2008 Jun 09
3
piper diagram
Hi,
Is anyone on the list familiar with an R implementation of Piper Diagrams?
Example:
http://faculty.uml.edu/nelson_eby/89.315/IMAGES/Figure%209-78.jpg
I am thinking that two calls to triax.plot (plotrix) along with some kind of
affine-transformed standard plot would do the trick. Not so sure about the
final layout, or a nice generalized version for something like lattice.
Cheers,
Dylan
2008 Jul 16
2
gstat problem with lidar data
? stato filtrato un testo allegato il cui set di caratteri non era
indicato...
Nome: non disponibile
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20080716/338e44b9/attachment.pl>
2005 Apr 21
2
ANOVA model
Hi,
Could someone tell me if this is the correct model syntax for the
following dataset:
lme(height~treatment+genotype+treatment*genotype,drought,random=~genotyp
e)
The dataset has two factors: one fixed - treatment, and one random -
genotype. I need to test the effect of both factors to identify their
significance. There are multiple (but not equal) replicates at each
level of genotype (the
2009 Oct 23
2
interpretation of RCS 'coefs' and 'knots'
Hi,
I have fit a series of ols() models, by group, in this manner:
l <- ols(y ~ rcs(x, 4))
... where the series of 'x' values in each group is the same, however knots
are not always identical between groups. The result is a table of 'coefs'
derived from the ols objects, by group:
group Intercept top top' top''
1 6.864 0.01 2.241 -2.65
2008 Aug 29
7
model II regression - how do I do it?
An embedded and charset-unspecified text was scrubbed...
Name: n?o dispon?vel
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20080829/57df9fc7/attachment.pl>
2010 Oct 09
1
question related to multiple regression
Hi,
I am conducting an association analysis of genotype and a phenotype such as
cholesterol level as an outcome and the genotype as a regressor using
multiple linear regression. There are 3 possibilities for the genotype AA,
AG, GG. There are 5 people with the AA genotype, 100 with the AG genotype
and 900 with the GG genotype. I coded GG genotype as 1, AG as 2 and AA as 3
and the p-value for the
2007 Sep 20
2
Superimposing vector polygons over raster grid in a plot
Hello:
I would like to superimpose vector polygons (state outlines) from a
Shape file on top of a satellite image,
imported into a SpatialGridDataFrame from GEOTIFF via gdal_translate and
readGDAL.
When I plot polygon and point shape files in R, into
SpatialPointDataFrame and SpatialPolygonDataFrame,
the two feature sets line up geographically, so it seems logical that a
SpatialGridDataFrame