Displaying 20 results from an estimated 43 matches for "crp".
Did you mean:
cr4
2010 Jul 05
1
Linux-Windows problem
Dear All,
I faced the following problem. With the same data.frame the results are
different under Linux and Windows.
Could you help on this topic?
Thanks in advance,
Ildiko
Linux:
> d = read.csv("CRP.csv")
> d$drugCode = as.numeric(d$drug)
> cor(d, use="pairwise.complete.obs")
PATIENT BL.CRP X24HR.CRP X48HR.CRP drug drugCode
PATIENT NA NA NA NA NA NA
BL.CRP NA 1.0000000 0.84324880 -0.05699590 NA -...
2018 Apr 25
0
Zero errors : Bug in my R code ?
....packages("DMwR")
library(robustbase)
library(MASS)
library(quantreg)
library(RobPer)
library(hbrfit)
library("devtools")
library("DMwR")
bmi=c(23,43,12,1,23,4,3,4,5,5,6,5,5,34,67,87,32,12,23,19)
glucose=c(98,34,21,13,2,43,16,43,28,93,11,14,16,43,23,65,42,16,54,32)
crp=c(56,34,42,32,1,2,54,47,67,65,38,95,45,76,67,87,35,41,34,54)
newdata=data.frame(bmi,glucose,crp)
?
reg1 <- lm( crp ~ bmi+glucose,data=newdata)
DMwR::regr.eval(newdata$crp,reg1$fitted.values)
reg <- lmrob( crp ~ bmi+glucose,data=newdata)
DMwR::regr.eval(newdata$crp,reg$fitted.values)
Huber &...
2018 May 21
2
Bootstrap and average median squared error
Dear R-experts,
I am trying to bootstrap (and average) the median squared error evaluation metric for a robust regression. I can't get it. What is going wrong ?
Here is the reproducible example.
#############################
install.packages( "quantreg" )
library(quantreg)
crp <-c(12,14,13,24,25,34,45,56,25,34,47,44,35,24,53,44,55,46,36,67)
bmi <-c(34,32,12,76,54,34,21,18,92,32,11,13,45,46,56,57,67,87,12,13)
glucose <-c(23,54,11,12,13,21,32,12,45,54,65,87,21,23,12,12,23,23,43,54)
# Create a list to store the results
lst<-list()
# Numbers of bootstrap sample...
2018 May 22
2
Bootstrap and average median squared error
...>
> If you want to bootstrap a statistic, I suggest you use base package boot.
> You would need the data in a data.frame, see how you could do it.
>
>
> library(boot)
>
> bootMedianSE <- function(data, indices){
> ??? d <- data[indices, ]
> ??? fit <- rq(crp ~ bmi + glucose, tau = 0.5, data = d)
> ??? ypred <- predict(fit)
> ??? y <- d$crp
> ??? median(y - ypred)^2
> }
>
> dat <- data.frame(crp, bmi, glucose)
> nboot <- 100
>
> medse <- boot(dat, bootMedianSE, R = nboot)
>
> medse$t0
> mean(medse...
2018 May 22
0
Bootstrap and average median squared error
Hello,
If you want to bootstrap a statistic, I suggest you use base package boot.
You would need the data in a data.frame, see how you could do it.
library(boot)
bootMedianSE <- function(data, indices){
d <- data[indices, ]
fit <- rq(crp ~ bmi + glucose, tau = 0.5, data = d)
ypred <- predict(fit)
y <- d$crp
median(y - ypred)^2
}
dat <- data.frame(crp, bmi, glucose)
nboot <- 100
medse <- boot(dat, bootMedianSE, R = nboot)
medse$t0
mean(medse$t) # This is the value you want
Hope this helps,
Rui...
2012 Jun 13
0
Plotted circle does not go through desired points - very long email with code
...a, x3b, xm, 100),
range(-100,y1a, y1b, y3a, y3b, ym, 100))
ln1 <- psp(x1a, y1a, x1b, y1b, window = win)
ln3 <- psp(x3a, y3a, x3b, y3b, window = win)
?
ppt <- crossing.psp(ln1, ln3)
?
# find the radius of the second circle that has center
at (ppt$x, ppt$y) and goes through B and H
r.crp <- sqrt((pt2$x-ppt$x)^2 + (pt2$y-ppt$y)^2)
r1.crp <- sqrt((xy$x[i]-ppt$x)^2 + (xy$y[i]-ppt$y)^2)
?
# r.crp should be equal with r1.crp ? but there are some
very little difference? but not enough in
my opinion that the second circle not go through points H and B.
> r.crp==r1.crp
[1] FA...
2018 May 22
1
Bootstrap and average median squared error
Hello,
Right!
I copied from the OP's question without thinking about it.
Corrected would be
bootMedianSE <- function(data, indices){
d <- data[indices, ]
fit <- rq(crp ~ bmi + glucose, tau = 0.5, data = d)
ypred <- predict(fit)
y <- d$crp
median((y - ypred)^2)
}
Sorry,
rui Barradas
On 5/22/2018 11:32 AM, Daniel Nordlund wrote:
> On 5/22/2018 2:32 AM, Rui Barradas wrote:
>> bootMedianSE <- function(data, indices){
>> ?????...
2017 Jul 28
3
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
...use I?m using longitudinal data?
Even more. Is it possible to colour each one of the 15 lines with a different colour?
library(ggplot2)
library(reshape)
library(lattice)
library(gtable)
library(grid)
attach(mtcars)
beta0 = rnorm (15, 1, .5)
beta1 = rnorm (15, -1, .5)
tempo = seq(1:5)
CRP7raw = matrix(NA, 15, 5)
CRP7 = matrix(NA, 15, 5)
CRP98raw = matrix(NA, 15, 5)
CRP98 = matrix(NA, 15, 5)
crp <- for (i in 1:15) {
CRP7raw[i,] = beta0[i] + beta1[i] * tempo
CRP7[i,] = CRP7raw[i,] + rnorm(5, 0, 2.14)
CRP98raw[i,] = beta0[i] + beta1[i] * tempo
CRP98[i,] = CRP98ra...
2018 May 22
0
Bootstrap and average median squared error
On 5/22/2018 2:32 AM, Rui Barradas wrote:
> bootMedianSE <- function(data, indices){
> ???? d <- data[indices, ]
> ???? fit <- rq(crp ~ bmi + glucose, tau = 0.5, data = d)
> ???? ypred <- predict(fit)
> ???? y <- d$crp
> ???? median(y - ypred)^2
> }
since the OP is looking for the "median squared error", shouldn't the
final line of the function be
median((y - ypred)^2)
Dan
--
Dan...
2000 Apr 27
1
plotting axes
Dear friends. I appreciate the help that plot.date is not yet fully
developed but beautiful and efficient as is anyway. I attach again an
example from a real patient and now the problem is how to represent a
chemical C-reactive protein (CRP) on the plot together with concentration
of vancomycin. CRP was 25-200 and vancomycin below about 20. I only could
get it about right by dividing CRP by 10 and the plot is informative as is
- but how could I make an axis for the CRP ? I've tried taking all axes
away (but dates are not taken...
2008 Jun 12
1
[7-STABLE] ping -s 4000 with ipsec panic
...) at /usr/src/sys/i386/i386/support.s:498 #8 0xc1f7267e
in ?? () #9 0x8fb82d87 in ?? ()
#10 0x361fe9de in ?? ()
#11 0x39402686 in ?? ()
#12 0x00000fa0 in ?? ()
#13 0xc29cf380 in ?? ()
#14 0xc2ea9654 in ?? ()
#15 0x00000000 in ?? ()
#16 0xd61a095c in ?? ()
#17 0xc0700746 in crypto_invoke (cap=0x8, crp=0xd61a0950,
hint=-1616994916) at cryptodev_if.h:53
Previous frame inner to this frame (corrupt stack?)
(kgdb)
-------------
Thansk, regards.
2017 Jul 31
2
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
> Hi Rosa
> something like
> plot(1,1, sub=expression(lambda^"2"))
> So with your example, do you want something like
> plot(c(1:5), CRP7raw[1,], type = "n", xlim=c(1,5), ylim=c(-10,5) ,
> xlab="Day in ICU",
> ylab="CRP (mg/dL)",
> sub = mtext(expression(lambda^2)))
OOps! Either plot( ..., sub = *)
or plot( ... ) ; mtext(*)
but not both!
> CRP7graph <- ap...
2009 Jul 20
0
No subject
...:19.90: [13507]: DELAY 70 ms
Nov 05 11:10:19.97: [13507]: <-- [9:AT+FTH=3\r]
Nov 05 11:10:20.02: [13507]: --> [7:CONNECT]
Nov 05 11:10:20.02: [13507]: <-- data [3]
Nov 05 11:10:20.02: [13507]: <-- data [2]
Nov 05 11:10:21.33: [13507]: --> [2:OK]
Nov 05 11:10:21.33: [13507]: SEND send CRP (command repeat)
Nov 05 11:10:21.34: [13507]: <-- [9:AT+FRH=3\r]
Nov 05 11:10:21.65: [13507]: --> [7:CONNECT]
Nov 05 11:10:26.26: [13507]: --> [2:OK]
Nov 05 11:10:26.26: [13507]: HDLC frame too short (0 bytes)
Nov 05 11:10:26.26: [13507]: DELAY 70 ms
Nov 05 11:10:26.33: [13507]: <-- [9:...
2017 Jul 31
0
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
Hi Rosa
something like
plot(1,1, sub=expression(lambda^"2"))
So with your example, do you want something like
plot(c(1:5), CRP7raw[1,], type = "n", xlim=c(1,5), ylim=c(-10,5) ,
xlab="Day in ICU",
ylab="CRP (mg/dL)",
sub = mtext(expression(lambda^2)))
CRP7graph <- apply(CRP7, 1, lines, col="gray")
Cheers
Petr
> -----Original Message-----
> From: R-help...
2017 Jul 31
4
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
...h different colours
>>
>>
>> > Hi Rosa > something like
>>
>> > plot(1,1, sub=expression(lambda^"2"))
>>
>> > So with your example, do you want something like
>>
>> > plot(c(1:5), CRP7raw[1,], type = "n", xlim=c(1,5),
>> ylim=c(-10,5) , > xlab="Day in ICU", > ylab="CRP
>> (mg/dL)", > sub = mtext(expression(lambda^2)))
>>
>> OOps! Either plot( ..., sub = *) or plot( ... ) ;
>> mtext(*)...
2009 Apr 17
1
ColorRamp different from ColorRampPalette
I try to use ColorRamp as ColorRampPalette (i.e. with the same gradient), but
it seems there is a nuance that I've missed.
pal.crp<-colorRampPalette( c("blue", "white", "red"), space = "rgb")
plot(rep(0,40),pch=16,col=pal.crp(40))
# is great
But, using the same gradient with colorRamp is giving erratic colors.
pal.cr<-colorRamp( c("blue", "white", "red&qu...
2017 Jul 31
0
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
...s and y-axis and
> colour different subjects in longitudinal data with different colours
>
>
> > Hi Rosa
> > something like
>
> > plot(1,1, sub=expression(lambda^"2"))
>
> > So with your example, do you want something like
>
> > plot(c(1:5), CRP7raw[1,], type = "n", xlim=c(1,5), ylim=c(-10,5) ,
> > xlab="Day in ICU",
> > ylab="CRP (mg/dL)",
> > sub = mtext(expression(lambda^2)))
>
> OOps! Either plot( ..., sub = *)
> or plot( ... ) ; mtext(*)
>
>...
2009 Nov 05
2
faxes received on mISDN
Hi,
My initial setup for receiving faxes worked as follows:
fax call arrives on ISDN BRI connected to a BOSCH PBX, signal sent to ALCATEL PBX via PRI QSIG then finally sent to ASTERISK via PRI EUROISDN. The Asterisk server then forwarded the call to a iaxmodem and HylaFax received the data. All worked fine.
Now I got rid of both BOSCH and ALCATEL in the "fax path" and it's as
2017 Jul 31
0
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
Hi, everyone,
Before everything, thanks. Lots of thanks ;)!!!!
I don?t think you understood everything I need to do.
I want to write t_i instead of "Day in ICU? [i subscript for t] and y_ij instead of "CRP (mg/dL)? [ij superscript for y]. The label of the axis? :(
Can you help me on that task?
Thanks!!!!!
Best,
Rosa Oliveira
> On 31 Jul 2017, at 10:28, Martin Maechler <maechler at stat.math.ethz.ch> wrote:
>
>>>>>> PIKAL Petr <petr.pikal at precheza.cz <ma...
2017 Aug 01
0
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
...y suggested
plot(c(1:5), type = "n",
xlab=expression("t"[i]),
ylab=expression("y"^ij))
mtext(expression(lambda^2))
which by my humble opinion is precisely what you wanted.
I want to write t_i instead of "Day in ICU? [i subscript for t] and y_ij instead of "CRP (mg/dL)? [ij superscript for y].
If it is not you need to express yourself more clearly. My crystal ball is broken.
Cheers
Petr
On 31 Jul 2017, at 13:44, PIKAL Petr <petr.pikal at precheza.cz<mailto:petr.pikal at precheza.cz>> wrote:
Hi
From: Rosa Oliveira [mailto:rosita21 at gmai...