[R] asypow.noncent. Thanks!!

2004-09-22 Thread david_foreman
Thank y'all for a) pointing out what I was doing wrong b) being so patient with what, 
in retrospect, was such an obvious blunder by me.  I'm afraid I was confused by the 
accompanying pdf file, which is not entirely consistent with the help files.


___
Most doctors use http://www.Doctors.net.uk e-mail.
Move to a free professional address with spam and virus protection.

__
[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] asypow.noncent: how does it work?

2004-09-20 Thread david_foreman
I am trying to do power calculations for the proportional odds model using the asypow 
library.

The code
 
noncenta90b10-asypow.noncent(theta.ha=a9010,info.mat=infomatrixa90b10,constraints=constrt)

returns

Error in max(..., na.rm = na.rm) : invalid mode of argument.

the various arguments I've used are:
 a9010
   [,1]
[1,] -1.7357568
[2,] -0.1928619
specifying the theta.ha array as a row not a column makes no difference


 infomatrixa90b10
 [,1] [,2]
[1,]  0.967005807 -0.004699262
[2,] -0.004699262  0.903852346
  
 constrt
 [,1] [,2] [,3]   
[1,] 1  a  -1.92861865194525
[2,] 1  b  0


I'm probably missing something very simple, but I can't see what it is.  Can anyone 
help?


___
Most doctors use http://www.Doctors.net.uk e-mail.
Move to a free professional address with spam and virus protection.

__
[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: Thanks Frank, setting graph parameters, and why social scientists don't use R

2004-08-17 Thread david_foreman
First, many thanks to Frank Harrell for once again helping me out.  This actually 
relates to the next point, which is my contribution to the 'why don't social 
scientists use R' discussion.  I am a hybrid social scientist(child psychiatrist) who 
trained on SPSS.  Many of my difficulties in coming to terms with R have been to do 
with trying to apply the logic underlying SPSS, with dire results.  You do not want to 
know how long I spent looking for a 'recode' command in R, to change factor names and 
classes.

I think the solution is to combine a graphical interface that encourages command line 
use (such as Rcommander) with the analyse(this) paradigm suggested, but also 
explaining how one can a) display the code on a separate window ('page' is only an 
obvious command once you know it), and b) how one can then save one's modification, 
make it generally available, and not overwrite the unmodified version (again, thanks, 
Frank).  Finally, one would need to change the emphasis in basic statistical teaching 
from 'the right test' to 'the right model'.  That should get people used to R's logic.

If a rabbit starts to use R, s/he is likely to head for the help files associated with 
each function, which can assume that the reader can make sense of gnomic utterances 
like Omit 'var' to impute all variables, creating new variables in 'search' position 
'where'.  I still don't know what that one means (as I don't understand search 
positions, or why they're important).  This can be very offputting, and could lead the 
rabbit to return to familiar SPSS territory.

Finally, friendlier error messages would also help. It took me 3 days, and opening 
every function I could, to work out that '...cannot find function xxx.data.frame...' 
meant that MICE was unable to make a polychotomous logistic imputation model converge 
for the variable immediately preceding it.


I am now off to the help files and FAQs to find out how to change graph parameters, as 
the plot.mids function in MICE a) doesn't allow one to select a subset of variables, 
and b) tells me that the graph it wants to produce on the whole of my 26 variable 
dataset is too big to fit on the (windows) plotting device.  Unless anyone wants to 
tell me how/where? (which of course is why, in the end, R is EASIER to use than SPSS)


-- Original Message --
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
Date:  Sun, 15 Aug 2004 12:10:22 +0200

Send R-help mailing list submissions to
   [EMAIL PROTECTED]

To subscribe or unsubscribe via the World Wide Web, visit
   https://stat.ethz.ch/mailman/listinfo/r-help
or, via email, send a message with subject or body 'help' to
   [EMAIL PROTECTED]

