Re: [R] R and clinical studies

2007-03-09 Thread Soukup, Mat
Delphine,

Please see the following message posted a week ago:
http://comments.gmane.org/gmane.comp.lang.r.general/80175.

HTH,

-Mat 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Delphine Fontaine
Sent: Friday, March 09, 2007 8:29 AM
To: r-help@stat.math.ethz.ch
Subject: [R] R and clinical studies

Does anyone know if for clinical studies the FDA would accept  
statistical analyses performed with R ?

Delphine Fontaine

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


Re: [R] Using R for devices trial

2007-03-02 Thread Soukup, Mat
Hi Cody,

I would point you to the presentation by Sue Bell at least year's ASA
meeting available here:
http://www.fda.gov/Cder/Offices/Biostatistics/Bell.pdf. I can't speak
for CDRH, but at CDER we are making some progress towards the level of
comfort with the use of R as a valid software tool. Specifically, 
1. R was granted approval by our IT folks for use on our government PC's
(2 years in the making to get this).
2. An R course is in development for FDA reviewers to use R for review
of clinical trial data.
3. This Monday at the 1st FDA/DIA Spring Meeting I will be offering a
tutorial on Statistical Graphics with R for Clinical Trial Data.
4. An increasing effort to pigeon-tail R to ongoing projects to show
proof by example that R can be trusted when used properly.

So from the regulatory side, progress is being made, but there still do
exist those who have some discomfort with the use of an open-source tool
for data analysis. Someday hopefully that too will be changed.

HTH,

-Mat

Disclaimer: The views expressed are those of the author and must not be
taken to represent policy or guidance on behalf of the Food and Drug
Administration.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, March 01, 2007 5:43 PM
To: [EMAIL PROTECTED]
Subject: [R] Using R for devices trial


I would like to use R for submissions to FDA/CDRH (the medical device
company I work for currently uses only SAS).  Previous postings to the
list
regarding R and 21 CFR 11 compliance have been very helpful.  However,
reluctance to using open source software for statistical analyses and
reporting remains high here at my company.  Has anyone used R for an
official submission to FDA/CDRH?  It would be most helpful if I could
tell
our group that others have been able to use R for this purpose.

Regards,
Cody Hamilton
Staff Biostatistician
Edwards Lifesciences

__
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-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] Version of R in saved workspaces

2006-10-13 Thread Soukup, Mat
useRs and developeRs-

Apologies for my naivety, but I just couldn't figure out how to open an
old workspace (created using R 2.3.0) using R 2.3.0 and not R 2.4.0
which is currently happening. For all I know this has always been the
case, but I'm having a problem with a function that doesn't work in
2.4.0 but does work in 2.3.1 (function is in the process of being
fixed). So I would ideally like to open my old workspaces with the
version of R I used in creating the workspace and at the moment not in R
2.4.0 - though in a few weeks when the function is fixed I'm sure I'll
love 2.4.0 as I have all previous versions:)

Thanks for any help,

-Mat

Steps to what I'm doing.

1. In R 2.3.1 I import data, manipulate it until my heart's content, and
run some analyses.
2. I save the workspace to my local drive - name it CoolStats.RData.
3. I see R 2.4.0 is released and immediately download it and start
playing with it only to find the above mentioned error.
4. Since error is going to take some time to fix, will work with R 2.3.1
in the interim.
5. Open CoolStat.Rdata and when I type version I get the below.

 version
   _   
platform   i386-pc-mingw32 
arch   i386
os mingw32 
system i386, mingw32   
status 
major  2   
minor  4.0 
year   2006
month  10  
day03  
svn rev39566   
language   R   
version.string R version 2.4.0 (2006-10-03)

***
Mat Soukup, Ph.D.
Food and Drug Administration
10903 New Hampshire Ave. 
BLDG 22 RM 5329
Silver Spring, MD 20993-0002
Phone: 301.796.1005
***


[[alternative HTML version deleted]]

__
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] [Off-Topic-but somewhat related] DIA/FDA Open Toolbox Initiative

2006-08-02 Thread Soukup, Mat
UseR's-

As this is slightly off-topic I will limit the discussion to only the
major points; for further information feel free to reply off-line.

