Displaying 20 results from an estimated 10000 matches similar to: "Random assignment"
2010 Dec 17
2
Extract subset of rows
Hi,
I have two matrices with a common field = species what i want to do is make a matrix that combines the data held in the other two based on the species name.
I.e ( simple example)
Matrix 1 - monocot
SPECIES V1
A 2
B 3
C 4
D 5
Matrix 2 - PCAresults
SPECIES V2
A 0.2
B 0.3
C 4.1
D 3.2
matrix 3 - What i want
SPECIES V1 V2
A 2 0.2
B 3 0.3
C 4 4.1
D 5 3.2
my
2005 Dec 22
3
reading long matrix
Hi,
I'm needing some help finding a function to read a large text file into an array in R. The data are essentially presence / absence / na data for many species and come as a grid with each species name (after two spaces) at the beginning of the matrix defining the map for that species. An excerpt could therefore be:
SPECIES1
999001099
900110109
011101000
901100101
110100019
901110019
2010 Dec 06
1
help getting data in correct format
>> Dear All,
>>
>> I am having trouble getting my data into R as i need it! I am used to using read.delim("") to open .txt files to do work on. The function i am using requires a matrix like the one below.
>>
>> My data is from excel and then saved as a txt file. I have tried the usual read.delim("") approach but the function doesn't like it, i
2012 Apr 13
1
R: Colouring phylogenetic tip labels and/or edges
Hi,
I have reconstructed ancestral character states on a phylogeny using MuSSE in the diversitree package and plotted the character state probabilities as pie charts on the nodes. I would, however, like to colour the character states of my extant species, i.e. the tip labels, the same colours as my pie charts, such that all species in state 1 are e.g. blue, species in state 2 red and species in
2010 Oct 18
1
Randomly shuffle an array multiple times
Dear List,
I have a table i have read into R:
Name Yes/No
John 0
Frank 1
Ann 0
James 1
Alex 1
etc - 800 different times.
What i want to do is shuffle yes/no and randomly re-assign them to the name.
I have used sample() and permute(), however there is no way to do this 1000 times. Furthermore, i want to copy the data into a excel spreadsheet in the same order as the data was input so i can
2013 Feb 02
1
Mixed Models: Contribution of random variable to final estimate
Dear all,
We want to test if the invasiveStatus is predicted by the amount (quant) of animals arriving to a country of a certain species (taxonid). We are using lmer to perform the model.
The model is:
lmer(invasiveStatus~I(log(quant+1))+I(log(inDegree+1))+(1|taxonid)+(1|country), family=binomial,data=td),
where invasiveStatus is a binary variable, quant and inDegree are integer variables, and
2006 Jan 16
2
Kite diagrams
I teach biology, and would like to show the students how to use R for
some statistical assignments. One of those is to make a kite diagram
(for example as seen in
http://www.medinavalleycentre.org.uk/images/Bembri1.jpg). Is there any
way to create one using R? I did a help.search("kite") and looked on the
r-project HP with no luck.
Previously when the course was taugh the students have
2011 Feb 25
1
color code in loop for piecharts plotting
Hi,
I am using this loop
par(mfrow=c(3,3))
annos<-c(2001:2007,2009)
for (i in annos) {
t<-subset(masia,YEAR==i)
t$FAMILIA<-drop.levels(t$FAMILIA)
pie(table(t$FAMILIA),main=i)
}
To make piecharts of species composition among years (my data frame is
called "masia"). So I get 1 piechart of the families that we have found in
our survey each year. We don't have always
2009 Feb 18
2
Counting/processing a character vector
Dear List,
I have a data set stored in the following format:
> head(dat, n = 10)
id sppcode abundance
1 10307 10000000 1
2 10307 16220602 2
3 10307 20000000 5
4 10307 20110000 2
5 10307 24000000 1
6 10307 40210000 83
7 10307 40210102 45
8 10307 45140000 1
9 10307 45630000 1
10 10307 45630600 41
>
2012 Oct 01
1
lme help configuring random effects
Hi Everyone,
Sorry to ask what I think is a basic question but I really haven't found my answer yet in the archives.
I am trying to run a mixed effects model in R using the lme package. My experiment is such that I am interested in the effects of Temperature (2 levels) and Species (3 levels) on Growth. I collected individuals from three populations within each species. Because individuals
2011 Mar 10
1
PROC NLMIXED what package equivalent in R?
To account for likely differences between
families in naturalization rates, we fitted a
generalized linear mixed model, using
PROC NLMIXED in SAS10, with the
naturalization rate per genus (that is, the
number of naturalized species in a genus as
a proportion of the total number of introduced
species in a genus) as the response
variable, a variable coding genera as containing
at least one native
2009 Dec 11
1
random effects in mixed model not that 'random'
Hi,
I have the following conceptual / interpretative question regarding
random effects:
A mixed effects model was fit on biological data, with observations
coming from different species. There is a clear overall effect of
certain predictors (entering the model as fixed effect), but as
different species react slightly differently, the predictor also enters
the model as random effect and with
2011 Apr 20
3
[test message] Can R replicate this data manipulation in SAS?
Apologies for troubling the list, but it is a test that
needs to be carried out. I am resending the message that
I sent earlier on behalf of Paul Miller, but with a
certain word used in the variables names of the SAS code
changed to a different word.
With thanks for your tolerance ...
Ted.
[*** PLEASE NOTE: I am sending this message on behalf of
Paul Miller:
Paul Miller <pjmiller_57 at
2010 Oct 22
2
Random Forest AUC
Guys,
I used Random Forest with a couple of data sets I had to predict for binary
response. In all the cases, the AUC of the training set is coming to be 1.
Is this always the case with random forests? Can someone please clarify
this?
I have given a simple example, first using logistic regression and then
using random forests to explain the problem. AUC of the random forest is
coming out to be
2007 Oct 26
1
2-way Factorial with random factors
Hello:
I am using R mainly on windows XP, version 2.5. I?m a biologist,
with a medium level statistics background. I have a problem stating a
two-way factorial design where both factors are random. I?m using the
lmer() function implemented in the Matrix package version 0.99.
My design is as follows: Two species were randomly selected from a
total of 4 species. This species are present
2012 Jul 28
1
Mixed-model with paired design & covariates
Dear all,
I make habitat suitability models for animal species. The purpose of my
research is to investigate the accuracy of different models.
I clearly have a nested design:
- accuracy_measure -> response variable
- 2 model types (model_type) -> fixed effect
- 230 species (species) -> random effect
- 10 replicates/species (replicate) -> random effect
- 10 subreplicate/replicate
2012 May 09
2
Random resampling of columns in species association matrices
I have a host-parasite association matrix in which parasite species are rows
and host species columns and cells contain the frequency of interactions.
Some parasites are associated with many hosts, and some hosts harbor several
parasites, and I want to repeatedly select only one single representative
host per "generalized" (multi-host) parasite to create a new matrix in which
no hosts
2008 Jan 31
1
random forest and vegetation data
Hi there,
I am an environmental studies masters student trying to get my thesis out the door. I am also newbie at trees in general, but I like what I see in the literature about the random forest algorithm. I think I get the general gist of things, but even after reading stuff I?m unclear about how I could be getting the results I?m seeing. I obviously am missing something about how the split
2009 Aug 13
1
metafor random effects meta-analysis
Hello,
Great to see the new metafor package for meta-analysis.
I would like to perform a meta-analysis in which I initially calculate the intercept of the model with a nested random-effects structure. In lme, this would be
model<- lme(v3~1, random=~1|species/study, weights = varFixed(~Wt), method = "REML")
where multiple effects sizes are measured for some studies and more than
2010 Aug 13
1
assign multiple variables at once
R Experts,
I would like to create a series of variables without having
to assign a separate line of code for each new variable. My dataframe (DF) contains
two groups of linked variables (ESP1:ESP9) and (ECRL1:ECRL9). Within ESP1:ESP9 are
abbreviated species codes (full dataframe contains 26 codes). ECRL1 represents the
number of species x in variable ESP1 harvested, and so on through ESP9 and