Displaying 20 results from an estimated 1000 matches similar to: "creating discretized data"
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 24
3
help in plotting
Dear 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?
Thank you for the help,
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 <-
2008 Apr 07
2
tcltk issue remains
Dear R-help,
I'm trying to load the fGarch package and keep running into problems
with tcltk:
After succesfully instaling fGarch (and dependencies) I get:
>library(fGarch)
Loading required package: fBasics
Loading required package: fImport
Loading required package: fSeries
Loading required package: robustbase
Loading required package: fCalendar
Loading required package: MASS
Loading
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
2008 Dec 17
1
repeated measures aov with weights
Dear R-help,
I'm facing a problem with defining a repeated measures anova with
weighted data.
Here's the code to reproduce the problem:
# generate some data
seed=11
rtrep <- data.frame(rt=rnorm(100),ti=rep(1:5,20),subj=gl
(20,5,100),we=runif(100))
# model with within factor for subjects/repeated measurements, no
problem
aov(rt~ti + Error(subj/ti),data=rtrep)
#model with weights
2005 Mar 22
5
Convert timeseries to transition matrix
Hi All,
Does someone have an idea of how to cleverly convert a categorical
timeseries into a transition matrix?
Ie, I have something like:
x<- c(1,1,2,1,1,2,2,2,1,2),
And I want a matrix with counts and/or probabilities:
> tr <- matrix(c(2,3,2,2),2,2)
> tr
[,1] [,2]
[1,] 2 2
[2,] 3 2
Meaning that there are two transitions from 1 to 1, two from 1 to 2, three
from 2 to 1
2007 Nov 23
2
rbinom with computed probability
Hello,
I have a loop with probability computed from a logistic model like this:
for (i in 1:300){
p[i]<-exp(-0.834+0.002*x[i]+0.023*z[i])/(1+exp(-0.834+0.002*x[i]+0.023
+z[i]))
x and z generated from normal distribution.
I get 300 different probabilities And I want to generate variables from
bernulli distribution
with P for every observation:
T[i]<-rbinom(1,1,p[i])
But i get missing
2007 Dec 08
2
Function to tell you how an object is put together
Question: Suppose I have an arbitrary object. Is there a function which will
accept the object as an argument and sort of give the format of the object,
how it is put together, etc.? The analysis would include the attributes and
the names of the attributes. Also, things like whether or not the object is
an array; whether or not it is a matrix, etc.
Tom Jones
2007 Oct 24
3
multiply for vector in R
Dear All,
Is there a conmand to calculate the multiplication of the elements in a vector? For example:
a=c(1,2,3,4)
I want to get 1*2*3*4=24.
Because the dimension of the vector is high, I want to know there is a command for this task in R?
Thank you so much!
Kang
__________________________________________________
[[alternative HTML version deleted]]
2008 Apr 10
2
New user, requesting help with MAC installation of R
Hi:
Yesterday I downloaded R and got it up and running on my PC without a
hitch, not so when I tried to do the same on my Mac powerbook, using
Mac OSX: version 10.4.11.. I have virtually no experience, so I
can't tell what exactly went wrong.
At first it appeared that the software loaded correctly, it seemed
like I was able to install R , and I even successfully unpacked
the
2008 Nov 09
1
choice of an HMM package
We are trying to build a human respiration model.
Preliminary analysis of some breathing signals has shown that humans breathe
through switching among
a finite number of patterns.
Hidden Markov seems to be the right approach. Since most of our code is
written in R scripting language, finding an R package implementing an HMM
that we can use for our prototype would be very helpful.
I have been
2008 Mar 07
1
Re action Time and Time Series Analysis
Dear,
I need to analyse reaction time.
The general idea might be described as this: There are 8x8 circles. My
program light a circle at one time. The subject then click the lighted
circled as fast as possible. After the correct circle is clicked, then the
next circle will be lighted for the subject to click on, and so on.
My questions are:
1. May I use Time Series Analysis? I read that Time
2008 Mar 08
1
R cmd check error reg namespace
Hi,
When running R CMD check I'm getting a number of errors that I don't
quite follow and don't know where to start looking for an answer, any
hints appreciated.
R CMD check trunk
* checking for working latex ... OK
* using log directory '/Users/ivisser/Documents/projects/
depmixProject/depmixNew/rforge/depmix/trunk.Rcheck'
* using R version 2.6.2 (2008-02-08)
* checking
2007 Nov 06
4
C++ and R interface
Hi All,
I am trying to do an ML estimation in R. My likelihood function has
several nested loops and so it takes a lot of time (days when I use the
genetic algorithm for optimization) for the optimization to finish.
Unable to avoid loops, I am thinking of writing the likelihood function
in C++ and calling it from within R when using *optim()*. I found that
one can call C functions (once they have
2007 Nov 28
4
Replacing values job
Hallo,
I have two vectors of different lengths which contain the same set of
values:
X < -c(2,6,1,7,4,3,5)
Y <- c(1,1,6,4,6,1,4,1,2,3,6,6,1,2,4,4,5,4,1,7,6,6,4,4,7,1,2)
How can I replace the values in Y with the index (!) of the corresponding
values in X. So 2 appears in X in the first coordinate, so all 2’s in Y
should be replaced by 1, etc.
Thank you for your help,
Serguei
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
2008 May 09
2
K-Means Clustering
Hello,
I am hoping you can help me with a question concerning kmeans clustering
in R. I am working with the following data-set (abbreviated):
BMW Ford Infiniti Jeep Lexus Chrysler Mercedes Saab Porsche
Volvo
[1,] 6 8 2 8 4 5 4 4 7 7
[2,] 8 7 4 6 4 1 6 7 8 5
[3,] 8 2 4
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