Displaying 20 results from an estimated 600 matches similar to: "help in plotting"
2007 Nov 21
1
Calculating AUC from ROCR
Dear R-helper,
I am working with ROCR of Tobias Sing et. al. to compare the performances of
logistic and nnet models on a binary response.
I had the performance plots, but I have problem finding out other
performance statistics (eg. MSE/ASE, AUC). Any help on this?
Thanks
Ilham
[[alternative HTML version deleted]]
2007 Nov 16
2
creating discretized data
Hi, Ia m working in discretized data. Here my data:
x <- c(2,1,3, 5), and I want to make (0,1) data based on the length of
each component in x.
So the new data should like: y = (0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1). I spent
too much time with
"seq", "rep". Still didn't get it. Any help? Thanks
Ilham
[[alternative HTML version deleted]]
2007 Nov 24
1
how to label multiple plots
Dear R-list,
I want to combine several plots in one graph.
I did this: plot(a1); plot(a2, add=TRUE); ...plot(a5, add=TRUE)
The problem is the more plot we put, the more complex the graph.
Is there any way to label each line; or other way just to make sure I know
which one which?
Thanks,
Ilham
[[alternative HTML version deleted]]
2008 Feb 15
2
Softmax in nnet
Hi R help,
I run my data in nnet with skip layer, factor response (with 0 & 1
values) and explicitly put softmax=T to compare the result of the
default nnet with no softmax specification. I assume this should give
me the same result. I got the result the default one, but not the
softmax version and I got the error message that I did not quite
understand.
test6.nn.skipT.softm.Yfac <-
2007 Nov 22
5
testing independence of categorical variables
hi,
is there a way of calculating of measuring dependence between two
categorical variables. i tried using the chi square test to test for
independence but i got error saying that the lengths of the two
vectors don't match. Suppose X and Y are two factors. X has 5 levels
and Y has 7 levels. This is what i tried doing
>temp<-chisq.test(x,y)
but got error "the lengths of the two
2007 Dec 14
2
train nnet
Hi R-helpers,
Can some one tell me how to train 'mynn' of this type?:
mynn <- nnet(y ~ x1 + ..+ x8, data = lgist, size = 2, rang = 0.1,
decay = 5e-4, maxit = 200)
I assume that this nn is untrained, and to train I have to split the
original data into train:test data set,
do leave-one-out refitting to refine the weights (please straighten
this up if I was wrong).
I just don't know
2007 Dec 10
1
help with fatal error message
Dear helper,
After some cleaning, I found out that I cannot open my R2.6.0 console
with message: "Fatal error: unable to restore saved data in .Rdata",
and every time I retry it just kick me off. I am wondering if I still
be able to retrieve the data that I've been working for a month.
I have installed the new R2.6.1 and it has no problem to open, only
there is nothing in it I also
2013 Apr 09
5
Error when using fitdist function in R
Hello everyone,
I was trying to do some distribution fitting with a numerical field called
Tolls. The sample size = 999 rows.
Basically I assigned the Toll data to a new variable K by doing:
k<-dtest$Toll
After that, tried to fit a gamma distribution by doing: fitG<-fitdist(k,
"gamma")
Then the following messages showed (oh and I checked for empty rows before
doing this):
2009 Sep 25
1
Problem with dgamma function.
Hi, All,
I am getting some funny results trying to use R's built in
distribution functions.
In R:
> dgamma(4.775972,1.37697964405418, 0.106516604930466)
[1] 0.05585295
> dgamma(4.775972,1.37697964405418, 0.106516604930466,TRUE) ### THIS IS JUST WRONG!
[1] 0.01710129
> log(dgamma(4.775972,1.37697964405418, 0.106516604930466))
[1] -2.885033
>
In C:
2007 Apr 23
2
Problem with dgamma ?
Hi All,
Here 's what I got using dgamma function :
> nu<-.2
> nu*log(nu)-log(gamma(nu))+(nu-1)*log(1)-nu*(1)
[1] -2.045951
> dgamma(1,nu,nu,1)
[1] 0.0801333
> dgamma(1,nu,nu,0)
[1] NaN
Warning message:
NaNs produced in: dgamma(x, shape, scale, log)
Could anyone tell me what is wrong here ?
I am using R-2.4.1 on windows XP.
Thanks a lot.
2011 Sep 10
1
dgamma in jags within r
I define priors in jags within r using a gamma distribution. I would
like to control the shape but I have problems. Any help will be usefull.
From help of dgamma
___________________
The Gamma distribution with parameters shape = a and scale = s has density
f(x)= 1/(s^a Gamma(a)) x^(a-1) e^-(x/s)
and rate=1/scale
From jags user manual
____________________
dgamma(r, mu) has a density of
2000 Feb 10
3
creating a grid of function values
I want to create a grid of function values for use in `contour' or
`persp'. The function is the log-likelihood for the gamma. The
sample is stored as vector of length 20 called `Survival'.
A single evaluation of the log-likelihood at, say, scale = 9 and shape
= 10 would be obtained by
sum(dgamma(Survival, scale = 9, shape = 10, log = TRUE))
(This may work only 0.99.0, I'm not
2013 Jul 12
2
How to determine the pdf of a gamma distribution using the estimated parameters?
Hello everyone,
With th bar histogram (number of occurrences) hist<-c(24,7,4,1,2,1,1) of seven equally spaces classes ]1-4], ]5-8], ]9-12], ]13-16], ]17-20], ]21-24], ]25-28], I obtained shape=0.8276 and rate=0.1448.
I would like to know how to build the continuous pdf of a this gamma distribution knowing these two estimated parameters such that I will be able to predict the pdf of any
2008 May 21
2
Converting Data Types
Hi,
How can I convert the matrices to list.
For example I have this snippet:
samples<-mymatrix[1,]
print(samples)
which prints:
V1 V2 V3 V4 V5 V6
1 103.9 88.5 242.9 206.6 175.7 164.4
How can I convert the object "samples" such that it prints:
[1] 103.9 88.5 242.9 206.6 175.7 164.4
The reason I ask this because I can't use the former
"samples"
2016 Nov 13
1
dgamma density values in extreme point
Dear R-Devel group,
My name is Alexey, a data scientist from Moscow, currently working for
Align Technology Inc.
We have recently had a discussion of the results that the dgamma
function (stats) returns for an extreme point (x == 0).
<dgamma(0,1,1,log = FALSE)
[1] 1
and
<dgamma(0,0.5,1,log = FALSE)
[1] Inf
Density appears to be defined in point zero for the distribution with
the
2003 Sep 30
3
fitdistr, mle's and gamma distribution
Dear R Users,
I am trying to obtain a best-fit analytic distribution for a dataset
with 11535459 entries. The data range in value from 1 to 300000000. I
use: fitdistr(data, "gamma") to obtain mle's for the parameters.
I get the following error:
Error in optim(start, mylogfn, x = x, hessian = TRUE, ...) :
non-finite finite-difference value [1]
And the following warnings:
2006 Sep 17
2
Building the call of an arbitrary function
Hy all,
Is there a direct way to build the complete function call of an arbitrary
function?
Here's what I want to do. A function will build a function which will itself
call a probability density function for some law given in argument to the
first function:
> f("gamma", 1000)
will return, say,
function(x, shape, rate, scale = 1/rate)
dgamma(x + 1000, shape, rate,
2001 Sep 06
1
RFC: d/p/q/rgamma
dgamma and friends in S are documented as
dgamma(x, shape, rate=1)
pgamma(q, shape, rate=1)
qgamma(p, shape, rate=1)
rgamma(n, shape, rate=1)
whereas R has
dgamma(x, shape, scale=1, log = FALSE)
pgamma(q, shape, scale=1, lower.tail = TRUE, log.p = FALSE)
qgamma(p, shape, scale=1, lower.tail = TRUE, log.p = FALSE)
rgamma(n, shape, scale=1)
Note the use of rate vs scale. Indeed, as both S and
2008 Jun 25
1
dgamma in WinBUGS and JAGS (rjags)
Hello,
In WinBUGS 1.4 manual
(http://www.mrc-bsu.cam.ac.uk/bugs/winbugs/manual14.pdf), the gamma
density is presented as dgamma(r,mu) where r and mu are the shape and
rate parameters, respectively. In JAGS (rjags) manual version 1.0.2,
May 9, 2008 (http://www-fis.iarc.fr/~martyn/software/jags/jags_user_manual.pdf),
on page 26 the gamma density is presented as dgamma(mu,r) instead of
dgamma(r,mu).
2005 Nov 09
2
About: Error in FUN(X[[1]], ...) : symbol print-name too long
Hi,
I??m trying to use the Win2BUGS package from R and I have a similar problem
that reurns with the message:
Error in FUN(X[[1]], ...) : symbol print-name too long
But, there is no stray ` character in the file ( Sugestions given by: Duncan
Temple Lang <duncan>
Date: Mon, 26 Sep 2005 07:31:08 -0700 )
The progam in R is:
library(R2WinBUGS)
library(rbugs)
dat <-