Re: [R] R-help Digest, Vol 54, Issue 30

2007-08-31 Thread David Duffy
is not required to do the sort. Terry Therneau's kinship package does that ordering, but doesn't include output routines for the Linkage format. David Duffy. | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101

Re: [R] exaustive subgrouping or combination

2007-06-29 Thread David Duffy
On Fri, 29 Jun 2007, Peter Dalgaard wrote: David Duffy wrote: Waverley [EMAIL PROTECTED] asked: Dear Colleagues, I am looking for a package or previous implemented R to subgroup and exaustively divide a vector of squence into 2 groups. -- Waverley @ Palo Alto Google [R

[R] exaustive subgrouping or combination

2007-06-28 Thread David Duffy
or so. 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 4029, Australia GPG

Re: [R] Mixed effects multinomial regression and meta-analysis

2007-03-06 Thread David Duffy
that you could expand. You could even partition out the studies using the party package (I believe it does an ordinal logistic). David Duffy. -- | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101

Re: [R] RSNPper SNPinfo and making it handle a vector

2007-02-19 Thread David Duffy
), filter=refsnp, values=(refsnp=c(rs17166282,rs3897937)), mart=ensnp) -- | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medical Research

Re: [R] RSNPper SNPinfo and making it handle a vector

2007-02-05 Thread David Duffy
useful (snps.by.name, snps.by.region, annotate.snps, maf: they probably need to be updated before I show them off ;)). David Duffy -- | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit

Re: [R] Problem with ordered probit model in MASS

2007-01-25 Thread David Duffy
an ordered logistic in lrm() and using those estimates as starting values (if it runs OK). David Duffy. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

Re: [R] Fixed zeros in tables

2006-11-27 Thread David Duffy
If they are structural zeros, I believe you want: glm(COUNT ~ CONCERNS + AGE + GENDER, data=health, subset=(WEIGHTS0), family=poisson) David Duffy. -- | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101

[R] Confidence interval for relative risk

2006-11-13 Thread David Duffy
likelihood based CI using the Gibbs Chi-square (LRTS), but IIRC originally used the Pearson chi-square. I don't think there are R implementations. David Duffy. -- | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101

Re: [R] question on multilevel modeling

2006-11-08 Thread David Duffy
for everyone. The many time series packages may also be usable for this. David Duffy. -- | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medical Research

[R] Bivariate Weibull distribution -- Copula

2006-10-05 Thread David Duffy
Edition) has a chapter on bivariate survival analysis (with our example in it;)). David Duffy. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

[R] Re constructing a dataframe from a database of newspaper articles

2006-07-23 Thread David Duffy
, 8] - txt[i] } res[,7] - paste(res[,7], res[,8], sep=; ) res - res[,-8] | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medical Research \_,-._/ | 300

Re: [R] Re constructing a dataframe from a database of newspaper articles

2006-07-23 Thread David Duffy
On Mon, 24 Jul 2006, David Duffy wrote: From: Bob Green [EMAIL PROTECTED] I am hoping for some assistance with formatting a large text file which consists of a series of individual records. Each record includes specific labels/field names (a sample of 1 record (one of the longest ones

Re: [R] sib TDT transmission/disequilibrium test

2006-05-31 Thread David Duffy
as a conditional logistic regression (look at clogit). I don't think the sib TDT is as efficient as an FBAT approach, which can be applied to that type of data. David Duffy. | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax

[R] Repeating tdt function on thousands of variables

2006-05-03 Thread David Duffy
) names(res) - names(your.data)[-seq(1,pos.first.marker-1)] for (i in seq(1, Nsnps)) { res[i] - tdt(your.data[,i], your.data)$p.value[2] } David Duffy | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101

Re: [R] Reshaping genetic data from long to wide

2006-04-11 Thread David Duffy
, timevar=marker, idvar=id,direction=wide) names(ped) - gsub(genotype.,, names(ped)) rpos - match(snps$Name, names(ped)) ped - ped[,c(1, rpos[!is.na(rpos)])] ped } | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217

