Re: [R] epitools and R 2.5

2007-06-27 Thread Tomas Aragon

--- Prof Brian Ripley [EMAIL PROTECTED] wrote:
 On Mon, 11 Jun 2007, Pietro Bulian wrote:
 
  At work after updating to R 2.5 I get an error using epitab from
 package
  epitools, when at home  (R 2.4) I get no error. Could someone help
 me?
 
 The maintainer: this is a long-standing bug in the package.
 But you have enough information from the error message to correct the
 bug 
 and rebuild the package yourself.
 
 There are no such versions of R as '2.5' and '2.4' (see the posting 
 guide), but R 2.4.0 did give a warning on your example.
 
 Note that you are using different versions of epitools in your two 
 locations, a difference you failed to mention and which may be
 important.
 
 
 

Thanks Pietro! I am the maintainer and found the bug.

In the 'epitab' function:

if (method == oddsratio) {
...
else {
fin - list(tab = tab, measure = oddsratio, 
  conf.level = conf.level, pvalue = pvalue, )
}


The comma should not be after the second pvalue. You can correct this
in your local workspace. I will correct and upload new package. 

Tomas


===
Tomas Aragon, MD, DrPH
Tel: 510-847-9139 (mobile)
Web: http://www.medepi.net/aragon

__
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
and provide commented, minimal, self-contained, reproducible code.


[R] Assessing fit for non-nested models using clogit in survival package

2005-12-08 Thread Tomas Aragon
I am analyzing a 1-to-2 matched case-control study using clogit in the
survival package. I am interested in comparing and assessing fit of
non-nested models. I don't want to program all the diagnostics
described in Hosmer/Lemeshow (2000). Can someone proficient with clogit
and assessing fit for non-nested models point me in the right
direction.

Many thanks!
Tomas


Tomas Aragon, MD, DrPH
Tel: 510-847-9139 (mobile)
URL: http://www.idready.org

__
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] Population Projections

2005-10-26 Thread Tomas Aragon
--- Rodriguez, Orlando [EMAIL PROTECTED] wrote:
 Is there an R Package for Population Projections?
 
 Orlando J. Rodriguez
 The Center for Population Research
 University of Connecticut
 Unit 2068
 344 Mansfield Road
 Storrs, CT 06269-2068
 (860)486-9269
 (860)486-6356 (f)
 http://popcenter.uconn.edu
 

Visit Dept of Demography at UC Berkeley courses page:
http://www.demog.berkeley.edu/courses/

They use R and provide some code.
Tomas


Tomas Aragon, MD, DrPH
Tel: 510-847-9139 (mobile)
URL: http://www.idready.org

__
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] Relative Risk and Confidence Intervals

2005-10-17 Thread Tomas Aragon
--- MJ Price, Social Medicine [EMAIL PROTECTED] wrote:
 Dear all,
 
 Despite searching the fullrefman file I have been unable to locate a 
 function to calculate the relative risk and confidence intervals from
 a simple 2 by 2 contingency table. Can anyone tell me how this is
 done.
 
 Thanks in advance
 
 Malcolm
 
 --
 MJ Price, Social Medicine
 [EMAIL PROTECTED]

Malcolm, Install the 'epitools' package and use the 'epitab' function,
and use method=riskratio

Tomas
http://www.epitools.net
http://www.medepi.net/aragon/

__
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] R code for testing the equality of two independent Binomial Populations

2005-03-31 Thread Tomas Aragon
--- jiaotuo niu [EMAIL PROTECTED] wrote:
 Hey guys,
  
 I have problem in dealing with R code for testing the equality of two
 independent Binomial Populations.  The null hypo. is p1=p2=p (Notice:
 not only p1=p2 !).  I don't know how to write the test code which
 includes the value of 'p'.  Your help is appreciated!
  
 Shuang

Try 'prop.test' function.
Tomas

