Displaying 3 results from an estimated 3 matches for "nstrat".
Did you mean:
nstat
2009 Dec 11
1
shared axes in multipanel plot
...it manually for this example;
How are pannels referred to, in a layout context?
That is, how do I say,
if(current.pannel==4) {do stuff}
Here's a simple version of the code.
baseline <- (1:20)/20 #example data
dat1 <- matrix(baseline,20,8)
dat <- dat1+matrix(rnorm(20*8)/30, 20,8)
nstrat <- ncol(dat)
rows <- ceiling(nstrat/4)
layout(matrix(1:(rows*2), rows, 2, T))
par(oma=c(4,4,3,1))
par(mar=c(1,1,0,1))
for(i in which(1:nstrat%%2!=0)){
plot(baseline, type="l", col="grey", lwd=2,
xlab="", ylab="", ylim=c(0,1), xaxt='n...
2003 Jan 14
1
How to change the label position in axis() ?
Dear R People,
I'm working on a plot function to produce the graph shown below. One of
the features my supervisor does not like is that the labels in the Y-
axix are shown vertically. Is there a way to change that to horizontally
?
This is the axix() function I used :
axis(2,at=seq(nstrat),labels=snames)
The labels (snames) are: SEV1:HU:C, SEV1:MU:C, SEV1:MU:L, SEV1:RT:C
and SEV1:RT:L, due to space limitation just 3 of the labels are shown in
the axix.
In Splus, I believe the labels are shown horizontally be default. What
we want is to show them horizontally in R too. Is there a w...
2011 Mar 07
0
survest() for cph() in Design package
...imate the survival for stratum age 50-69 (rstime2=2), so I
used the following, this is where I got the error message:
> survest(fit, expand.grid(cr500=c(0,1),smoke25=c(0,1),rstime2=2, logw=0),
>times=unique(uminers$rstime[uminers$rstime2=='2']), conf.int=.95)
Error in factor(rep(1:nstrat, scount), labels = names(fit$strata)) :
invalid labels; length 3 should be 1 or 2
Anyone has any suggestions what went wrong?
Thanks!
John
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: uminers.txt
URL: <https://stat.ethz.ch/...