similar to: Hardy Weinberg Simulation

Displaying 20 results from an estimated 1000 matches similar to: "Hardy Weinberg Simulation"

2011 Jun 22
2
Hardy Weinberg
Hello all, I am interested in simulating 10,000 2 x 3 tables for SNPs data with the Hardy Weinberg formulation. Is there a quick way to do this? I am assuming that the minor allelle frequency is uniform in (0.05, 0.25). -- Thanks, Jim. [[alternative HTML version deleted]]
2005 Apr 05
2
cat bailing out in a for loop
Dear All, I am trying to calculate the Hardy-Weinberg Equilibrium p-value for 42 SNPs. I am using the function HWE.exact from the package "genetics". In order not to do a lot of coding "by hand", I have a for loop that goes through each column (each column is one SNP) and gives me the p.value for HWE.exact. Unfortunately some SNP have reached fixation and HWE.exact requires a
2011 Oct 25
1
regression using GMM for mulltiple groups
Inthe code below I was trying to to obtain the GMM estimates for CAPM (REGRESSION) for 36 stocks each have 180 observations,however it only gives me one output rather than 36. In SAS i would just put in a *By statement*. I have a variable TICKER that categorize them into 36 groups. *How can I obtain all 36 output instead of just one.* **
2011 Oct 18
1
Repeat a loop until...
Dear all, I know there have been various questions posted over the years about loops but I'm afraid that I'm still stuck. I am using Windows XP and R 2.9.2. I am generating some data using the multivariate normal distribution (within the 'mnormt' package). [The numerical values of sanad and covmat are not important.] > datamat <-
2010 Feb 16
1
Math.factor error message
Dear R-helpers, I am using a vrtest on time series data. My commands are as follows; read.table("B.txt",sep="\t",fill=TRUE, na.strings = "NA") require(vrtest) rm(list=ls(all=TRUE)) datamat <- read.table("B.txt",sep="\t",fill=TRUE, na.strings = "NA") column <- 1 nob <- nrow(datamat) y <-
2008 Aug 22
2
help needed for HWE.exact in library "genetics"
Hi, I have a genotype data for both case and controls and would like to calculate the HW p-value. However, since the number of one genotype is 0, I got wired result. Would someone help me to figure it out? Or confirm it's right? Thanks a lot. ============ > library( "genetics" ) NOTE: THIS PACKAGE IS NOW OBSOLETE. The R-Genetics project has developed an set of enhanced
2003 Jan 29
3
multinomial conditional logit models
A multinomial logit model can be specified as a conditional logit model after restructuring the data. Doing so gives flexibility in imposing restrictions on the dependent variable. One application is to specify a loglinear model for square tables, e.g. quasi-symmetry or quasi-independence, as a multinomial logit model with covariates. Further details on this technique and examples with several
2011 Jul 13
1
Hardy Weinberg Case Control Test in gap R package
Hi, I am using the gap R package to do the Hardy Weinberg Case Control test for many SNP. I am not sure what the values initial1 and initial2 should be for the test. I tried values but they failed. I emailed the author but to no avail. There seems to be some documentation that is deleted at the top, if anyone can direct me how to get this I will be grateful. -- Thanks, Jim. [[alternative HTML
2010 May 10
2
Warning message
Hello, I want to draw a histogram of the mean of sample observations drawn from multivariate t distribution. I am getting the following error corresponding to the code I used. Though I am getting the graph, but I am curious to know the warning message. Warning messages: 1: In if (freq) x$counts else { : the condition has length > 1 and only the first element will be used 2: In if (!freq)
2002 Jun 21
1
naming things in functions
Hello, I'm working with R version 1.5.0 in Windows. I've written a function (SummaryMat, segment below) which uses a loop to repeatedly call another function (PercentsMat, segment below). PercentsMat creates a matrix and adds rows to it each time it is called. I use deparse(substitute(...)) to get the names of the lists sent to PercentsMat to use them as row names in the generated
2002 Nov 27
0
R genetics package now available
The "genetics" package for handling single-locus genetic data is now available on CRAN in both source and Windows binary formats. The purpose of this package is to make it easy to create and manipulate genetic information, and to facility use of this information in statistical models. The library includes classes and methods for creating, representing, and manipulating genotypes
2002 Nov 27
0
R genetics package now available
The "genetics" package for handling single-locus genetic data is now available on CRAN in both source and Windows binary formats. The purpose of this package is to make it easy to create and manipulate genetic information, and to facility use of this information in statistical models. The library includes classes and methods for creating, representing, and manipulating genotypes
2002 Dec 12
0
if problem in function
Dear all, I have written a function for calculating the volume of a tree (=trad) or snag (=h?gst). The included volume regreesion model includes ten parameter values, which are tree species specific. bj?rk.formh?jd.pars is an object which includes the parameter values (parameter set) for birch (=bj?rk). There is one row per tree in the data object. > relev.kols[1:5,
2003 Dec 30
1
floor of n observations in number generators
I couldnt find a previous posting on this in the archives, maybe it has already been mentioned. If you use a calculation to generate n observations in random number generators and you don't round to the nearest integer you may be generating n-1 numbers not n numbers as you thought depending on the storage precision of the calculation. e.g. > m <- 1000 > pi0 <- 0.9 >
2004 Jul 23
0
problem lme using corSymm()
Hi, I got a computational problem with lme (nlme library R 1.9.1) using corSymm(). Here is the data: [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.19639793 0.09127954 0.11733288 0.07598273 0.06545106 0.06211532 [2,] 0.22773467 0.10981912 0.16052847 0.38101187 0.18353474 0.24072918 [3,] 0.46743388 0.45733836 0.32191178 0.43356107 0.39159746 0.53984221 [4,]
2006 Jun 05
3
Fastest way to do HWE.exact test on 100K SNP data?
Hi everyone, I'm using the function 'HWE.exact' of 'genetics' package to compute p-values of the HWE test. My data set consists of ~600 subjects (cases and controls) typed at ~ 10K SNP markers; the test is applied separately to cases and controls. The genotypes are stored in a list of 'genotype' objects, all.geno, and p-values are calculated inside the loop over all
2006 Apr 27
2
Incomplete Trio in TDT analysis
I am involved in a study where, as in most of life, men demonstrate themselves to be recalcitrant. So while we have many probands and most of their mothers we only have about 50% of the trios being complete. I have been running tdt and trio.types. It appears as if it is ignoring the duos. Sometimes a duo can be informative. For instance Father ..missing Mother 1/2 Proband 1/1 This duo shows that
2011 Jan 12
1
Grouped bars in barplot
Dear all, I am trying to make a barplot with clustered pairs of bars, using class=numeric data and the following command: barplot(c(bline_precip[10,9], bline_runoff[10,9], cccma_precip[10,9], cccma_runoff[10,9], csiro_precip[10,9], csiro_runoff[10,9], ipsl_precip[10,9], ipsl_runoff[10,9], mpi_precip[10,9], mpi_runoff[10,9], ncar_precip[10,9], ncar_runoff[10,9], ukmo_precip[10,9],
2006 Oct 02
1
qvalue
Dear colleagues, This is not strictly a R question, but I hope it is ok to ask on the list. I fed a vector of p-values from about 20 million anova tests to the package q-value and obtained this output: > qsummary(asso_p.qvalue) Call: qvalue(p = asso_p.vec) pi0: 1 Cumulative number of significant calls: <1e-04 <0.001 <0.01 <0.025 <0.05 <0.1 <1
2011 Apr 18
1
qvalue
I am using storey's qvalue package but I keep on getting errors. Why is this? > qvalue(p, lambda=0.5)$pi0 [1] "ERROR: p-values not in valid range." Error in qvalue(p, lambda = 0.5)$pi0 : $ operator is invalid for atomic vectors -- Thanks, Jim. [[alternative HTML version deleted]]