Tomas Aragon, MD, DrPH
Work: http://www.idready.org
EpiTools: http://www.epitools.net
HomePage: http://www.medepi.net/aragon

__
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] Output a dataframe from R to excel

2005-03-14 Thread Tomas Aragon

--- Faith G [EMAIL PROTECTED] wrote:
 Hi, 
 I am trying to output an dataframe from R to Excel file. Can anyone
 tell me how to do it? Thanks a lot.
 Eg. 
 R dataframe:
 ABC
 121
 342
 ...
 

Try:
write.table(mydf, c:/mydf.csv, sep=,, row.names=FALSE)

Then open 'mydf.csv' in Excel.

Tomas
http://www.epitools.net

__
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] Building MacOSX binary in Windows XP

2004-11-10 Thread Tomas Aragon
Under Windows XP, I am able to build R package archived as source
(.tar.gz) and Windows binary (.zip). Can I create MaxOSX archive file
(.tgz) in Windows XP?

Thanks,
Tomas


Tomas Aragon
http://www.epitools.net

__
[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


Re: [R] small world models?

2004-11-08 Thread Tomas Aragon
--- mattf [EMAIL PROTECTED] wrote:
 Hi,
 
 I've searched the archives for a discussion on the use of R for
 developing 
 small world or scale-free network models but have been unable to
 dig 
 anything up.  Is anyone working on these types of models using R, and
 if so, 
 have you found this language amenable to their development?
 
 thanks,
 matt farnsworth
 

Contact Dr. Travis Porco at [EMAIL PROTECTED] . He uses R for
stochastic modeling of infectious diseases, including network models.
He maintains a website at http://www.mathepi.com 
Tomas

__
[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


Re: [R] help for stata user

2004-09-26 Thread Tomas Aragon
--- iip [EMAIL PROTECTED] wrote:
 Hi,
 
 I'm new to R, and I'm STATA user before, could you help me where I
 can
 get document about comparison command between STATA and R.
 
 Thank you very much,
 
 Best regards,
 -iip-
 
I am a former Stata user. Although I have no direct comparison between
R and Stata, you might get an idea from some of our links:

I post my draft R manual on at
http://www.medepi.net/aragon

Look at our R course syllabus at 
http://www.idready.org/courses/2004/fall/2004FallEpiUsingR.html
(There is link to great tutorial by Mark Myatt)

I have some computer-based labs based on CDC outbreak modules at
http://www.idready.org/epi/lab/index.html

I am very slowly building epitools R package, available at 
http://www.epitools.net

Eventually, www.epitools.net will become the portal for all these
documents.

Tomas


=
Tomas Aragon, MD, DrPH, Director
Center for Infectious Disease Preparedness
UC Berkeley School of Public Health
1918 University Ave., 4th Fl., MC-7350
Berkeley, CA 94720-7350
http://www.idready.org

__
[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


Re: [R] Is R good for not-professional-statistician, un-mathematical clinical researchers?

2004-08-20 Thread Tomas Aragon
--- Patrick Burns [EMAIL PROTECTED] wrote:

 I definitely agree that focussing on what R does better than
 other options is the right approach.  One thing that Tomas
 does not mention is graphics.  Two possible selling points along
 this line are:
 
 *)  R is good for understanding your data with graphics.
 *)  R is good for producing graphics for publication.
 
 This discussion reminds me of something my wife says: classes
 are for learning what people don't want to do -- if someone is
 happy to do something, they don't need a class to force them to
 do it.
 
 
 Patrick Burns
 
 Burns Statistics
 [EMAIL PROTECTED]
 +44 (0)20 8525 0696
 http://www.burns-stat.com
 (home of S Poetry and A Guide for the Unwilling S User)
 
Thanks! I agree. I have a web page demonstrating plotting West Nile
virus infections in California at
http://www.medepi.net/data/wnv/index.html

Tomas

=
Tomas Aragon, MD, DrPH, Director
Center for Infectious Disease Preparedness
UC Berkeley School of Public Health
1918 University Ave., 4th Fl., MC-7350
Berkeley, CA 94720-7350
http://www.idready.org

__
[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


Re: [R] Is R good for not-professional-statistician, un-mathematical clinical researchers?

2004-08-19 Thread Tomas Aragon
I am a clinician turned epidemiologist. I just taught R in an intro epi
course. Here are some tips:

- encourage them to use R as their calculator
- encourage them to use R as their spreadsheet
- provide them with exercises to work this functionality
- we started a Yahoo help group for beginner questions (see
http://www.ucbcidp.org/epitools.html)

I have some exercises at http://www.medepi.net/epitools/lab/

If you only show how to do things that can be done is any statistical
package, then they'll choose the user-friendly statistical package
(e.g., stata).

For any additional question, please contact me.
Good luck!

Tomas Aragon
http://www.idready.org

 
--- Jacob Wegelin [EMAIL PROTECTED] wrote:

 
 Alternate title: How can I persuade my students that R is for them?
 
 Alternate title: Can R replace SAS, SPSS or Stata for clinicians?
 
 I am teaching introductory statistics to twelve physicians and two
 veterinarians
 who have enrolled in a Mentored Clinical Research Training Program. 
 My course is the
 first in a sequence of three.  We (the instructors of this sequence)
 chose to teach
 R rather than some other computing environment.
 
 My (highly motivated) students have never encountered anything like
 R.  One frankly
 asked:
 
 Do you feel (honestly) that a group of physicians (with two vets)
 clinicians will
 be able to effectively use and actually understand R? If so, I will
 happily call this
 bookstore and order this book [Venables and Ripley] tomorrow.
 
 I am heavily biased toward R/S because I have used it since the first
 applied statistics
 course I took.  But I would love to give these students some kind of
 objective information
 about the usability of R by non-statisticians--not just my own bias.
 
 Could anyone suggest any such information?  Or does anyone on this
 list use R who is
 a clinician and not really mathematically savvy?  For instance,
 someone who doesn't
 remember any math beyond algebra and doesn't think in terms of
 P(A|B)?
 
 Or have we done a disservice to our students by choosing to make them
 learn R, rather than making ourselves learn SAS, Stata or SPSS?
 
 Thank you for any ideas
 
 Jake Wegelin
 
 __
 [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
 


=
Tomas Aragon, MD, DrPH, Director
Center for Infectious Disease Preparedness
UC Berkeley School of Public Health
1918 University Ave., 4th Fl., MC-7350
Berkeley, CA 94720-7350
http://www.idready.org

__
[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


Re: [R] creating a plot

2004-08-17 Thread Tomas Aragon
--- Konrad Banachewicz [EMAIL PROTECTED] wrote:

 Hi,
 I have a time series plot to produce, yet I want the x-axis to be 
 labelled with dates
 (stored on another array) and not with observation numbers. Can
 anyone 
 suggest me how?
 Thanks.
 
  

Konrad
 
Try checking out http://www.medepi.net/data/wnv/index.html at bottom of
page. 
Tomas

=
Tomas Aragon, MD, DrPH, Director
Center for Infectious Disease Preparedness
UC Berkeley School of Public Health
1918 University Ave., 4th Fl., MC-7350
Berkeley, CA 94720-7350
http://www.idready.org

__
[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


Re: [R] how to learn R quickly?

2004-04-05 Thread Tomas Aragon
--- vinkwai wong [EMAIL PROTECTED] wrote:
 i am new to R,so i post here to ask you how to learn R quickly?
 is there some usefull materials about using R.
 ps:though the manual is a good materials,but it is not the best for a
 newbie,i think.
 
 thank you !
 
Try http://www.ucbcidp.org/courses/epiwithr.pdf

Early draft of tutorial written for public health epidemiologists.
Tomas

=

__
[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