Re: [R] Binning question (binning rows of a data.frame

2006-03-20 Thread David Duffy
I have missed a very simple trick. Maybe something like: x - data.frame(i=sample(1:10),j=1:10) x2 - x[order(x$i),] x2$k - cumsum(x2$j) # # 4 bins (;)) # x2$bins - cut(x2$k,quantile(x2$k), labels=F) x2 David Duffy. __ R-help@stat.math.ethz.ch mailing

[R] Contingency table and zeros

2006-03-06 Thread David Duffy
Let's assume I have a vector of integers : myvector - c(1, 2, 3, 2, 1, 3, 5) For this, I create a table with ; mytable - table(myvector) 1 2 3 5 2 2 2 1 However, table() returns an array of integers, mytable[4] returns the occurence number of the 5 item, which makes this table hard to

Re: [R] var-covar matrices comparison

2006-02-21 Thread David Duffy
%*% solve(E-p) N=size of group p=number of variables E=expected covariance matrix O=observed covariance matrix where in your example, E will be the observed covariance matrix for the pooled groups. There are GLS etc alternatives - see eg Bollen's book on SEM. | David Duffy (MBBS PhD

[R] Mixed-effects models / heterogenous covariances

2006-02-02 Thread David Duffy
of Leeds/UK lmekin and coxme in Terry Therneau's kinship package may help. David Duffy. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] Sometimes having problems finding a minimum using optim(), optimize(), and nlm() (while searching for noncentral F parameters)

2005-10-11 Thread David Duffy
algorithms. | 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 4029, Australia GPG 4D0B994A v

Re: [R] Simulate phi-coefficient (correlation between dichotomous vars)

2005-09-27 Thread David Duffy
-p1)*(1-p2)) } Y - X i1 - X==1 i0 - X==0 Y[i1] - rbinom(sum(i1),1, p2 + covar/p1) Y[i0] - rbinom(sum(i0),1, p2 - covar/(1-p1)) data.frame(X,Y) } David Duffy. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r

[R] Clustering and bootstrap

2005-09-22 Thread David Duffy
From: Eric Pante [EMAIL PROTECTED] Dear Listers, I emailed the list a few days ago about how to bootstrap a community matrix (species by sites) and get a consensus tree with node support. A friend pointed out that a similar question remained unanswered in 2004. I wish to re-word my

[R] Simulate phi-coefficient

2005-09-11 Thread 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 4029, Australia GPG 4D0B994A v

[R] convergence for proportional odds model

2005-09-06 Thread David Duffy
Even then, summary(m1) gives the same problem (as it refits). There is separation in the data, of course, but I presume the ordinality gives some extra information. David Duffy. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman

Re: [R] how to fit the partial association model with R?

2005-09-04 Thread David Duffy
://math.cl.uh.edu/thompsonla/ under An S Manual to Accompany Agresti's Categorical Data Analysis 2nd ed. (2002) along with Agresti's book itself. | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101

Re: [R] R-help Digest, Vol 30, Issue 6

2005-08-08 Thread David Duffy
academic libraries. David Duffy. * Don't you use Pap or JPap at Myriad? __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] linkage disequilibrium

2005-08-08 Thread David Duffy
disequilibria. Note that haplo.stats and hapassoc are aimed specifically at comparing groups or testing for association to other traits. My package gllm is not as easy to use but can combine phased and unphased data in loglinear models -- you could probably use cat in the same way. David Duffy. | David

[R] exact values for p-values

2005-07-13 Thread David Duffy
] 1.3702710894887480597e-297 cf 1.37027108948832580215549799419452388134616261215463681945E-297 | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medical Research

Re: [R] How to convert c:\a\b to c:/a/b

2005-06-28 Thread David Duffy
I couldn't resist adding a more literal answer unback - function(x) { chars - unlist(strsplit(deparse(x),)) chars - chars[-c(1,length(chars))] paste(gsub(,/,chars),collapse=) } unback(\n) | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED

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

2005-03-01 Thread David Duffy
(geno)$unique.alleles As documented, this is R specific. | David Duffy (MBBS PhD) email: [EMAIL PROTECTED] ,-_|\ | ph: INT+61+7+3362-0217 fax: -0101 / * | Genetic Epidemiology Lab, Queensland Institute of Medical Research \_,-._/ | 300 Herston Rd

