Displaying 20 results from an estimated 4000 matches similar to: "confidence interval"
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
2012 Sep 20
1
validate.lrm - confidence interval for boostrap-corrected AUC ?
Hi
Does anyone know whether the rms package provides a confidence interval for
the bootstrap-corrected Dxy or c-index?
I have fitted a logistic model, and would like to obtain the 95% confidence
interval of the bootstrap-corrected area under the ROC curve estimate.
Thanks.
[[alternative HTML version deleted]]
2010 Jan 22
2
Computing Confidence Intervals for AUC in ROCR Package
Dear R-philes,
I am plotting ROC curves for several cross-validation runs of a
classifier (using the function below). In addition to the average
AUC, I am interested in obtaining a confidence interval for the
average AUC. Is there a straightforward way to do this via the ROCR
package?
plot_roc_curve <- function(roc.dat, plt.title) {
#print(str(vowel.ROC))
pred <-
2010 Jul 12
2
findInterval and data resolution
Hello Wise Ones...
I need a clever way around a problem with findInterval. Consider:
vec1 <- 1:10
vec2 <- seq(1, 10, by = 0.1)
x1 <- c(2:3)
a1 <- findInterval(x1, vec1); a1 # example 1
a2 <- findInterval(x1, vec2); a2 # example 2
In the problem I'm working on, vec* may be either integer or numeric, like
vec1 and vec2. I need to remove one or more sections of this vector;
2011 May 05
1
Confidence interval for difference in Harrell's c statistics (or equivalently Somers' D statistics)
Dear All,
I am trying to calculate a 95% confidence interval for the difference in two
c statistics (or equivalently D statistics). In Stata I gather that this
can be done using the lincom command. Is there anything similar in R?
As you can see below I have two datasets (that are actually two independent
subsets of the same data) and the respective c statistics for the variables
in both cases.
2011 Sep 14
0
Confidence interval or p-value for difference in two c-statistics
Dear All,
Apologies if you have a seen a question like this from me before. I am hoping that if I re-word my question more carefully someone may be able to offer more help than the last time I asked something similar. I am using R 2.9.2 and Windows XP.
I am trying to determine if there is a statistically significant difference between two c-statistics (or equivalently D statistics). In Stata
2010 Jul 27
6
Eval() or parse() do not work inside function
I am writing a function where the arguments are names of objects or variable
names in a data frame. To convert the strings to the objects I am using
eval(parse(text=name)):
f.graph.two.vbs<-function(dataname,v1){
val<-paste(dataname,v1,sep="$")
val<-eval(parse(text=val))
val
}
However running this returns an error:
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 Nov 11
1
Formula variable help
I have an R script with the following applicable lines:
xshort <- window(s, start=st, end=ed)
. . .
xshort <- ts(xshort, frequency=1, start=1)
. . .
m1 <- m2 <- m3 <- m4 <- m5 <- m6 <- NULL
m1 <- tslm(xshort ~ trend)
I get an error:
Error in get(dataname) : object 'xshort' not found
When I do traceback() I get:
3: get(dataname)
2: tslm(xshort ~
2011 Sep 20
1
Data
Hey everybody,
i am using the rugarch-package and its great!
I have a pretty easy problem, but i just dont get it, so thanks if you can
help me.
Normally i use:
/
data(DATANAME)
spec = ugarchspec()
fit = ugarchfit(data = x[,1], spec = spec)
fit
slotNames(fit)
names(fit at fit)
coef(fit)
infocriteria(fit)
likelihood(fit)
nyblom(fit)
signbias(fit)
head(as.data.frame(fit))
head(sigma(fit))
2000 May 02
2
Variable names in model formula
At 10:37 PM 5/1/00 -0400, E. S. Venkatraman wrote:
>I have the following problem. I have survival data (time, status) along
>with several covariates (X1, X2,..., Xn). I want to fit a Cox model for
>each of the covariate (univariately) and obtain the fitted probability of
>survival at a fixed time point t0 and covariate value Xi0. I tried to do
>this in a for loop where the index
2010 Apr 29
1
2D look up (within interval)
Hi,
I have a matrix of X and Y coordinates, and one pair of coordinates that I
need to know it corresponds (or is closest) to which row in the matrix. For
example:
MC<- cbind(rep(1:1000,each=1000),rep(1:1000,1000));
p<-c(543.1,440.05);
I know that if you do which.min you'll get the answer, which will be row #
542440, but which.min is slow and this process needs to be repeated a lot.
I
2009 Oct 08
3
error message - unexpected input
I have been using R the past couple of years to run models on data we
are collecting. I recently got a new computer and updated to a new
version of R (2.60 -> 2.90). Since the update, I cannot get my syntax to
run. I have tried copying the file it is looking for into many different
directories to try and run it. In the last version, I found that it was
easiest if the file was copied into the R
2008 Jul 29
4
Graphics function question
Hello
I have created a graph using the following commands:
<<<
startBReP3O1T <- diffs$BReP3O1T - diffs$diff_BReP3O1T
endBReP3O1T <- diffs$BReP3O1T
x <- seq(47,89, length = 10)
ymin <- min(min(startBReP3O1T), min(endBReP3O1T))
ymax <- max(max(startBReP3O1T), max(endBReP3O1T))
y <- seq(ymin, ymax, length = 10)
plot(x,y, type = 'n', xlab = 'Age', ylab =
2017 Dec 04
3
Dynamic reference, right-hand side of function
Hi R-users!
Being new to R, and a fairly advanced Stata-user, I guess part of my problem is that my mindset (and probably my language as well) is wrong. Anyway, I have what I guess is a rather simple problem, that I now without success spent days trying to solve.
I have a bunch of datasets imported from Stata that is labelled aa_2000 aa_2001 aa_2002, etc. Each dataset is imported as a matrix, and
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
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
2005 Feb 18
4
barplot and ylim - display problems
The following single line of code shows what I am trying to do, and the
problem I am having...
barplot(c(101,102,103),ylim=c(100,103))
The 'xaxis' is missing, and the grey bars 'fall off' the plot area. This
is generally ugly, and I would like to trim the bars (ideally they would
have a ragged appearance to show that I am 'zooming in').
I can see why what I am trying to
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