Ah . . . the hammer analogy. In a conversation like this it's not a
question of will somebody drop it, it's when will it be dropped.
--Matt
Matt Austin
Statistician
Amgen, Inc.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Greg Snow
Sent:
When plotting using the cex.axis argument to boxplot(), the size of the
plotting symbols beyond the whiskers of the boxplot are being changes.
Example:
par(mfrow=c(2,1))
boxplot(c(rnorm(10), 10), horizontal=TRUE, main=Test, las=2, cex.axis=2)
boxplot(c(rnorm(10), 10), horizontal=TRUE,
03
svn rev39566
language R
version.string R version 2.4.0 (2006-10-03)
--Matt
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Austin, Matt
Sent: Saturday
I couldn't help but respond to this one, it's not often I see my own name.
Using data from the survival library:
library(survival)
lung[1:10, c('time', 'status')]
Surv(lung$time, lung$status)[1:10]
--Matt
Matt Austin
Statistician
Amgen, Inc
800 9AMGEN9 x77431
805-447-7431
-Original
I don't use SPSS, so I can't help with the details. That being said, have
you looked at the foreign package?
--Matt
Matt Austin
Statistician
Amgen, Inc
800 9AMGEN9 x77431
805-447-7431
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of David Kaplan
Sent:
You need to pass it as a vector and then you can convert to an array
structure in C. Look at carray.c for one way to do this, there are others.
Browse the source code and see how different authors handle your problem.
Matt Austin
Statistician
Amgen, Inc
800 9AMGEN9 x77431
805-447-7431
Using traditional graphics you probably want to look at
?lines, ?points, ?text . . .
These allow you to add to your plot without calling new axes.
For custom axes:
plot(1:10, 1:10, axes=FALSE)
lines(1:10, 10:1)
points(1:10, runif(10, 2, 5), col=1, pch=21, bg=3, cex=3)
axis(1, at=1:10)
axis(3,
Something like this.
See ?formatC, ?paste
for (i in 1:100)
{
system(paste(C:\\Progra~1\\DOSPROGRAM\\RUN.exe input,
formatC(i, digits=2, flag='0'),
'.dat',
sep=''))
}
--Matt
Statistician
Amgen, Inc
-Original Message-
From:
Try using the panel.plsmo function in Dr. Harrell's Hmisc package.
xyplot(AWGT ~ lipid, groups = var_name, panel=panel.plsmo)
--Matt
Matt Austin
Statistician
Amgen, Inc.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Dean Sonneborn
Sent: Wednesday,
Phil,
Does the following do what you want?
plot(RecfS,
ylab = 'Temperature (deg C)',
xlab = 'Year',
main = 'Average air temperature (deg C) at Recife, Brazil, in
successive months from 1953 to 1962',
adj = 0.5,
axes=FALSE)
axis(1, at=1952:1962, label=paste(Jan, 52:62),
Check your syntax on the bwplot call.
fa - data.frame(doz=sample(500:2000, size=500), fabp2=rep(1:20, 25))
bwplot(factor(fabp2) ~ doz, data=fa, panel=panel.bpplot)
fa.sum - summarize( fa$doz, list( fabp2 = fa$fabp2), smean.sd,
stat.name=doz)
Dotplot( factor(fabp2) ~ Cbind(doz, doz - SD, doz
I believe this is a FAQ.
Examine:
format((5.05-floor(5))*100, nsmall=16)
[1] 4.9822
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Werner Bier
Sent: Tuesday, November 29, 2005 3:35 PM
To: r-help@stat.math.ethz.ch
Subject: [R] floor()
Try
library(grid)
xyplot(y~x,data.frame(x=1:10,y=runif(10)), ylab=textGrob(label=my label,
rot=0))
Note in the ?xyplot the xlab/ylab section points to the 'main' parameter
where it defines that a list can be used, however string rotation parameters
are not in the list. The helpfile notes that a
In the helpfile, look at the ymin argument to the plot method for survfit.
--Matt
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Zhaojing Gong
Sent: Sunday, November 20, 2005 6:47 PM
To: R-help@stat.math.ethz.ch
Cc: Zhaojing Gong
Subject: [R] On
Warning: non-expert thoughts to follow.
When passing an object to a predict method, the method looks at (a copy) of
the original information from the dataframe that was used in the fit. Your
original data contains information on trt1 and trt2, but factor(trt1) and
factor(trt2) cannot be found
If sas isn't in the path, then you might have trouble with sas.get or
read.ssd.
Assuming you are using windows, go to the Start menu, select run and type
sas. If sas fires up it's in your path, if not then that is the reason.
--Matt
-Original Message-
From: [EMAIL PROTECTED]
Haven't checked it too carefully, but how about:
bwplot(treatment~foo|group, data = dat,
panel=function(x,y,...) {
panel.violin(x,y, ..., col = transparent, varwidth = F)
gt0 - table( x 0, y)
panel.abline(v=0, lty = dotted)
The apply function is passing each row of you matrix as a single vector into
paste. If paste receives a single vector and collapse is NULL, it will
simply coerce the vector into a character vector.
However, when you collapse instead of sep
test - matrix( as.character(1:4), 2)
apply(test, 1,
The behavior is actually documented in the var() help file (?var), although
it's not clear that this would be the behavior if you just read ?sd. sd()
does call var if you look at the code, so the behavior should not be
unexpected.
--Matt
-Original Message-
From: [EMAIL PROTECTED]
If you left the type argument to the predict method then your predictions
are on the log-odds scale. Try using the type='response' in the predict
method for glm.
--Matt
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Rohit Singh
Sent: Monday, October
Have you looked at xYplot and panel.xYplot from Dr. Harrell's Hmisc package?
--Matt
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Mario
Aigner-Torres
Sent: Thursday, October 20, 2005 9:52 AM
To: Berton Gunter; r-help@stat.math.ethz.ch
Subject: Re:
.Platform$OS.type
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Omar Lakkis
Sent: Tuesday, September 13, 2005 11:30 AM
To: r-help@stat.math.ethz.ch
Subject: [R] what OS
How can I determine whT OS I am running under?
if WINDOWS do this
if
The book is out--I received mine a few weeks ago. It is very useful.
--Matt
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Chris
Buddenhagen
Sent: Friday, September 09, 2005 6:30 AM
To: r-help@stat.math.ethz.ch
Subject: Re: [R] Plot of multiple
If you used all 28 animals to find the model out of a group of candidate
models, I would have my reservations about this 'validation'. Any
confidence intervals you get from the final model are bound to be overly
optimistic because you haven't accounted for the degrees of freedom chewed
up during
dat1 - data.frame(var1=c(140, 151, 167), var2=c(30.1, 11.4, 40))
dat2 - data.frame(var1=c(140, 167), var3=c(5.7, 30.3))
merge(dat1, dat2, all=TRUE)
var1 var2 var3
1 140 30.1 5.7
2 151 11.4 NA
3 167 40.0 30.3
Matt Austin
Statistician
Amgen
One Amgen Center Drive
M/S 24-2-C
Thousand
Here are two possibilities, but neither tests simultaneously--others may
have those suggestions.
1. If one of the variables in clinically more important than the other,
consider a stepdown procedure where the more important is tested first, then
if the first is successful the second is tested.
If i is 1:20, there are no column names. Make sure you are indexing the
names from your your dataframe.
xx - data.frame(a=c(1:10), b = letters[1:10])
colnames(xx)
[1] a b
for(i in 1:2) print(colnames(xx)[i])
[1] a
[1] b
for(i in colnames(xx)) print(i)
[1] a
[1] b
Matt Austin
Statistician
Have you looked at the times argument to the summary method?
--Matt
Matt Austin
Statistician
Amgen
One Amgen Center Drive
M/S 24-2-C
Thousand Oaks CA 93021
(805) 447 - 7431
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of array chip
Sent: Friday,
Is it the PBIB dataset in the SASmixed package? I don't have my copy of the
text at home.
--Matt
library(SASmixed)
Loading required package: lme4
Attaching package 'lme4':
The following object(s) are masked from package:nlme :
Alfalfa Assay bdf BodyWeight Cefamandole
One point that is missing in this discussion is ease of review by the
statistician at the FDA. As a statistician in clinical trials, you want to
make it as easy as possible for your colleague at the FDA to do their job,
so you put the programs in a format that they are more likely to find
useful.
You can use the summary method for a survfit object from the package
survival as in the following example:
library(survival)
summary( survfit( Surv(futime, fustat)~rx,data=ovarian), times=500)
Call: survfit(formula = Surv(futime, fustat) ~ rx, data = ovarian)
rx=1
time
wireframe() is available in the package lattice.
--Matt
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED]
Sent: Thursday, November 25, 2004 20:36 PM
To: [EMAIL PROTECTED]
Subject: [R] Response Surface
Hi. I'm a student at Simon
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, November 24, 2004 16:37 PM
To: R Help Mailing List
Subject: RE: [R] scatterplot of 10 points and pdf file format
On 24-Nov-04 Prof Brian Ripley wrote:
On
The lme method for anova() checks the inheritance of the object when a
single object is supplied, which is why there is no error when you use one
object at a time. When two objects are supplied, the method uses the class
of the object by invoking the data.class function (which does not list
The following works, you need to include x=TRUE in the call to coxph.
Passing the time and status variables as additional arguments is a matter of
personal preference.
f.coxph.zph-function(x, timeVar, statusVar)
{
cox.fit - coxph(Surv(timeVar, statusVar) ~ x, na.action =
na.exclude,
I don't get the same result, do you have a package loaded that would change
the default behavior (such as Hmisc)?
list(grp.1)
[[1]]
[1] 1 2
Levels: 1 2
list(grp.1[mask])
[[1]]
[1] 1
Levels: 1 2
library(Hmisc)
snip
list(grp.1[mask])
[[1]]
[1] 1
Levels: 1
--Matt
version
_
?diff
--Matt
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of s viswanath
Sent: Friday, October 29, 2004 7:22 AM
To: [EMAIL PROTECTED]
Subject: [R] lag variable addition to data frame question
Hi,
I was wondering if there is a more efficient way of
You could replace your last two lines with the following. You'll need to
play with the axes labeling to make it pretty.
scaled.c - scale(c)
par(new=TRUE)
plot(scaled.c, ylim=c(-5, 5), xaxt=n, yaxt=n, col='green', type='l',
xlab=, ylab=)
axis (4,
labels=round(seq(-2, 2, .25)*attr(scaled.c,
The following should work, note I made x.name a factor.
x - data.frame(main.name=AAA,
x.name=factor(rep(c(Apply,Watermelon,Lemon,Banana,
Grape,Pineapply,Cherry,Peach,Orange,Mango,Strawberry),each=5))
,
y.name=(1:55))
plot(x$x.name, x$y.name, axes=FALSE)
I would return the values from the various tests in a list. If you only want
them to print and not for use in other parts of your program you could
explicitly print each test using print().
root - function(var)
{
#---Phillips-Perron
test1 - PP.test(var, lshort = TRUE)
test2 - PP.test(var,
I like Kjetil's suggestion of a shrinkage estimator. Perhaps this would be
a good time to experiment with Trevor Hastie's 'lars' package.
If you have a lot of correlated inputs I might suggest using Andy Liaw's
randomforest package. I have found this technique to be very valuable in
this
Could you just use
lines(newX, myPred, col=2)
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Paul Johnson
Sent: Thursday, September 23, 2004 10:3 AM
To: r help
Subject: followup: Re: [R] Issue with predict() for glm models
I have a follow up question
You may need to supply some additional information about your setup.
What operating system and version are you using?
How are you connecting to the internet?
Can you download packages from other sources (such as CRAN)?
Exactly what procedure are you using to download the packages?
Have you
My mistake, you can't use the structure I proposed with lm() in combination
with step().
If what was suggested earlier by Gabor was not what you wanted, and instead
you want the 'best' three variable model, then it may be easier to use the
leaps package.
library(leaps)
x -
The following example should get you started.
library(survival)
test1 - list(time= c(4, 3,1,1,2,2,3),
status=c(1,NA,1,0,1,1,0),
x= c(0, 2,1,1,1,0,0),
sex= c(0, 0,0,0,1,1,1))
cpfit - coxph( Surv(time, status) ~ x + strata(sex), test1)
You need to use a device to print to such as
postscript(file=/where/to/put/file/filename.ps)
##your plotting code here
dev.off()
Writing a plot at each iteration of your simulation can impact the runtime
greatly.
Please read the posting guide at the bottom of the e-mail, it can help
Of Austin, Matt
Sent: Monday, August 30, 2004 18:56 PM
To: 'Loke Chok Kang'; [EMAIL PROTECTED]
Subject: RE: [R] (no subject)
You need to use a device to print to such as
postscript(file=/where/to/put/file/filename.ps)
##your plotting code here
dev.off()
Writing a plot at each iteration
Note that split() creates a list with each component named by the year.
When you use the sapply function the names are retained in the attribute
names, you can print this out to see or use str() or look at the output
from the attribute() function.
Your division also maintains the names and then
You could keep a row index vector like in the following example.
data(iris)
indx - sample(nrow(iris), 20, replace=FALSE)
train - iris[indx,]
test - iris[-indx,]
--Matt
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Peyuco Porras
Porras .
Sent:
.class1 is an 'internal' method in the namespace of the package 'methods'.
It can be accessed with the ::: operator. A good start for documentation
may be Vol 3/1 of R-News.
methods:::.class1
function (x)
class(x)[[1]]
environment: namespace:methods
--Matt
-Original Message-
From:
Lattice graphics may be the answer depending on your exact problem.
Here is an example of four traditional plots without space:
par(mfrow=c(2,2), omi=c(.5, .5, .5, .5))
par(mar=c(0, 2, 2, 0))
plot(rnorm(10), rnorm(10), axes=FALSE)
box(); axis(2); axis(3)
par(mar=c(0, 0, 2, 2))
Try factor(vec2) in your bwplot() call.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Ernesto Jardim
Sent: Friday, July 09, 2004 9:41 AM
To: Mailing List R
Subject: [R] Problem with bwplot
Hi,
I'm ploting some box-and-whisker plots with bwplot but I'm
Try something like
plot(x,y)
box.dat - boxplot(x=split(counts, dial), plot=FALSE)
bxp(box.dat, add=TRUE, at=c(-1, 0, 1), show.names=FALSE)
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Karla Meurk
Sent: Tuesday, June 29, 2004 21:46 PM
To: [EMAIL
Perhaps you could use the R2WinBugs package?
--Matt
-Original Message-
From: [EMAIL PROTECTED] [mailto:r-help-
[EMAIL PROTECTED] Behalf Of bang jeong sook
Sent: Thursday, May 20, 2004 19:9 PM
To: [EMAIL PROTECTED]
Subject: [R] function for running MS-DOS on R
I had downloaded the
You want to use instead of .
--Matt
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Svetlana Eden
Sent: Friday, February 27, 2004 7:57 AM
To: r-help
Subject: [R] question
Hi everybody.
The question:
I get two vectors 'iFalseFalse' and 'i2'.
I think they
55 matches
Mail list logo