Re: [R] Isotonic Regression

2015-11-28 Thread Jim Lemon
Hi Hamed, I guess the first thing to do is to find out what "test.df" is: is.data.frame(test.df) dim(test.df) If these come up FALSE or NULL respectively, you are not passing the correct data argument to the boot function. Jim On Sun, Nov 29, 2015 at 5:04 AM, Hamed Nofal wrote: > Dear Sir >

[R] Error in 'Contrasts<-' while using GBM.

2015-11-28 Thread Karteek Pradyumna Bulusu
Hey, I was trying to implement Stochastic Gradient Boosting in R. Following is my code in rstudio: library(caret); library(gbm); library(plyr); library(survival); library(splines); library(mlbench); set.seed(35); stack = read.csv("E:/Semester 3/BDA/PROJECT/Sample_SO.csv", head =TRUE,sep=

[R] Error in Contrast

2015-11-28 Thread kb1304
Hey, I was trying to implement Stochastic Gradient Boosting in R. Following is my code in rstudio: library(caret); library(gbm); library(plyr); library(survival); library(splines); library(mlbench); set.seed(35); stack = read.csv("E:/Semester 3/BDA/PROJECT/Sample_SO.csv", head =TRUE,sep=","); dim

[R] efficiently multiply each column of a sparse Matrix by a sparse vector

2015-11-28 Thread Benjamin Tyner
Hi, Say I have a sparse Matrix X, and a sparse vector (stored as a 1-column sparse Matrix A), with X and A having the same number of rows, and I wish to multiply each column of X by A, but would like the operation to take full advantage of the sparseness of both X and A. In other words I want

[R] Some help understanding ggplot2

2015-11-28 Thread Glenn Schultz
All, I am trying to format a graph using scales and percent format but I am missing something and all my graphics books on ggplot2 are now quite far behind where ggplot2 is today.    I seem to be missing a trick but the documentation implies that percent_format() will multiply by 100 and add %

[R] Isotonic Regression

2015-11-28 Thread Hamed Nofal
Dear Sir I am new to R.statistics. I am an Anaesthetist using the version Ri 386 3.2.2 I have tested the patients' response sequence for a dose sequence, and I need to calculate an estimate of the minimum dose that gives a certain effect on a certain percentage of the patients' number. I am using

Re: [R] Graphing the Area of Definite Integral

2015-11-28 Thread William Dunlap
Your right <- (1:n)*dx mean that your leftmost rectangle's left edge is at 0, but you want it to be at -4. You should turn this into a function so you don't have to remember how the variables in your code depend on one another. E.g., showIntegral <- function (f, xmin, xmax, n = 16) { curve(

Re: [R] Using uniroot on c(0, 1) when the function does not change sign in this interval?

2015-11-28 Thread Bert Gunter
Is this a homework problem? This list has a no homework policy. Cheers, Bert Bert Gunter "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." -- Clifford Stoll On Fri, Nov 27, 2015 at 4:08 PM, mviljamaa wrote: > How can I use uniroot to find a ro

Re: [R] Graphing the Area of Definite Integral

2015-11-28 Thread Steven Stoline
Dear Peter: in my previous email I forgot to reply to the list too I used your code for more than one examples, and it works nicely. But when I tried to use for the the function: f(x) = x^2, it looks like I am missing something, but I could not figured it out. This what I used: f <- function(x

[R] Using uniroot on c(0, 1) when the function does not change sign in this interval?

2015-11-28 Thread mviljamaa
How can I use uniroot to find a root in the interval (0,1) when my function does not change sign in this interval. I've tried plugging in some values and seems like e.g. f(50) < 0 and then I can pick c(0,50). But this sounds really weird, given that I need to find a root in (0,1). So what ar