DIA and FDA are hosting a forum to discuss (as per the Goal of the
announcement--see link below) a vendor-neutral software product to
support validated analytic procedures (tools) and make tool
development a collaborative effort among reviewers, academic
researchers, and the pharmaceutical industry. The analytic procedures
could be done in R. SAS (gasp), Stata, Splus, or other programming
language. This is just an initiative and the hope is to attract people
that would like to contribute to the effort and also assist in guiding
the direction of the development of such software.
This is a free event held on Sept. 14, 2006 in Bethesda, Maryland
(Washington DC area). Space is limited to the first 30 to register, so
if interested please do so early.
For further details including how to register please see the following
link.
http://www.diahome.org/DIAHome/Education/FindEducationalOffering.aspx?pr
oductID=12092eventType=Meeting

Thank you and apologies for the off-topic post, but I felt this might be
of interest to some of the many great UseRs.

Cheers,

-Mat

Standard Disclaimer: The views and opinions expressed are those of the
author and not those of the FDA.

***
Mat Soukup, Ph.D.
Food and Drug Administration
10903 New Hampshire Ave. 
BLDG 22 RM 5329
Silver Spring, MD 20993-0002
Phone: 301.796.1005
***


[[alternative HTML version deleted]]

__
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] trellis.focus with postscript device

2006-07-19 Thread Soukup, Mat
Hello.

First: R 2.3.1 on Windows XP.

I am trying to add information (sample size) to the Trellis strips which
I am successful using the trellis.focus function with the default
Windows device. However, I typically use the postscript device as I use
LaTeX and \includegraphic for incorporating graphs into stat reviews. 

Here's some example code (apologies for the lack of creativity and
resemblance to a real example)

yy - c(rnorm(20,2),rnorm(35,3), rnorm(30,2),rnorm(20,3),rnorm(4,2),
rnorm(10,3))
xx - c(1:20,1:35,1:30,1:20,1:4,1:10)
gg - rep(c('A','B','A','B','A','B'), c(20,35,30,20,4,10))
pp - rep(c('Cond 1','Cond 2','Cond 3'), c(55, 50, 14))

xyplot(yy ~ xx | pp, groups=gg)
trellis.focus('strip', 1, 1)
ltext(0,.5,'20',col='red', pos=4)
ltext(1,.5,'35',col='black', pos=2)
trellis.unfocus()
trellis.focus('strip', 2, 1)
ltext(0,.5,'30',col='red', pos=4)
ltext(1,.5,'20',col='black', pos=2)
trellis.unfocus()
trellis.focus('strip', 1, 2)
ltext(0,.5,'4',col='red', pos=4)
ltext(1,.5,'10',col='black', pos=2)
trellis.unfocus()

This works. But if I do,

postscript('C:/TEMP/example.eps')
# All code as above
dev.off()

I notice a problem with the graphic. When looking at the EPS figure, the
only strip with added data is the first one (bottom left) with the strip
still highlighted in red (i.e. it doesn't appear that trellis.unfocus()
was executed). Work arounds that I can think of are to simply save the
Windows device as postscript and save to the correct directory or better
yet, write my own strip function. However, I was curious if there was
another way using the strategy of postscript(), graph code,
trellis.focus() code, dev.off().

Thanks,

Mat

***
Mat Soukup, Ph.D.
Food and Drug Administration
10903 New Hampshire Ave. 
BLDG 22 RM 5329
Silver Spring, MD 20993-0002
Phone: 301.796.1005
***


[[alternative HTML version deleted]]

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


Re: [R] trellis.focus with postscript device

2006-07-19 Thread Soukup, Mat
Thanks Deepayan.

Adding the argument highlight=FALSE to each trellis.focus() call worked
marvelously.

Cheers,

Mat 

-Original Message-
From: Deepayan Sarkar [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 19, 2006 11:58 AM
To: Soukup, Mat
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] trellis.focus with postscript device

On 7/19/06, Soukup, Mat [EMAIL PROTECTED] wrote:
 Hello.

 First: R 2.3.1 on Windows XP.

 I am trying to add information (sample size) to the Trellis strips
which
 I am successful using the trellis.focus function with the default
 Windows device. However, I typically use the postscript device as I