You can reach the person managing the list at
   [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than Re: Contents of R-help digest...


Today's Topics:

   1. Re: numerical accuracy, dumb question (Brian Gough)
   2. RE: numerical accuracy, dumb question (Tony Plate)
   3. RE: numerical accuracy, dumb question (Dan Bolser)
   4. Re: extracting datasets from aregImpute objects
  (Frank E Harrell Jr)
   5. RE: numerical accuracy, dumb question (Marc Schwartz)
   6. RE: numerical accuracy, dumb question (Marc Schwartz)
   7. RE: numerical accuracy, dumb question (Prof Brian Ripley)
   8. ROracle connection problem (xianghe yan)
   9. association rules in R (Christoph Lehmann)
  10. R Cookbook ([EMAIL PROTECTED])
  11. RE: numerical accuracy, dumb question (Marc Schwartz)
  12. How to display the equation of ECDF (Yair Benita)
  13. Re: association rules in R (Spencer Graves)
  14. Re: How to display the equation of ECDF (Rolf Turner)
  15. Re: How to display the equation of ECDF (Spencer Graves)
  16. how to draw two graphs in one graph window (Chuanjun Zhang)
  17. Rserve needs (but cannot find) libR.a (or maybe it's .so)
  (Paul Shannon)
  18. Re: Rserve needs (but cannot find) libR.a (or maybe it's .so)
  (A.J. Rossini)
  19. calibration/validation sets (Peyuco Porras Porras .)
  20. RE: calibration/validation sets (Austin, Matt)
  21. Re: calibration/validation sets (Kevin Wang)
  22. RE: calibration/validation sets (Liaw, Andy)
  23. Dirichlet-Multinomial (Z P)
  24. Re: how to draw two graphs in one graph window
  (Adaikalavan Ramasamy)
  25. index and by groups statement (Robert Waters)
  26. Re: index and by groups statement (Adaikalavan Ramasamy)


--

Message: 1
Date: 14 Aug 2004 10:46:31 +0100
From: Brian Gough [EMAIL PROTECTED]
Subject: Re: [R] numerical accuracy, dumb question
To: Dan Bolser [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Message-ID: [EMAIL PROTECTED]

Dan Bolser [EMAIL PROTECTED] writes:

 I store an id as a big number, could this be a problem?

If there are ids with significant leading zeros, or too big to be
represented accurately (2^53)--you won't get any warning about 

RE: [R] why won't rq draw lines?

2004-07-20 Thread david_foreman
Thanks, this works for me as well, though the lines extend beyond the Y axes 
(sometimes).  I'm very grateful.  

-- Original Message --
From: Liaw, Andy [EMAIL PROTECTED]
Date:  Mon, 19 Jul 2004 10:04:55 -0400

This works for me:

data(engel)
plot(engel$x, engel$y, xlab=household income, ylab=food expenditure,
 cex=.5)
taus - c(.05,.1,.25,.75,.9,.95)
lapply(taus, function(tau) abline(coef(rq(y~x, data=engel, tau=tau

HTH,
Andy

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 [EMAIL PROTECTED]
 Sent: Monday, July 19, 2004 9:53 AM
 To: [EMAIL PROTECTED]
 Subject: [R] why won't rq draw lines?


 I've been trying to draw quantile linear regression lines
 across a scatterplot of my data using

 attach(forrq)
  plot(PREGNANT,DAY8,xlab=pregnant EPDS,ylab=postnatal
 EPDS,cex=.5)
  taus - c(.05,.1,.25,.75,.9,.95)
  xx - seq(min(PREGNANT),max(PREGNANT),100)
  for(tau in taus){
  f - coef(rq(DAY8~PREGNANT,tau=tau))
  yy - (f[1]+f[2]*xx)
  lines(xx,yy)
  }
 which is simply the method from the help file with my dataset
 attached, and the variable names substituted where
 appropriate.  I get the scatterplot, but no lines.  Any ideas
 about what's going on? or wrong?


 __
 _
 Most doctors use http://www.Doctors.net.uk e-mail.
 Move to a free professional address with spam and virus protection.

 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide!
 http://www.R-project.org/posting-guide.html




--
Notice:  This e-mail message, together with any attachments, contains information of 
Merck  Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), 
and/or its affiliates (which may be known outside the United States as Merck Frosst, 
Merck Sharp  Dohme or MSD and in Japan, as Banyu) that may be confidential, 
proprietary copyrighted and/or legally privileged. It is intended solely for the use 
of the individual or entity named on this message.  If you are not the intended 
recipient, and have received this message in error, please notify us immediately by 
reply e-mail and then delete it from your system.
--


Doctors.net.uk e-mail protects you from viruses and unsolicited messages




___
Most doctors use http://www.Doctors.net.uk e-mail.
Move to a free professional address with spam and virus protection.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] why won't rq draw lines?

2004-07-19 Thread david_foreman
I've been trying to draw quantile linear regression lines across a scatterplot of my 
data using 

attach(forrq)
 plot(PREGNANT,DAY8,xlab=pregnant EPDS,ylab=postnatal EPDS,cex=.5)
 taus - c(.05,.1,.25,.75,.9,.95)
 xx - seq(min(PREGNANT),max(PREGNANT),100)
 for(tau in taus){
 f - coef(rq(DAY8~PREGNANT,tau=tau))
 yy - (f[1]+f[2]*xx)
 lines(xx,yy)
 }
which is simply the method from the help file with my dataset attached, and the 
variable names substituted where appropriate.  I get the scatterplot, but no lines.  
Any ideas about what's going on? or wrong?


___
Most doctors use http://www.Doctors.net.uk e-mail.
Move to a free professional address with spam and virus protection.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html