Displaying 9 results from an estimated 9 matches for "ord1".
Did you mean:
ord
2010 Mar 02
0
plotting fitted lme values as a smooth line
..., it is jagged and not smooth.
Here is the code I used:
lme.1<-lme(fixed=LnFlux~Temp, random=~1|Plt, data=resp)
fit.1<-exp(fitted(lme.1))
plot(Flux$Temp, Flux$Flux, xlab="Temperature",
ylab=expression("CO"[2]*"Flux"), xlim=c(-10, 25), ylim=c(0,250), pch=16)
ord1<-order(CFlux$Temp)
lines(CFlux$TempC[ord1], fit.1[ord1], lty=1, lwd=2)
This does not produce a straight line, but a jagged one that moves up
and down between points.
If I use fitted values from a simple linear model (lm), I don't have
this problem, and the line is smooth:
lm.1<-lm(...
2010 Sep 08
4
coxph and ordinal variables?
Dear R-help members,
Apologies - I am posting on behalf of a colleague, who is a little puzzled
as STATA and R seem to be yielding different survival estimates for the same
dataset when treating a variable as ordinal. Ordered() is used to represent
an ordinal variable) I understand that R's coxph (by default) uses the Efron
approximation, whereas STATA uses (by default) the Breslow. but we
2003 Jun 07
2
Ordering long vectors
I need to order a long vector of integers with rather few unique values.
This is very slow:
> x <- sample(rep(c(1:10), 50000))
> system.time(ord <- order(x))
[1] 189.18 0.09 190.48 0.00 0.00
But with no ties
> y <- sample(500000)
> system.time(ord1 <- order(y))
[1] 1.18 0.00 1.18 0.00 0.00
it is very fast!
This gave me the following idea: Since I don't care about keeping the
order within tied values, why not add some small disturbance to x,
and indeed,
> unix.time(ord2 <- order(x + runif(length(x), -0.1, 0.1)))
[1] 1.66 0.00...
2006 Mar 28
0
Help with the code
...n(dataname) { cox =coef(coxph(Surv(dataname$time,dataname$status) ~ dataname$trt+factor(dataname$site))) #cox=cox[1] } dataname=data1 ## Calculate Cox's regression coefficients' standard error and bias using the ## ordinary Bootstrap # set.seed(1234)#set the random start cox.ord1 = censboot(data=dataname,statistic=beta.fun1,R=r,F.surv=model1.surv, cox=model1.cox,sim="ordinary") cox.ord1 cox.ord2 = censboot(data=dataname,statistic=beta.fun2,R=r,F.surv=model2.surv, cox=model2.cox,sim="ordinary") cox.ord2 join=list(model1, model2) #return(...
2010 Aug 24
2
Attempted SIP connection by foreign host. Help!
...[64.125.29.49]
16 323 ms 341 ms 295 ms xe-0-2-0.cr1.ord2.us.above.net [64.125.27.169]
17 307 ms 292 ms 293 ms xe-1-1-0.er1.ord7.above.net [64.125.26.250]
18 314 ms 308 ms 314 ms 64.124.65.218.allocated.above.net [64.124.65.218]
19 321 ms 315 ms 438 ms core1-ed2-edge3.ord1.rackspace.net [173.203.0.109]
20 310 ms 302 ms 294 ms core1-aggr301a-2.ord1.rackspace.net [173.203.0.173]
21 288 ms 296 ms 302 ms 184-106-217-112.static.cloud-ips.com [184.106.217.112]
Trace complete.
Thanks Shaun
-------------- next part --------------
An HTML attachment was scr...
2006 Mar 06
3
Interleaving elements of two vectors?
Suppose one has
x <- c(1, 2, 7, 9, 14)
y <- c(71, 72, 77)
How would one write an R function which alternates between elements of
one vector and the next? In other words, one wants
z <- c(x[1], y[1], x[2], y[2], x[3], y[3], x[4], y[4], x[5], y[5])
I couldn't think of a clever and general way to write this. I am aware
of gdata::interleave() but it deals
2013 Jun 22
1
metaMDS Error, Nan similar or negative values
...0 0 0 0 0 0
0 0 0 0 96 0
D30M1A 60 0 0 0 0 0 0
0 0 0 74 0 169
When I tried to perform metaMDS, it was not working, with the error
> ord1 <- metaMDS(
X
="bray")
Square root transformation
Wisconsin double standardization
Error in if (any(dist < -sqrt(.Machine$double.eps))) warning("some
dissimilarities are negative -- is this intentional?") :
missing value where TRUE/FALSE needed
In addition: Warning messa...
2015 Feb 09
2
Samba4 - Corrupted group caused stop of replication - "Object class violation"
...quoted-printable
> From: Ed Russell <erussell at ifbqsr.com>
> Precedence:
list
> MIME-Version: 1.0
> To: "samba at lists.samba.org"
<samba at lists.samba.org>
> Date: Sun, 8 Feb 2015 04:19:23 +0000
>
Message-ID:
<ec63c0059ff74204ad5b180d35fd2d50 at MBX04C-ORD1.mex06.mlsrvr.com>
>
Content-Type: text/plain; charset="iso-8859-1"
> Subject: [Samba] Hide
lost+found
> Message: 3
>
> For some reason adding:
>
> hide files =3D
/lost+found/
>
> In either my global section or share section does not
hide lost+found.=A0 I=...
2006 Mar 08
0
survival
...s of two vectors?
To: ajayshah at mayin.org
Cc: r-help <R-help at stat.math.ethz.ch>
Message-ID:
<8d5a36350603070538k42884d53k8c4ff23242c1d51f at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
For a general solution without warnings try
interleave <- function(v1,v2)
{
ord1 <- 2*(1:length(v1))-1
ord2 <- 2*(1:length(v2))
c(v1,v2)[order(c(ord1,ord2))]
}
interleave(rep(1,5),rep(3,8))
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Gabor
> Grothendieck
> Sent: Monda...