use
 LaTeX and \includegraphic for incorporating graphs into stat reviews.

 Here's some example code (apologies for the lack of creativity and
 resemblance to a real example)

 yy - c(rnorm(20,2),rnorm(35,3), rnorm(30,2),rnorm(20,3),rnorm(4,2),
 rnorm(10,3))
 xx - c(1:20,1:35,1:30,1:20,1:4,1:10)
 gg - rep(c('A','B','A','B','A','B'), c(20,35,30,20,4,10))
 pp - rep(c('Cond 1','Cond 2','Cond 3'), c(55, 50, 14))

 xyplot(yy ~ xx | pp, groups=gg)
 trellis.focus('strip', 1, 1)
 ltext(0,.5,'20',col='red', pos=4)
 ltext(1,.5,'35',col='black', pos=2)
 trellis.unfocus()
 trellis.focus('strip', 2, 1)
 ltext(0,.5,'30',col='red', pos=4)
 ltext(1,.5,'20',col='black', pos=2)
 trellis.unfocus()
 trellis.focus('strip', 1, 2)
 ltext(0,.5,'4',col='red', pos=4)
 ltext(1,.5,'10',col='black', pos=2)
 trellis.unfocus()

 This works. But if I do,

 postscript('C:/TEMP/example.eps')
 # All code as above
 dev.off()

 I notice a problem with the graphic. When looking at the EPS figure,
the
 only strip with added data is the first one (bottom left) with the
strip
 still highlighted in red (i.e. it doesn't appear that
trellis.unfocus()
 was executed).

Actually, you have produced a multiple-page postscript file, with what
you really want in the last page. If you highlight the strips when
calling trelis.focus, they have to be un-highlighted by
trellis.unfocus. In theory, this is just a removal of a rectangle
object. In practice, grid achieves this by drawing a new page. You
need to avoid this.

Your options are:

(1) add 'highlight = FALSE' to all trellis.focus() calls
(2) run the script in batch mode, where the default highlight =
interactive() is FALSE

I'll think about adding an option to control the default.

Deepayan

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


Re: [R] generating LaTeX tables from Match output

2006-04-04 Thread Soukup, Mat
Hi Brian,

I think the following should work, although this may not be the most
elegant solution.

dat - matrix(c(a$est, b$est,a$se, b$se), ncol=2)
colnames(dat) - c('Estimate','SE')

latex(dat, file='C:/Temp/out.tex',
rowlabel='', digits=3)

HTH,

-Mat

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Brian Quinif
Sent: Tuesday, April 04, 2006 2:05 PM
To: r-help@stat.math.ethz.ch
Subject: [R] generating LaTeX tables from Match output

Dear R users,

I am using the Match function to generate nearest neighbor matching
estimators.  On that front I am ok, but where I am having problems is
getting my output into nice LaTeX tables.

Here is some basic code imitating the estimation I'm doing.  No problem
there.

library(Matching)

#make up some data
X1 - matrix(rnorm(1000*5), ncol=5)
Y1 - as.vector(rnorm(1000))
Tr1 - c(rep(1,500),rep(0,500))

#estimate nearest neighbor, 1-1 matching, ATT
a - Match(Y=Y1, X=X1, Tr=Tr1, M=1)
summary(a)

#make up some more data
X2 - matrix(rnorm(1000*5), ncol=5)
Y2 - as.vector(rnorm(1000))
Tr2 - c(rep(1,500),rep(0,500))
b - Match(Y=Y2, X=X2, Tr=Tr2, M=1)
summary(b)

I have tried the xtable and latex functions but have not been able to
get what I wanted.  One thing you should know if you are unfamiliar
with Match is that it only generates *one* estimator.  What I want to
do is take the coefficient a (along with its SE) and the coefficient
in b (along with its SE) and put them into a nice table.  Once I get
that accomplished, I'll worry about titles, etc.  Eventually, though,
I will want to put the results from many (say, 10) estimations in one
table.  If anyone has some recommended code, I'd really appreciate it.

Thanks,

Brian

__
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-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] Potential for R to conflict with other softwares

2005-11-03 Thread Soukup, Mat
Hi.

