Re: [R] R-help Digest, Vol 206, Issue 25

2020-04-29 Thread David Duffy
utine, and lavaan has the lavCor() function to estimate tetrachoric correlations and fit structural equation models. So you can probably fit your factor model directly and get correct statistical tests there. Cheers, David Duffy. __ R-help@r-projec

[R] Differences between MTDFReml and kinship2

2014-11-06 Thread David Duffy
models list. Cheers, David Duffy. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] snpStats reference allele used in genetic associations?

2014-05-25 Thread David Duffy
francesca casalino asked: Does anyone know how to find the reference allele used for genetic associations ran in snpStats? A is ref allele, B is risk allele. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE d

Re: [R] R-help Digest, Vol 124, Issue 22

2013-06-21 Thread David Duffy
"Vallejo, Roger" asked: I would like to know if we can estimate Rg between two binary traits (disease status: alive vs. dead) with the R package. My data: we have 100 full-sib (FS) families, and two random samples (each with n= 200 FS fish) from each FS family were evaluated for disease resis

Re: [R] simulate correlated binary, categorical and continuous variable

2012-03-31 Thread David Duffy
,r,r,1), nr=2)) x[x>thresh] <- 2 x[x<2] <- 1 polychor(x[,1], x[,2]) } tr <- double(100) for(i in 1:100) tr[i] <- sim1() summary(tr) Min. 1st Qu. MedianMean 3rd Qu.Max. 0.1571 0.2703 0.3041 0.3010 0.3328 0.4062 --

Re: [R] Hardy Weinberg Simulation

2011-06-29 Thread David Duffy
=c(0.33, 0.33, 0.34))) "size" should be the total size ie 100. -- | David Duffy (MBBS PhD) ,-_|\ | email: dav...@qimr.edu.au ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medical Research \_,-._/ | 3

Re: [R] Hardy Weinberg

2011-06-22 Thread David Duffy
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). rmultinom() with HWE expectations __ R-

Re: [R] Getting SNPS from PLINK to R

2011-06-21 Thread David Duffy
snpMatrix package is quite nice (read.plink()) __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained

Re: [R] Vermunt's LEM in R

2011-05-11 Thread David Duffy
,c)) cat("dim\n") for(i in seq(1, ncol(newtab)-1) { cat(nlevels(newtab[,1]," ") } cat("\nlab ") for(i in seq(1, ncol(newtab)-1) { cat(letters[i], " ") } cat("\ndat [", newtab[,"Freq"], " ]\n") -- | David Duffy (MBBS PhD)

Re: [R] using the bootstrap method for latent class analysis

2011-02-17 Thread David Duffy
small self-contained example. Cheers, David Duffy. -- | David Duffy (MBBS PhD) ,-_|\ | email: dav...@qimr.edu.au ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medical Research \_,-._/ | 300 Herston Rd, Brisbane

Re: [R] Fortran and long integers

2011-02-07 Thread David Duffy
6854775807 -- | David Duffy (MBBS PhD) ,-_|\ | email: dav...@qimr.edu.au ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medical Research \_,-._/ | 300 Herston Rd, Brisbane, Queensland 4029, Australia GPG

Re: [R] Converting Fortran or C++ etc to R

2011-01-05 Thread David Duffy
lot of code to port, and are hinting you would like an automated tool, I think you are out of luck ;) There is a Fortran to Lisp translator (f2cl), but I think the resulting code will not get you a lot closer (it is aimed at compilation). Cheers, David Duffy. -- | David

Re: [R] iPhone 3G App For R?

2011-01-03 Thread David Duffy
can't see if gfortran is available. Cheers, David Duffy. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal,

Re: [R] Iteration idioms & laziness

2009-11-29 Thread David Duffy
e iterators and foreach packages give ways to iterate without creating the whole array, so they might do what you want. The OP may also be interested in the jit package, which currently just covers (see http://www.milbo.users.sonic.net/ra) loops, but migh

Re: [R] popular R packages

2009-03-09 Thread David Duffy
g S4 classes" gives us 108 journal citations; "mgcv: GAMs and generalized ridge regression for R" 80 etc Cheers, David Duffy. -- | David Duffy (MBBS PhD) ,-_|\ | email: dav...@qimr.edu.au ph: INT+61+7+3362-0217 fax: -0101 / *

Re: [R] R-help Digest, Vol 71, Issue 16

2009-01-17 Thread David Duffy
axes=F, xlab=" ", ylab=" ")) paint.chromosome(1, pos=2.2) points(cbind(locus_coordinate[chrom==1], rep(2, length(locus_coordinate)[chrom==1]), col="red", cex=4) Unfortunately for you, the units here are cM

Re: [R] help needed for HWE.exact in library "genetics"

2008-08-22 Thread David Duffy
] 71.253125 8.493750 0.253125 ... David Duffy. -- | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medical Research \_,-._/ | 300 Herston Rd, Brisbane, Queensland

Re: [R] How to solve empty cells in the contingency table?

2008-06-26 Thread David Duffy
zero marginals.Does someone have some suggestions? Please help me out, thanks a lot! Cheers, Yan One approach: if they are *structural zeroes*, tab <- as.data.frame(table(x,y)) then use the exactLoglinTest package's mcexact function Dav

Re: [R] EM algorithm for multiple-locus haplotypes frequencies

2008-04-18 Thread David Duffy
anything of this kind in R? > Look at all the libraries whose name starts haplo eg haplo.stats. -- | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medi

Re: [R] Packages for Animal Models & QG analyses

2007-11-27 Thread David Duffy
think kinship (which uses lme) and perhaps regress packages. For data amenable to an ANOVA/hierarchical setup then lme4 as well (which does GLMMs nicely). Have you tried Wombat (non-R)? David Duffy. -- | David Duffy (MBBS PhD) ,-_|\ | email:

Re: [R] Robust or Sandwich estimates in lmer2

2007-09-20 Thread David Duffy
lysis of pedigree data), the jackknife standard errors seemed a bit conservative (too big). David Duffy. -- | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medi