Displaying 20 results from an estimated 800 matches similar to: "ROCR package question for evaluating two regression models"
2010 Aug 15
1
parent.frame(1) of a S4 method is not a calling environment.
Dear Developers,
I wonder what are the parent.frame rules for methods. For ordinary functions one
can call parent.frame() and be sure that it is the environment of a calling
function. With S4 aparently it is not the case.
Here is what I have discovered by trial and error so far:
> setClass("A", contains="vector")
[1] "A"
> setGeneric("foo",
2011 Apr 06
3
ROCR - best sensitivity/specificity tradeoff?
Hi,
My questions concerns the ROCR package and I hope somebody here on the list can help - or point me to some better place.
When evaluating a model's performane, like this:
pred1 <- predict(model, ..., type="response")
pred2 <- prediction(pred1, binary_classifier_vector)
perf <- performance(pred, "sens", "spec")
(Where "prediction" and
2007 Oct 12
2
accessing ylim set by xyplot
Hello,
I would like to know if there is a clever way to avoid the problem
illustrated below within the xyplot function.
x <- seq(1:10)
y <- seq(1:10)
pr1 <- xyplot(x ~ y)
u <- seq(1:12)
v <- seq(1:12)
pr2 <- xyplot(u ~ v, col = "red", more = FALSE)
prts <- list(pr1, pr2)
for(i in prts) print(i, more = TRUE)
I realize that one possibility is to
2004 Nov 01
1
plot time series / dates (basic)
Dear R users,
I'm having a hard time with some very simple things. I have a time
series where the dates are in the format 7-Oct-04. I imported the
file with read.csv so the date column is a factor. The series is
rather long and I want to plot it piece by piece. The function below
works fine, except that the labels for date are meaningless (ie
9.47e+08 or 1098000000 - apparently the number of
2011 Apr 09
1
loop and sapply problem, help need
Dear R experts
Sorry for this question
M1 <- 1:10
lcd1 <- c(11, 22, 33, 44, 11, 22, 33, 33, 22, 11)
lcd2 <- c(22, 11, 44, 11, 33, 11, 22, 22, 11, 22)
lcd3 <- c(12, 12, 34, 14, 13, 12, 23, 23, 12, 12)
#generating variables through sampling
pvec <- c("PR1", "PR2", "PR3", "PR4", "PR5", "PR6", "PR7",
2009 Jan 28
3
initial value in 'vmmin' is not finite
Dear r helpers
I run the following code for nested logit and got a message that
Error in optim(c(0, 0, 0, 0, 0.1, -2, -0.2), fr, hessian = TRUE, method = "BFGS") : initial value in 'vmmin' is not finite
What does this mean? and how can I correct it?
Thank you
June
> yogurt = read.table("yogurtnp.csv", header=F,sep=",")> attach(yogurt)>
2009 Mar 02
1
initial gradient and vmmin not finite
Dear Rhelpers
I have the problem with initial values, could you please tell me how to solve it?
Thank you
June
> p = summary(maxLik(fr,start=c(0,0,0,1,0,-25,-0.2)))
Error in maxRoutine(fn = logLik, grad = grad, hess = hess, start = start, :
NA in the initial gradient
> p = summary(maxLik(fr,start=c(0,0,0,1,0,-25,-0.2),method="BFGS"))
Error in optim(start, func, gr =
2010 Sep 15
1
optim with BFGS--what may lead to this, a strange thing happened
Dear R Users
on a self-written function for calculating maximum likelihood probability (plz
check function code at the bottom of this message), one value, wden, suddenly
jump to zero. detail info as following:
w[11]=2.14
lnw =2.37 2.90 3.76 ...
regw =1.96 1.77 1.82 ....
wden=0.182 0.178 0.179...
w[11]=2.14
lnw=2.37 2.90 3.76 ...
regw =1.96 1.77 1.82 ....
wden=0.182
2010 Sep 07
5
question on "optim"
Hey, R users
I do not know how to describe my question. I am a new user for R and write the
following?code for a dynamic labor economics?model and use OPTIM to get
optimizations and parameter values. the following code does not work due to
the?equation:
?? wden[,i]<-dnorm((1-regw[,i])/w[5])/w[5]
where w[5]?is one of the parameters (together with vector a, b and other
elements in vector
2005 May 03
2
comparing lm(), survreg( ... , dist="gaussian") and survreg( ... , dist="lognormal")
Dear R-Helpers:
I have tried everything I can think of and hope not to appear too foolish
when my error is pointed out to me.
I have some real data (18 points) that look linear on a log-log plot so I
used them for a comparison of lm() and survreg. There are no suspensions.
survreg.df <- data.frame(Cycles=c(2009000, 577000, 145000, 376000, 37000,
979000, 17420000, 71065000, 46397000,
2008 Feb 12
1
Finding LD50 from an interaction Generalised Linear model
Hi,
I have recently been attempting to find the LD50 from two predicted fits
(For male and females) in a Generalised linear model which models the effect
of both sex + logdose (and sex*logdose interaction) on proportion survival
(formula = y ~ ldose * sex, family = "binomial", data = dat (y is the
survival data)). I can obtain the LD50 for females using the dose.p()
command in the MASS
2012 Jul 17
2
Problem creation tensor
Hi guys,
I need some help to analyzing my data.
I start to describe my data: I have 21 matrices, every matrix on the
rows has users and on columns has items, in my case films.
Element of index (i, j) represent the rating expressed by user i about item j.
I have a matrix for each of professions.
An example of a this type of matrix is:
item 1 item 2 item 3 item4
id
2001 Feb 08
5
kernel freeze after cbq startup
Hello,
I want to ask what am I doing wrong. A few seconds after running this script
my gateway freezes. I use the 2.4.1 kernel compiled on RH 7.0 system using
the kgcc (egcs-1.1.2) compiler.
I have two ethernet cards. The Internet interface eth1 is connected to the
ISP, who shapes out traffic to 128Kbit. I would like to give the high
priority to the e-mail and ssh traffic and to shape others
2013 Mar 21
1
contourplot
Greets,
I'm using a data frame that looks like:
> head(pr2)
X1 X2 X3 X4 Y fit res
1 44 33.2 5 30 41.2 39.22201 1.977991
2 43 33.8 4 41 31.7 38.48476 -6.784761
3 48 40.6 3 38 39.4 44.78278 -5.382783
4 52 39.2 7 48 57.5 51.48134 6.018656
5 71 45.5 11 53 74.8 68.25585 6.544153
6 44 37.5 9 65 59.8 53.27743 6.522569
Along with the command:
>
2009 Mar 27
1
ROCR package finding maximum accuracy and optimal cutoff point
If we use the ROCR package to find the accuracy of a classifier
pred <- prediction(svm.pred, testset[,2])
perf.acc <- performance(pred,"acc")
Do we?find the maximum accuracy?as follows?(is there a simplier way?):
> max(perf.acc at x.values[[1]])
Then to find the cutoff point that maximizes the accuracy?do we do the
following?(is there a simpler way):
> cutoff.list <-
2008 Jul 24
2
ORA-19870 and ORA-19502 During RMAN restore to OCFS2 filesystem
Hi,
When attempting to restore to LINUX RHEL5 - OCFS2 filesystem received the
following error during RMAN restore for nearly all of the datafiles
attempted to restore with exception of a couple of smaller datafiles which
were smaller < 2GB.
ORA-19870: error reading backup piece /db/dumps/TR1_1/rmanbackup/TR1_88_1
ORA-19502: write error on file "/db/devices/db1/PR2/pr2_1/pr2.data1",
2019 Apr 01
1
udev rename NIC failed
Hi,
Sometimes, I found one of my Mellanox NIC renamed to rename6, instead
of eth1. The right names of NICs in my system should be:
eth0 Mellanox NIC
eth1 Mellanox NIC
eth2 Intel NIC
eth3 Intel NIC
eth4 Intel NIC
eth5 Intel NIC
eth0 and eth1 will combined as bond1 with mode 4. However, the current
names are:
eth0 Mellanox
2017 Jun 10
2
errror al determinar puntos óptimos de corte (librería: OptimalCutpoints)
Hola a todos,
Al ejecutar el código que veis más abajo:
library(OptimalCutpoints)prediccion<-c(0.49165923,0.52759793,0.30213400,0.33468349,0.14979703,0.47401846,0.52216404,0.42018794,0.92168073,0.76893929,0.83362668,0.38251162,0.70803701,0.49165923,0.94462558)
real<-c(0,1,0,0,0,0,1,1,1,1,1,0,1,0,1)datos_OPTIMO<-cbind(prediccion,real)
cutpoint1 <- optimal.cutpoints(X =
2005 Feb 07
2
logit link + alternatives
Help needed with lm function:
Dear R's,
Could anyone tell me how to replace the link function (probit logit,
loglog etc.) in lm
with an abitrary user-defined function? The task is to perform ML
Estimation of betas
for a dichotome target variable.
Maybe there is already a package for this (I did not find one).
Any hints or a code excerpt would be welcome!
Thank you -Jeff
jeff.pr2 (at)
2009 Aug 05
1
Decision boundaries for lda function?
Hi,
I am using the lda function from the MASS library. I would to find the
decision boundaries of each class and subsequently plot them. I wonder if
anybody can offer any help on this topic?
Below I applied the lda function on a small dataset of mine.
Any help will be much appreciated.
> library(MASS)
>