After some time, my collegues at the Food and Drug Adminstration have
finally acknowledged R as a powerful statistical computing environment.
However, in order to comply with the Office of Information and Technology
standards there are a couple of questions about whether R could interfere
with other software. As I'm more of a driver of the R software and not a
mechanic, I was hoping for the insight of the many great useRs. Below is a
list of 5 proposed questions to which I value any comment.

Thank you for your time,

-Mat


1. Does R have high resolution graphics?

2. Does R have .dll files, or other executables which are not located in the
R software directory tree?

3. Does R modify the Windows registry in a non-obvious way, i.e. other than
defining itself and what extensions to associate with R, and what are those
extensions?

4. Does R add macros to any part of MS Office?

5. Can you anticipate any other way in which installing and using R could
disrupt the operation of another software?
 

***
Mat Soukup, Ph.D.
Food and Drug Administration
10903 New Hampshire Ave. 
BLDG 22 RM 5329
Silver Spring, MD 20993-0002
Phone: 301.796.1005
***


[[alternative HTML version deleted]]

__
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] Potential for R to conflict with other softwares

2005-11-03 Thread Soukup, Mat
I just wanted to make one clarification about my statement: After some
time, my collegues at the Food and Drug Adminstration have finally
acknowledged R as a powerful statistical computing environment. I did not
intend for this to read that R has been acknowledged as being  21 CFR Part
11 compliant. This is a whole other ball game. What I meant to say is that,
within the Center of Drug Evaluation and Research (CDER) the Office of
Biostatistics is willing to look into whether or not reviewers can download
R onto their government issued PC's. And this must all be approved by the
Office of Information and Technology. So admittedly, this is only a small
step, but nonetheless it is a step in the right direction.

I apologize for any confusion. Cheers,

Mat

Disclaimer which I also forgot in the original post: The following views are
those of the writer and do not necessarily reflect those of the FDA.



 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Duncan Murdoch
 Sent: Thursday, November 03, 2005 6:30 AM
 To: Soukup, Mat
 Cc: 'r-help@stat.math.ethz.ch'
 Subject: Re: [R] Potential for R to conflict with other softwares
 
 On 11/3/2005 9:11 AM, Soukup, Mat wrote:
  Hi.
  
  After some time, my collegues at the Food and Drug 
 Adminstration have
  finally acknowledged R as a powerful statistical computing 
 environment.
  However, in order to comply with the Office of Information 
 and Technology
  standards there are a couple of questions about whether R 
 could interfere
  with other software. As I'm more of a driver of the R 
 software and not a
  mechanic, I was hoping for the insight of the many great 
 useRs. Below is a
  list of 5 proposed questions to which I value any comment.
  
  Thank you for your time,
  
  -Mat
  
  
 
 These answers are about the Windows version only, but from the 
 questions, I think that's what you were looking for.  They 
 apply to all 
 versions since 1.6.x at least (though the earlier ones would have put 
 fewer entries into the registry, they put them in the same places).
 
  1. Does R have high resolution graphics?
 
 Yes, but I don't think I get the point of this question.  How 
 would that 
 interfere with other software?
  
  2. Does R have .dll files, or other executables which are 
 not located in the
  R software directory tree?
 
 No, it installs everything below R_HOME.
  
  3. Does R modify the Windows registry in a non-obvious way, 
 i.e. other than
  defining itself and what extensions to associate with R, 
 and what are those
  extensions?
 
 I think all of its modifications would count as obvious.  They are 
 mainly below HKLM/Software/R-core or HKCU/Software/R-core (where the 
 file locations are recorded); additionally file associations 
 are set up 
 for .Rdata files (which are called RWorkspace files there), and an 
 uninstall entry is made.
  
  4. Does R add macros to any part of MS Office?
 
 No.
  
  5. Can you anticipate any other way in which installing and 
 using R could
  disrupt the operation of another software?
 
 No, not really.  Maybe users will become addicted to it?  ;-)
 
 Duncan Murdoch
   
  
  
 **
 *
  Mat Soukup, Ph.D.
  Food and Drug Administration
  10903 New Hampshire Ave. 
  BLDG 22 RM 5329
  Silver Spring, MD 20993-0002
  Phone: 301.796.1005
  
 **
 *
  
  
  [[alternative HTML version deleted]]
  
  __
  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-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-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