search for: nry

Displaying 20 results from an estimated 39 matches for "nry".

Did you mean: nr
2012 May 16
1
Hmisc improveProb() and PredictABEL reclassification () function and continuous NRI
Dear Sirs. I am working with the R packages Hmisc and PredictABEL to make NRI estimates from my Cox models with and without a specific biomarker. According to Pencina et al (Statistics in Medicine 2010, DOI: 0.1002/sim.4085 ), a continuous/non-categorical NRI (NRI>0) is to be used when there are no obvious reason to categorize risk, such as the risk of future cardiovascular events in patients
2012 Nov 28
2
NRI or IDI for survival data - Hmisc package
Hi, I am trying to calculate net reclassification improvement (NRI) and Inegrated Discrimination Improvement (IDI) for a survival dataset to compare 2 risk models. It seems that the improveProb() in Hmisc package does this only for binary outcome, while rcorrp.cens() does take survival object, but doesn't output NRI or IDI. Can anyone suggest any other packages that can calculate NRI and IDI
2006 Aug 03
1
question about dll crashing R
...swer. If I put a loop inside foobar and run the main code routine more than 100 times, it crashes R. Or if I call .Call("foobar"....) seperately more than two tims it crashes R. For the most part I am doing matirx multiplies using EXP matrixprod (SEXP x , SEXP y ) { int nrx , ncx , nry , ncy , mode; SEXP xdims , ydims , ans ; char *transa = "N" , *transb = "N" ; double one = 1.0 , zero = 0.0 ; xdims = getAttrib (x , R_DimSymbol ) ; ydims = getAttrib (y , R_DimSymbol ) ; mode = REALSXP; nrx = INTEGER( xdims ) [ 0 ] ; ncx = INTEGER( xdims ) [ 1 ] ; nry = INTEGER...
2013 Apr 25
1
lsfit: Error in formatting error message
...ng lsfit with more observations than variables, which seems to come from an error in the formatting of the error message (note that this was not happening in 2.15.3): > nobs <- 5; nvar <- 6; lsfit(matrix(runif(nobs*nvar), ncol=nvar), runif(nobs), intercept=FALSE) Error in sprintf(ngettext(nry, "%d response", "%d responses"), ", ", ngettext(ncx, : invalid format '%d'; use format %s for character objects > traceback() 3: sprintf(ngettext(nry, "%d response", "%d responses"), ", ", ngettext(ncx, "but only...
2019 Apr 05
2
patch to improve matrix conformability error message
...-) diff --git a/src/main/array.c b/src/main/array.c index 4b95e33..cedf627 100644 --- a/src/main/array.c +++ b/src/main/array.c @@ -1350,15 +1350,18 @@ SEXP attribute_hidden do_matprod(SEXP call, SEXP op, SEXP args, SEXP rho) if (PRIMVAL(op) == 0) { /* primitive, so use call */ if (ncx != nry) - errorcall(call, _("non-conformable arguments")); + errorcall(call, _("non-conformable arguments of dimension (%d, %d) and (%d, %d)"), + nrx, ncx, nry, ncy); } else if (PRIMVAL(op) == 1) { if (nrx != nry) - error(_("non-conformable arguments&quo...
2012 Nov 07
2
R: net reclassification index after Cox survival analysis
Dear all, I am interested to evaluate reclassification using net reclassification improvement and Integrated Discrimination Index IDI after survival analysis (Cox proportional hazards using stcox). I search a R package or a R code that specifically addresses the categorical NRI for time-to-event data in the presence of censored observation and, if possible, at different follow-up time points. I
2012 Dec 22
1
NRI reclassification table improveProb Cox
As describe in the Hmisc package's improveProb function, that function is for binary Y. And it's best to use category-free methods. Frank Petergodsk wrote > Hi > > I'm new to R. > > Is it possible to use the improveProb function to generate categorybased > NRI using a Cox model? > I believe I saw someone mentioning the possibility, but I can't find the
2005 Oct 12
1
Using matprod from array.c
...own C routine. I tried the following as a test /* my_matprod.c */ # include <Rinternals.h> /* for REAL, SEXP etc */ # include <R_ext/Applic.h> /* array.c says need for dgemm */ /* following copied from array.c */ static void matprod(double *x, int nrx, int ncx, double *y, int nry, int ncy, double *z) { char *transa = "N", *transb = "N"; int i, j, k; double one = 1.0, zero = 0.0, sum; Rboolean have_na = FALSE; if (nrx > 0 && ncx > 0 && nry > 0 && ncy > 0) { /* Don't trust the BLAS to handle NA...
2019 Apr 30
0
patch to improve matrix conformability error message
...ray.c b/src/main/array.c >index 4b95e33..cedf627 100644 >--- a/src/main/array.c >+++ b/src/main/array.c >@@ -1350,15 +1350,18 @@ SEXP attribute_hidden do_matprod(SEXP call, SEXP op, SEXP args, SEXP rho) > if (PRIMVAL(op) == 0) { > /* primitive, so use call */ > if (ncx != nry) >- errorcall(call, _("non-conformable arguments")); >+ errorcall(call, _("non-conformable arguments of dimension (%d, %d) and (%d, %d)"), >+ nrx, ncx, nry, ncy); > } > else if (PRIMVAL(op) == 1) { > if (nrx != nry) >- error(_("n...
2006 Mar 09
0
When calling external C-function repeatedly I get different results; can't figure out why..
...39;ve created the following functions (I am *new* to writing external C-functions, so feel free to laugh at my code - or, perhaps, suggest changes): #include <Rinternals.h> #include <R_ext/Applic.h> /* for dgemm */ static void matprod(double *x, int nrx, int ncx, double *y, int nry, int ncy, double *z) { char *transa = "N", *transb = "N"; double one = 1.0, zero = 0.0; F77_CALL(dgemm)(transa, transb, &nrx, &ncy, &ncx, &one, x, &nrx, y, &nry, &zero, z, &nrx); } SEXP trProd2(SEXP x, SEXP y) { int nrx, ncx,...
2006 Mar 09
0
When calling external C-function repeatedly I get differentresults; can't figure out why..
...s (I am *new* to writing external C-functions, so > feel free to laugh at my code - or, perhaps, suggest changes): > > #include <Rinternals.h> > #include <R_ext/Applic.h> /* for dgemm */ > > static void matprod(double *x, int nrx, int ncx, > double *y, int nry, int ncy, double *z) { > char *transa = "N", *transb = "N"; > double one = 1.0, zero = 0.0; > F77_CALL(dgemm)(transa, transb, &nrx, &ncy, &ncx, &one, > x, &nrx, y, &nry, &zero, z, &nrx); } > > SEXP trProd2(SEXP...
2010 Aug 23
1
Internal state indicating if a data object has NAs/no NAs/not sure (Was: Re: Speeding up matrix multiplies)
...pilation. > > Below is my modified version of the matprod function in src/main/array.c. > > ? Radford Neal > > ------------------------------------------------------------------------ > > static void matprod(double *x, int nrx, int ncx, > ? ? ? ? ? ? ? ? ? ?double *y, int nry, int ncy, double *z) > { > ? ?char *transa = "N", *transb = "N"; > ? ?int i, ?j, k; > ? ?double one = 1.0, zero = 0.0; > ? ?LDOUBLE sum; > ? ?Rboolean do_it_here; > > ? ?/* NOTE: ncx must be equal to nry. */ > > ? ?if (nrx==1 && ncy==1) { &g...
2010 Aug 23
1
Speeding up matrix multiplies
...39;t change any R configuration options regarding compilation. Below is my modified version of the matprod function in src/main/array.c. Radford Neal ------------------------------------------------------------------------ static void matprod(double *x, int nrx, int ncx, double *y, int nry, int ncy, double *z) { char *transa = "N", *transb = "N"; int i, j, k; double one = 1.0, zero = 0.0; LDOUBLE sum; Rboolean do_it_here; /* NOTE: ncx must be equal to nry. */ if (nrx==1 && ncy==1) { /* Do dot product quickly. */...
2012 Jan 17
2
net classification improvement?
Greetings, I have generated several ROC curves and would like to compare the AUCs. The data are cross sectional and the outcomes are binary. I am testing which of several models provide the best discrimination. Would it be most appropriate to report AUC with 95% CI's? I have been looking in to the "net reclassification improvement" (see below for reference) but thus far I can only
2018 Apr 18
1
R Bug: write.table for matrix of more than 2, 147, 483, 648 elements
Hi Colton, You could divide your write task into chunks that do not violate the 2^31-1 limit. write.table has an append argument (default FALSE). Figure out a row chunk size nri < nr such that nri * nc is under 2^31-1 and use write.table() to write that out. Then use write.table( append = TRUE, ) for the next chunk of rows, looping over chunks until done. Two chunks will get your 2.8
2006 Feb 22
2
How can I see how %*% is implemented?
I would like to see how the matrix multiplication operator %*% is implemented (because I want to see which external Fortran/C routines are used). How can I do so? Best S??ren
2016 Jun 09
4
rsync keeps writing files over
Hi Steven, Yes, both file systems are the same. rsync -nri --modify-window=1 <src> <dest> Gives me the following for most files >f..T....... 2015_167_1_1__Boy_What_A_Girl_R2/2015_167_1_1__Boy_What_A_Girl__UHD_DPX_R2/ BWAG_R2_00138428.dpx Although a few have >f..T......n 2015_167_1_1__Boy_What_A_Girl_R2/2015_167_1_1__Boy_What_A_Girl__UHD_DPX_R2/ BWAG_R2_00135909.dpx
2017 Sep 06
2
rgdal error when trying to import raster
Dear useRs, I am trying to import a raster with the line: nlcd <- raster("/home/jpolo/NRI/nlcd_nri5000.tif") And I keep getting an error like this: "Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,? : ? there is no package called 'rgdal' Error in .rasterObjectFromFile(x, band = band, objecttype =
2017 Jan 07
2
accelerating matrix multiply
...ectorized because of the early exit when NaN is detected: /* Don't trust the BLAS to handle NA/NaNs correctly: PR#4582 * The test is only O(n) here. */ for (R_xlen_t i = 0; i < NRX*ncx; i++) if (ISNAN(x[i])) {have_na = TRUE; break;} if (!have_na) for (R_xlen_t i = 0; i < NRY*ncy; i++) if (ISNAN(y[i])) {have_na = TRUE; break;} I tried deleting the 'break'. By inspecting the asm code, I verified that the loop was not being vectorized before, but now is vectorized. Total time goes down: system.time (C <- B %*% A) nancheck: wall time 1.898667s ? dgemm: wall...
2003 Aug 12
4
rsync problem
Hi all, I've installed rsync-2.5.6 on a sun box (solaris 8). When I run rsync using the command rsync -a ssh /opt/local/pkgs/httpd/htdocs/ root@remotemachine:/mnt/ I get the error rsync: connection unexpectedly closed (0 bytes read so far) rsync error: error in rsync protocol data stream (code 12) at io.c(165) What could be the reason? Any help would be appreciated. Thanks, Rajesh.