Displaying 11 results from an estimated 11 matches for "ylevels".
Did you mean:
levels
2010 May 13
1
cdplot() with 'POSIXct' x
...but use the original POSIXct x to
draw the x axis.
Index: src/library/graphics/R/cdplot.R
===================================================================
--- src/library/graphics/R/cdplot.R (revision 51984)
+++ src/library/graphics/R/cdplot.R (working copy)
@@ -43,8 +43,8 @@
if(!is.null(ylevels))
y <- factor(y, levels = if(is.numeric(ylevels)) levels(y)[ylevels] else ylevels)
x <- mf[,2]
- if(!is.numeric(x))
- stop("explanatory variable should be numeric")
+ if (!(is.numeric(x) || is(x, "POSIXct")))
+ stop("explanatory variabl...
2012 Nov 14
3
ctree
Hello,
I plotted a nice tree with "ctree" . It shows 3 nodes with the prediction of
my 2 groups. (see picture)
Unfortunately I need a larger scale to read the exact prediction of my
groups to get the specificity and sensitivity. I tried to change the scale
with "axis" but it didn't work, my guess because it's not a normal graph
with x and y axis.
Has someone an idea
2008 Oct 27
0
Displaying number of Y/N affected by tree in rule form RE: R question/request on rules from rpart
...ks for developing it and
suggesting how to make the enhancement.
Regards,
Dhruv
listrules<-function(model)
{
if (!inherits(model, "rpart")) stop("Not a legitimate rpart tree")
#
# Get some information.
#
frm <- model$frame
names <- row.names(frm)
ylevels <- attr(model, "ylevels")
ds.size <- model$frame[1,]$n
#
# Print each leaf node as a rule.
#
for (i in 1:nrow(frm))
{
if (frm[i,1] == "<leaf>")
{
# The following [,5] is hardwired - needs work!
cat("\n")
cat(sprintf(&qu...
2008 Aug 13
2
mob(party) formula question
I try tu use mob() with my data.frame ('data.frame': 288 obs. of 81
variables; factors, numerics and ordered factors)
My response is a binary variable and I should use for modelling a logistic
regression (family=binomial).
I read in the "MOB" Vignette that I could use a formula like this if I would
like to have only partitioning variables apart from the response.
2006 Oct 17
1
Some questions on Rpart algorithm
Hello:
I am using rpart and would like more background on how the splits are made
and how to interpret results - also how to properly use text(.rpart). I have
looked through Venables and Ripley and through the rpart help and still have
some questions. If there is a source (say, Breiman et al) on decision trees
that would clear this all up, please let me know. The questions below
pertain to a
2011 May 26
2
Plot binomial regression line
Dear all,
I am quite new with R and I have a problem with plotting a binomial
regression line in a plot.
This is what I type in:
> model<-glm(Para~Size,binomial)
> par(mfrow=c(1,1))
> xv<-seq(3.2,4.5,0.01)
> yv<-predict(model,list(area=xv),type="response")
> plot(Size,Para)
> lines(xv,yv)
The error message that I get is:
> Error in xy.coords(x, y) :
2002 Aug 28
0
user defined function in rpart
Hi,
I am trying to use the rpart library with my own set of functions on a
survival object. I get an immeadiate segmentation fault when i try
calling rpart with my list of functions. I get the same problem with the
logrank example from Therneau,s S-rpart library though their anova
example works. Should I report this as a bug, as even if my functions
are structured improperly, that should lead to
2005 May 25
0
Error with user defined split function in rpart (PR#7895)
Full_Name: Bill Wheeler
Version: 2.0.1
OS: Windows 2000
Submission from: (NULL) (67.130.36.229)
The program to reproduce the error is below. I am calling rpart with a
user-defined split function for a binary response variable and one continuous
independent variable. The split function works for some datasets but not
others.
The error is:
Error in "$<-.data.frame"(`*tmp*`,
2002 Aug 29
3
2 questions
Hi all,
I am using R1.5.0 under Unix,
I have a couple of questions here.
1. My program is running out of memory. I am writing a program to grow a
list of trees using rpart() on a subset of a large dataset(5807x693) with
a different response for every tree. I saw that after each tree was
constucted, 116 MB of data was being added to the Vcells. I have no idea
what this data is. My dataset is
2012 Jan 08
2
rpart question
We are trying to make a decision tree using rpart and we are continually
running into the following error:
> fit_rpart=rpart(ENROLL_YN~MINORITY,method="class")
> summary(fit_rpart)
Call:
rpart(formula = ENROLL_YN ~ MINORITY, method = "class")
n= 5725
CP nsplit rel error
1 0 0 1
Error in yval[, 1] : incorrect number of dimensions
ENROLL_YN is a
2005 Aug 26
1
Help in Compliling user -defined functions in Rpart
I have been trying to write my own user defined function in Rpart.I
imitated the anova splitting rule which is given as an example.In the
work I am doing ,I am calculating the concentration index(ci) ,which
is in between -1 and +1.So my deviance is given by
abs(ci)*(1-abs(ci)).Now when I run rpart incorporating this user
defined function i get the following error message:
Error in