Displaying 20 results from an estimated 7000 matches similar to: "Bug in printing symbolic derivative (PR#1697)"
2011 Jun 13
1
Somers Dyx
Hello R Community,
I'm continuing to work through logistic regression (thanks for all the help on score test) and have come up against a new opposition.
I'm trying to compute Somers Dyx as some suggest this is the preferred method to Somers Dxy (Demaris, 1992). I have searchered the [R] archieves to no avail for a function or code to compute Dyx (not Dxy). The overview of Hmisc has
2008 Mar 25
3
derivatives in R
Hi, I posted this message earlier in "Rmetrics" and I don't know whether I
posted in the wrong place, so I'm posting it again in Rhelp.
I have a function in x and y and let's call it f(x,y). I need to get the
Hessian matrix. i.e I need (d^2f/dx^2), (d^2f/dxdy), (d^2f/dydx),
(d^2f/dy^2).I can get these using the D function. now I need to evaluste the
hessian matrix for
2009 Sep 08
1
rcorrp.cens and U statistics
I have two alternative Cox models with C-statistics 0.72 and 0.78. My question is if 0.78 is significantly greater than 0.72. I'm using rcorrp.cens. I cannot find the U statistics in the output of the function. This is the output of the help example:
> x1 <- rnorm(400)
> x2 <- x1 + rnorm(400)
> d.time <- rexp(400) + (x1 - min(x1))
> cens <- runif(400,.5,2)
> death
2006 Jul 27
1
replace values in a distance matrix
Hi to everybody!
I´m just a beginner in R, and I´m trying to replace values in a distance matrix with a concret condition: replace all values (elements) lower than 4.5 with value=18.
I´ve tried this, but it doesn´t work...
Dxy would be my 117 x 117 euclidean distance matrix
M18 and M4.5 would be 117 x 117 matrices:
M18<-matrix(rep(18,13689),nrow=117)
2009 Jul 15
1
negative Somers D from Design package
Dear R help
My problem is very similar to the analysis detailed here.
If we use the mayo dataset provided with the survivalROC package the estimate for Somer's Dxy is very negative -0.56.
The Nagelkerke R2 is positive though 0.32.
I know there is a difference between explained variation and predictive ability but I am surprised there is usch a difference given that even a non predictive model
2011 Aug 19
1
help Dxy and C-index calculation
Dear professor,
I am currently using Design package and the cph formula for assessing
multivariable analysis.
I am tryng to get the C-index for my survival model based on Dxy
coefficient.
I am confused since there is a negative value.
Do I need to used the absolute Dxy ?
index.orig training test optimism index.corrected n
Dxy -0.341357727 -0.344002740
2011 Feb 21
2
Interpreting the example given by Prof Frank Harrell in {Design} validate.cph
Dear R-help,
I am having a problem with the interpretation of result from validate.cph in
the Design package.
My purpose is to fit a cox model and validate the Somer's Dxy. I used the
hypothetical data given in the help manual with modification to the cox
model fit. My research problem is very similar to this example.
This is the model without stratification:
> library(Design)
> f1
2005 Sep 02
1
C-index : typical values
I am doing some coxPH model fitting and would like to have some idea
about how good the fits are. Someone suggested to use Frank Harrell's
C-index measure.
As I understand it, a C-index > 0.5 indicates a useful model. I am
probably making an error here because I am getting values less than 0.5
on real datasets. Can someone tell me where I am going wrong please ?
Here is an example using
2007 Aug 27
2
validate (package Design): error message "subscript out of bounds"
Dear R users
I use Windows XP, R2.5.1 (I have read the posting guide, I have
contacted the package maintainer first, it is not homework).
In a research project on renal cell carcinoma we want to compute
Harrell's c index, with optimism correction, for a multivariate
Cox regression and also for some univariate Cox models.
For some of these univariate models I have encountered an error
2008 Aug 11
1
Unexpected parameter problem using rsaga.geoprocessor() {RSAGA}
Hello,
I discovered SAGA, an interesting free GIS, a few days ago and now, I
would like to use it from within R 2.6.2 using the RSAGA package. I read
the documentation for this package and thought that I understood it
correctly for trying to call some of the SAGA modules. For getting the
information on the usage of and arguments required by the SAGA command
line "Import Binary Raw
2011 Mar 01
1
which does the "S.D." returned by {Hmisc} rcorr.cens measure?
Dear R-help,
This is an example in the {Hmisc} manual under rcorr.cens function:
> set.seed(1)
> x <- round(rnorm(200))
> y <- rnorm(200)
> round(rcorr.cens(x, y, outx=F),4)
C Index Dxy S.D. n missing
uncensored Relevant Pairs Concordant Uncertain
0.4831 -0.0338 0.0462 200.0000
2009 May 13
1
Nagelkerkes R2N
Hello All,
as I?m new to R and survival analysis, I?ve got a question about the
Design::validate function:
My Code:
cox <- cph(Surv(t,status) ~ var1 + var2 + var3, data=data, x=TRUE, y=TRUE,
surv=TRUE)
cox.val <- validate(cox, B=10, dxy=TRUE, pr=TRUE);
My output (cox.val):
index.orig training test
Dxy -0.3639222921368090891
2010 Dec 09
1
error in lrm( )
Dear Sir or Madam?
I am a doctor of urology,and I am engaged in developing a nomogram of bladder cancer. May I ask for your help on below issue?
I set up a dataset which include 317 cases. I got the Binary Logistic Regression model by SPSS.And then I try to reconstruct the model
?lrm(RECU~Complication+T.Num+T.Grade+Year+TS)? by R-Project,and try to internal validate the model through
2009 Jul 17
1
c-index validation from Design library
Hi Group,
I have a question about obtaining the bias-corrected c-index using
validate from the Design library.
As an example, consider the example from help page:
library(Design)
?validate.lrm
n <- 1000
age <- rnorm(n, 50, 10)
blood.pressure <- rnorm(n, 120, 15)
cholesterol <- rnorm(n, 200, 25)
sex <- factor(sample(c('female','male'),
2011 May 22
1
How to calculate confidence interval of C statistic by rcorr.cens
Hi,
I'm trying to calculate 95% confidence interval of C statistic of
logistic regression model using rcorr.cens in rms package. I wrote a
brief function for this purpose as the followings;
CstatisticCI <- function(x) # x is object of rcorr.cens.
{
se <- x["S.D."]/sqrt(x["n"])
Low95 <- x["C Index"] - 1.96*se
Upper95 <- x["C
2006 Jan 04
1
silly, extracting the value of "C" from the results of somers2
Sorry I have a very simple question:
I used somers2 function from Design package:
> z<- somers2(x,y, weights=w)
results are:
>z
C Dxy n Missing
0.88 0.76 500 0.00
Now I want to call only the value of C to be used in further analyses, but I
fail to do it. I have tried:
> z$C
NULL
> z[,C]
Error in z[,C]: incorrect number of dimensions
and some other silly
2008 Mar 05
0
[PATCH] ioemu: fix SDL mouse events processing
ioemu: fix SDL mouse events processing
- GetRelativeMouseState always returns the last position, so when the
polling loop gets several mouse events in one go, we would send
useless ''no move'' events.
- So as to make sure we don''t miss any mouse click / double click, we
should not use GetRelativeMouseState() to get the button state, but
keep records of the button
2008 Apr 13
0
How to fill out some columns? (Solved)
Thank you so much to Mark and Gabor for their codes (please see below). Now
I solved my problem : )
Best,
Jorge
# --------- Mark's code
res=sapply(colnames(dx), function(.colname) {
if (.colname %in% colnames(dy)) dy[,.colname]
else {numeric(nrow(dy))}
})
res
# --------- Gabor's code
res=as.matrix(replace(as.data.frame(0 * dx), colnames(dy), dy))
# If dx were a data frame
2011 Aug 11
1
Splitting data
I want to implement the following algorithm in R:
I want to split my data, use a t test to compare both means of the groups to see if they significantly differ from each other. If this is a yes (p < alpha) I want to split again (into 4 groups) and do the same procedure twice, and stop otherwise (here the problem arises). As a final result I would have different groups of data.
I made some
2002 Mar 21
1
legend - bug with argument angle (PR#1404)
When legend() is used with the angle argument as follows, not only the
boxes beside the legend text, but also the whole legend box is filled
with shading lines.
I think this is not intended:
plot(1:10)
legend(8, 4, c("A", "B"), angle=c(10, 80), fill=NULL, density=20)
I'd suggest as a fix (legend.R of R-1.5.0):
25c25
< rect2 <- function(left, top, dx, dy,