[R] Re: Polychoric correlations

2004-12-08 Thread David Duffy
at the related loglinear models. | 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 4029, Australia GPG

[R] Re: Tetrachoric and polychoric correlations, Polycor package

2004-12-08 Thread David Duffy
factor model based on polychoric correlations should fit perfectly, if the no higher order interaction assumption is right, | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland

[R] Re: variations on the theme of survSplit

2004-11-16 Thread David Duffy
=.) } new.x[this.rec,3]-case[i] } new.x } David Duffy. __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] Re: QTL interval mapping in outbred populations

2004-11-08 Thread David Duffy
routine to analyse them. The programs by Jing hua Zhao, Beth Atkinson and others could also then be used for linkage analysis of survival data (http://www.ucl.ac.uk/~rmjdjhz/r-progs.htm) (I haven't any experience with these programs yet). David Duffy. | David Duffy (MBBS PhD

[R] pnorm, qnorm

2004-08-12 Thread David Duffy
Trenkler, Dietrich said: I found the following strange behavior using qnorm() and pnorm(): x-8.21;x-qnorm(pnorm(x)) [1] 0.0004638484 x-8.28;x-qnorm(pnorm(x)) [1] 0.07046385 x-8.29;x-qnorm(pnorm(x)) [1] 0.08046385 x-8.30;x-qnorm(pnorm(x)) [1] -Inf qnorm(1-.Machine$double.eps) [1]

[R] OT: virus affecting a list subscriber

2004-06-18 Thread David Duffy
I presume I am not alone in receiving return-to-sender mailings provoked by a well known virus eg [EMAIL PROTECTED] (reason: 550 [EMAIL PROTECTED]... User unknown) [EMAIL PROTECTED] (reason: 550 [EMAIL PROTECTED]... User unknown) [EMAIL PROTECTED] (reason: 550 [EMAIL PROTECTED]...

[R] disattenuated correlations

2004-05-13 Thread David Duffy
Jens Oehlschlägel asked: Can someone point me to literature and/or R software to solve the following problem: Assume n true scores t measured as x with uncorrelated errors e , i.e. x = t + e and assume each true score to a have a certain amount of correlation with some of the other true

[R] Re: R-help Digest, Vol 13, Issue 9

2004-03-09 Thread David Duffy
in f3xact. This problem should not occur. The integer hash key is bigger than the largest allowable integer, and so appears as a negative number. Table is too big. | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101

[R] Re: R-help Digest, Vol 11, Issue 14

2004-01-14 Thread 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 4029, Australia GPG 4D0B994A v

[R] Re: R-help Digest, Vol 9, Issue 11

2003-11-11 Thread David Duffy
website, one for sequential analysis IIRC. I have some on my website for genetic association (TDT and case-control) and linkage (variance components) analysis. | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101

[R] Updating least squares

2003-09-23 Thread David Duffy
this -- see statlib or his home page (there are several similar routines eg AS164). It would be straightforward to write an R interface. David Duffy __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

[R] Re: logistic regression {R-help Digest ..}

2003-09-11 Thread David Duffy
package does this: summary(brlr(V2 ~ V1)) brlr(formula = V2 ~ V1) Coefficients: Value Std. Error t value (Intercept) 0.2620 1.0624 0.2466 V1 1.4014 1.0077 1.3908 Deviance: 3.5078 Penalized deviance: 3.528 Residual df: 7 -- | David Duffy (MBBS PhD

[R] animal model in R

2003-07-24 Thread David Duffy
If your datasets are small, then it is not difficult to roll your own using optim(). If you look at http://www.qimr.edu.au/davidD/sib-pair.R you will find such a routine at lines 1511-1562. This calls kinship.rel() that produces NRM etc. -- | David Duffy (MBBS PhD

[R] Re: R-help digest, Vol 1 #45 - 24 msgs

2003-01-14 Thread David Duffy
the data.frame... perhaps as.data.frame.table(table(spell,loc)) -- | 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