similar to: avoiding if-then statements for looped chi-square tests

Displaying 20 results from an estimated 1000 matches similar to: "avoiding if-then statements for looped chi-square tests"

2018 Mar 15
3
stats 'dist' euclidean distance calculation
Hello, I am working with a matrix of multilocus genotypes for ~180 individual snail samples, with substantial missing data. I am trying to calculate the pairwise genetic distance between individuals using the stats package 'dist' function, using euclidean distance. I took a subset of this dataset (3 samples x 3 loci) to test how euclidean distance is calculated: 3x3 subset used
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
2010 May 20
1
Geneland error on unix: Error in MCMC(........ :, unused argument(s) (ploidy = 2, genotypes = geno)
I am receiving the above error ( full r session output below) the script runs OK in windows. and "genotypes" and "ploidy" are both correct arguments any suggestions would be most welcome Nevil Amos MERG/ACB Monash University School of Biological Sciences > library(Geneland) Loading required package: RandomFields Loading required package: fields Loading required
2007 Apr 23
1
Dominance in qtl model
Hi, I'm using R for a QTL analysis of SNP data. I was wondering if anyone had any advice on fitting a dominance effect into the following function; > myfun4 function (x) { x <- scan(con, nmax=169) y <- unique(x[which(!is.na(x))]) if(length(y)>1) { summary(lme(Ad ~ x, random= ~1|sire, na.action="na.omit")) } else {print("no.infomation")} } Con is the
2008 May 05
1
genotypes simulation
Hello, I am having really hard time finding a good article about simulating genotypes of cases and controls at a disease locus using R. if you guys can point me or guide me where i can find more information, it will be helpful. thanks, Claire -- View this message in context: http://www.nabble.com/genotypes-simulation-tp17065607p17065607.html Sent from the R help mailing list archive at
2009 Jan 13
3
problem whit Geneland
I do the these passages: library(Geneland) set.seed(1) data <- simdata(nindiv=200, coord.lim=c(0,1,0,1) , number.nuclei=5 , allele.numbers=rep(10,20), IBD=FALSE, npop=2, give.tess.grid=FALSE) geno <- data$genotypes coord <- t(data$coord.indiv) path.mcmc <-
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
2004 Nov 21
1
Two factor ANOVA in lme
I want to specify a two-factor model in lme, which should be easy? Here's what I have: factor 1 - treatment FIXED (two levels) factor 2 - genotype RANDOM (160 genotypes in total) I need a model that tells me whether the treatment, genotype and interaction terms are significant. I have been reading 'Mixed effects models in S' but in all examples the random factor is not in the main
2008 Aug 20
4
Looping over groups
Hello, My R skills are somewhere between novice and intermediary, and I am hoping that some of you very helpful forum members, whom I've seen work your magic on other peoples' problems/questions, can help me here. I have a matrix with the following format: (i) individual plants comprising many different genotype groups (i.e., a plant is genotype 1 or genotype 2 or genotype 3, etc). The
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)
2008 Sep 12
1
subsetting of factor
Dear R list, I think my question maybe easy for you but I really spent entire day to resolve it. Say I have a matrix, rows are 6000 genes, columns(1-6) are 3 genotypes (a,b,c) with 2 repeat. I have to use two groups each time for t-test, a vs. c or b vs. c, but I dont know how to write correct codes. Below is my codes, the last two lines are needed to be corrected....
2006 Dec 31
1
Genotype importing from Sequenom
Sequenom has an odd format of calling a SNP genotype gg [1] "C" "GA" "A" "C" "C" "AG" "C" "C" "T" "G" homozygous A is called A and heterozygous is called AT The genetics package cannot handle the fact that some genotypes are declared with 2 letter while other are declared with only 1.
2011 Jun 30
1
Analysing insecticide biossays using lmer
Hi all, Here is my problem: I performed bioassays using a unique insecticide on 9 different genotypes and got their mortality depending on the dose of insecticide used. Now, I want to see wether some genotypes are different or not in their responses to insecticide. My problem is that I have up to four replicates for some genotypes, but only one for other... Due to this unbalanced design, I
2006 Jun 20
2
multi-dimension array of raw
I would like to store and manipulate large sets of marker genotypes compactly using "raw" data arrays. This works fine for vectors or matrices, but I run into the error shown in the example below as soon as I try to use 3 dimensional arrays (eg. animal x marker x allele). > a <- array(as.raw(1:6),c(2,3)) > a [,1] [,2] [,3] [1,] 01 03 05 [2,] 02 04 06 >
2006 Nov 03
5
ANOVA in Randomized-complete blocks design
Dear all, I am trying to repeat an example from Sokal and Rohlfs "Biometry" -- Box 11.4, example of a randomized-complete-blocks experiment. The data is fairly simple: series genotype weight 1 pp 0.958 1 pb 0.985 1 bb 0.925 2 pp 0.971 2 pb 1.051 2 bb 0.952 3 pp 0.927 3 pb 0.891 3 bb 0.892 4
2013 Jul 02
2
Recoding variables based on reference values in data frame
I'm new to R (previously used SAS primarily) and I have a genetics data frame consisting of genotypes for each of 300+ subjects (ID1, ID2, ID3, ...) at 3000+ genetic locations (SNP1, SNP2, SNP3...). A small subset of the data is shown below: SNP_ID SNP1 SNP2 SNP3 SNP4 Maj_Allele C G C A Min_Allele T A T G ID1 CC GG CT AA ID2 CC GG CC AA ID3 CC GG nc AA
2009 Jan 22
1
infer haplotypes phasing trios tdthap
Dear R mailing list, I have a dataset with genotypes from trios and I would like to infer haplotypes for each mother, father and child. The package that I could find that can do this is tdthap. But when the mother is homozygous (e.g., 2/2) the haplotype is called as not possible to infer (0); I would prefer for it to call the genotype (2). From what I understand it is doing what I would like
2009 Jun 01
1
t.tests by unique groupes
My data (slength) look like this: Plant Block Treat Genotype Source MPH 1 1 1 w 05-AZM sp 160 NA 2 2 1 w 12-50 463 NA 3 3 1 w 12-51 sp 150 0.0508982 4 5 1 w 29-42 567 0.9017094 5 6 1 w KNG-KNG 811 NA 6 7 1 w 02-02 1 NA Treat column
2010 Feb 12
1
"drop if missing" command?
This will probably seem very simple to experienced R programmers: I am doing a snp association analysis and am at the model-fitting stage. I am using the Stats package's "drop1" with the following code: ##geno is the dataset ## the dependent variable (casectrln) is dichotomous and coded 0,1 ## rs743572_2 is one of the snps (which is coded 0,1,2 for the 3 genotypes)
2013 Nov 08
1
SNPRelate: Plink conversion
Hi, Following my earlier posts about having problems performing a PCA, I have worked out what the problem is. The problem lies within the PLINK to gds conversion. It seems as though the SNPs are imported as "samples" and in turn, the samples are recognised as SNPs: >snpsgdsSummary("chr2L") Some values of snp.position are invalid (should be > 0)! Some values of