search for: rsq

Displaying 20 results from an estimated 72 matches for "rsq".

Did you mean: req
2017 Aug 16
1
Bias-corrected percentile confidence intervals
...g wrong but the estimates from my attempt at the BCP CI are different enough from other methods that I assume I'm doing something wrong. require(boot) data("mtcars") # 1) Bootstrap 95% CI for R-Squared via boot::boot # statmethods.net/advstats/bootstrapping.html # Function for boot rsq <- function(formula, data, indices) { d <- data[indices,] fit <- lm(formula, data=d) return(summary(fit)$r.square) } # bootstrapping with 1000 replications results <- boot(data=mtcars, statistic=rsq, R=1000, formula = mpg ~ wt + disp) # get 95% confidence interva...
2006 Sep 12
4
variables in object names
Is there any way to put an argument into an object name. For example, say I have 5 objects, model1, model2, model3, model4 and model5. I would like to make a vector of the r.squares from each model by code such as this: rsq <- summary(model1)$r.squared for(i in 2:5){ rsq <- c(rsq, summary(model%i%)$r.squared) } So I assign the first value to rsq then cycle through models 2 through 5 gathering there values. The %i% in my third line indicates which object to draw from. The question is is there any way to pass...
2004 Nov 29
2
problem with using transace
>I am trying to use the Hmisc function transace to transform predictors > > test<-cbind(flowstress,pressres,alloy) > xtrans<-transace(x,binary=pressres',monotonic='flowstress', categorical='alloy') > > >and I am getting the following message?? >Error in ace(x[, -i], x[, i], monotone = im, categorical = ic) : > unused argument(s) (monotone ...)
2010 Jun 29
1
Model validation and penalization with rms package
...l which is substantially overfitted? I calculated corrected R^2, optimism in R^2, and corrected slope for various penalties for a simple example: x1 <- rnorm(45) x2 <- rnorm(45) x3 <- rnorm(45) y <- x1 + 2*x2 + rnorm(45,0,3) ols0 <- ols(y ~ x1 + x2 + x3, x=TRUE, y=TRUE) corrected.Rsq <- rep(0,60) optimism.Rsq <- rep(0,60) corrected.slope <- rep(0,60) for (pen in 1:60) { olspen <- ols(y ~ x1 + x2 + x3, penalty=pen, x=TRUE, y=TRUE) val <- validate(olspen, B=200) corrected.Rsq[pen] <- val["R-square", "index.corrected"] optimism.Rsq[pen] <-...
2004 Feb 03
1
Error in f(x, ...) : subscript out of bounds
...ric(length(gsvR$ret)) x <- numeric(length(gsvR$ret) # Below this line can be specified differently x[1] <- 1 lenR <- length(gsvR$ret) for (i in 1:(lenR-1)) { x[i+1] <- sum(gsvR$rw[1:i]) + 1 rsq <- (gsvr$ret[(x[i]):(nn+x[i])])^2 sigsq[i] <- 22 * sum(wd * rsq) } if((nn+x[lenR]) < length(gsvr$ret)) rsq <- (gsvr$ret[(x[lenR]):(nn+x[lenR])])^2 else rsq <- NA sigsq[length(gsvR$ret)] <- 22 * sum(wd * rsq) sigsq...
2006 Jan 16
1
rsq.rpart not found ...
Hi to all I tried help.search("rsq") and found Help files with alias or concept or title matching 'rsq.rpart' using regular expression matching: rsq.rpart(rpart) Plots the Approximate R-Square for the Different Splits then I tried to use the function but I got the error object not fo...
2012 Oct 11
0
Error with cForest
...e coding? 2). The results are saving successfully to a file as a list however, I wish to save the data into a matrix that resembles: Subset 1, Subset 2, Subset n, Var Importance: VI.1 VI.2 VI.n mse: mse.1 mse.2 mse.n rsq: rsq.1 rsq.2 rsq.n IV-1: x.1 x.2 x.n IV-2: y.1 y.2 y.n IV-n: n.1 a.2 n.n How could I create output that would append/write sequential r...
2015 Feb 23
0
[Mesa-dev] [PATCH 2/2] nvc0/ir: improve precision of double RCP/RSQ results
Oh right. I think the NVIDIA blob executes those steps conditionally based on the upper bits not being 0x7ff (== infinity/nan). I should do the same thing here. [FWIW I was able to test the nv50 code last night and that one's a total fail for rcp/rsq... will need to port that over to my nvc0 and debug there.] On Mon, Feb 23, 2015 at 8:24 AM, Roland Scheidegger <sroland at vmware.com> wrote: > Does this give correct results for special floats (0, infs)? > We tried to improve (for single floats) x86 rcp in llvmpipe with > newton-r...
2015 Feb 23
0
[PATCH 2/2] nvc0/ir: improve precision of double RCP/RSQ results
...nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp index 87e75e1..9767566 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp @@ -77,8 +77,9 @@ NVC0LegalizeSSA::handleRCPRSQ(Instruction *i) bld.setPosition(i, false); // 1. Take the source and it up. - Value *src[2], *dst[2], *def = i->getDef(0); - bld.mkSplit(src, 4, i->getSrc(0)); + Value *input = i->getSrc(0); + Value *src[2], *dst[2], *guess, *def = i->getDef(0); + bld.mkSplit(src, 4,...
2011 Mar 22
2
lm ~ v1 + log(v1) + ... improve adj Rsq ¿any sense?
...1 3.02 3.024 1.2638 0.262357 factor1 1 17.62 17.616 7.3608 0.007279 ** factor2 1 11.80 11.797 4.9294 0.027586 * Residuals 190 454.71 2.393 Thanks, user at host.com -- View this message in context: http://r.789695.n4.nabble.com/lm-v1-log-v1-improve-adj-Rsq-any-sense-tp3396935p3396935.html Sent from the R help mailing list archive at Nabble.com.
2015 Feb 23
2
[Mesa-dev] [PATCH 2/2] nvc0/ir: improve precision of double RCP/RSQ results
...0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp > index 87e75e1..9767566 100644 > --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp > +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp > @@ -77,8 +77,9 @@ NVC0LegalizeSSA::handleRCPRSQ(Instruction *i) > bld.setPosition(i, false); > > // 1. Take the source and it up. > - Value *src[2], *dst[2], *def = i->getDef(0); > - bld.mkSplit(src, 4, i->getSrc(0)); > + Value *input = i->getSrc(0); > + Value *src[2], *dst[2], *guess, *def = i-&gt...
2010 Apr 29
1
R CMD check Error after R CMD build for R-2.11.0
...... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking data for non-ASCII characters ... OK * checking examples ... ERROR Running examples in 'eqtl-Ex.R' failed. The error most likely occurred in: > ### * Rsq.2.array > > flush(stderr()); flush(stdout()) > > ### Name: Rsq.2.array > ### Title: Add R square data to peak.array data frame > ### Aliases: Rsq.2.array > > ### ** Examples > > data(seed10); > > # Genome scan and QTL detection > out.em <- scanone(seed10, p...
2004 Apr 23
1
Extracting the MSE and % Variance from RandomForest
Several ways: 1. Read ?randomForest, especially the `Value' section. 2. Look at str(myforest.rf). 3. Look at print.randomForest. If the forest has 100 trees, then the mse and rsq are vectors with 100 elements each, the i-th element being the mse (or rsq) of the forest consisting of the first i trees. So the last element is the mse (or rsq) of the whole forest. HTH, Andy > From: David L. Van Brunt, Ph.D. > > I'm almost embarrassed to ask... Almost! > &gt...
2004 May 14
1
help with memory greedy storage
...generate proper lables (names) for the anova p-values difflabels <- attr(terms(model),"term.labels") aov <- list() # anova p-values for factors + interactions coef <- list() # lm coefficients coefp <- list() # p-valuies for coefficients rsq <- list() # R-squared of fit fitted <- list() # fitted values value <- list() # orig. values (used with fitted to get residuals) for ( g in genes ) { # loop over >12,000 genes ### g is the name that identifies 14 to 16 rows in emat ### d is th...
2005 Apr 21
2
apply vs sapply vs loop - lm() call appl(y)ied on array
Christoph -- There was just a thread on this earlier this week. You can search in the archives for the title: "refitting lm() with same x, different y". (Actually, it doesn't turn up in the R site search yet, at least for me. But if you just go to the archive of recent messages, available through CRAN, you can search on refitting and find it. The original post was from William
2003 Jan 22
1
Intercept in model formulae
...the model(mymodel<-lm(y~z)) to pass through the origin (zero) and the line of the model(mymodel<-lm(y~x)) to pass through 10 as an x-intercept. For the first case i have used the (y~x-1) syntax, but the linear model returned a regresssion that didn't pass trough the points (with a higher Rsq than expected). For the second case, i did not find a solution yet.. Could somone help me please? Thanks in avance Walid SADOK
2009 Mar 31
1
using "substitute" inside a legend
Hello list, I have a linear regression: mylm = lm(y~x-1) I've been reading old mail postings as well as the plotmath demo and I came up with a way to print an equation resulting from a linear regression: model = substitute(list("y"==slope%*%"x", R^2==rsq), list(slope=round(mylm$coefficients[[1]],2),rsq=round(summary(mylm)$adj.r.squared, 2))) I have four models and I need to list each equation in a legend. I'm using: legend(20, 120, title = "fitted models", c(model1, model2, model3, model4), lty=1, col=c("blue", "red&q...
2008 Jun 13
1
nls() vs lm() estimates
...2) ## Finding "log(a)" and "b" for log transformed model: log(W) = log(a)+ b*log(L) logWL.lm <- lm(log10(W) ~ log10(L)) summary(logWL.lm) ## Adding model to plot lines(L, 10^coef(logWL.lm)[1]*L^coef(logWL.lm)[2], col="red", lwd=2) ## R-squared for W = a*L^b Rsq.nls <- sum((predict(WL.nls) - mean(W))^2) / sum((W - mean(W))^2) ## R-squared for W = a*L^b with coefs from log(W) = log(a)+ b*log(L) pred <- 10^coef(logWL.lm )[1]*L^coef(logWL.lm )[2] Rsq.lm <- sum((pred - mean(W))^2) / sum((W - mean(W))^2) text(c(9, 13), c(50, 20), paste("R-s...
2013 Jan 11
0
Error with looping through a list of strings as variables
...tered, control = ctrl) print(rank.cf) ## Standard importance values __________________________ imp=varimp(rank.cf, conditional = TRUE) print(imp) ## predict variables _________________________________________ predicted=predict(rank.cf,OOB = TRUE) residual=filtered$h-predicted mse=mean(residual^2) rsq=1-mse/var(filtered$h) ##Correlation between fitted values and original values: ____ correl <- paste(cor(filtered$h,predicted)) Correlation <-paste( "MSE:",mse, "Rsq:",rsq, "Correlation between fitted values and original values:",correl) print(Correlation) ## co...
2015 Feb 23
2
[PATCH 1/2] nv50/ir: add fp64 support on G200 (NVA0)
...dc2 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp @@ -314,6 +314,7 @@ private: void handleDIV(Instruction *); void handleMOD(Instruction *); void handleMUL(Instruction *); + void handleDRCPRSQ(Instruction *); void handleAddrDef(Instruction *); inline bool isARL(const Instruction *) const; @@ -552,6 +553,95 @@ NV50LegalizeSSA::handleMOD(Instruction *mod) mod->setSrc(1, m); } +void +NV50LegalizeSSA::handleDRCPRSQ(Instruction *i) +{ + /* We need to replace this instruc...