On Thu, 25 Aug 2005, Anna Oganyan wrote:
Hello,
I am quite new in R, and I have one problem:
I have large d-dimensional data sets (d=2, 3, 6, 10). I would like to
divide the d-dim space into n (n may be 10, but better some larger
number, for example 20) equally sized d-dim hypercubes and
See also the book MASS, the one fitdistr supports.
On Thu, 25 Aug 2005, Luis Gracia wrote:
Hi again,
self-answered. I took a breath and started another google search, this
time more successful. I found the following packages in case somebody
has the same question:
nor1mix
wle
mixdist
You will need to tell us of _what_ you want the covariance matrix and what
you mean by the `null hypothesis': coxph does estimation, not testing.
If you want the covariance matrix of the parameter estimates, see vcov(),
which has a coxph method.
On Thu, 25 Aug 2005, Devarajan, Karthik wrote:
Don == Don MacQueen [EMAIL PROTECTED]
on Thu, 25 Aug 2005 08:11:42 -0700 writes:
Don Also, for the three dimensional graphic,
Don help.search(3d)
Don will lead to a reference to the cloud() function in the lattice
package.
Don I don't remember if the lattice package is
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Hi netters,
I want to learn a decision tree from a series of instances (learning data).
The packages
tree or rpart can do this quite well, but the scoring functions (splitting
criteria) are
fixed in these packages, like gini or something. However, I'm going to use
another scoring
function.
Hello,
You have access to the C code of the function in the *source* of the
package. You can modify it and recompile the package and function (its
better then to give a different name!).
Best,
Philippe Grosjean
..°}))
) ) ) ) )
( ( ( ( (
Hi,
I will explain my problem with this example:
library(randomForest)
# load the iris plant data set
dataset - iris
numberarray - array(1:nrow(dataset), nrow(dataset),
1)
# include only instances with Species = setosa or
virginica
indices - t(numberarray[(dataset$Species == setosa
|
Hi
PLEASE do read the posting guide!
**
On 25 Aug 2005 at 20:28, A Mani wrote:
Hello,
Is it safe to use tapply when the result will be of dim 2
x 1 or more ? In my PC R crashes.
or gave you an error message?
I tried this
Deepayan Sarkar wrote:
On 8/25/05, ernesto [EMAIL PROTECTED] wrote:
Hi,
I'm trying to understand the code of lattice functions so that I can
write some S4 methods using lattice. The following code is a snipet of
dotplot that is reused in several other functions. I don't understand
why this
On Fri, 2005-08-26 at 18:15 +1000, Stephen Choularton wrote:
Hi
I am trying to do this:
I get no syntax error on R 2.1.1-patched. I do get an error though:
Error in chisq.test(c(11, 13, 12, 18, 21, 43, 15, 12, 9, 10, 5, 28,
22, :
probabilities must sum to 1.
Which leads us to
Hi
I am trying to do this:
chisq.test(c(11, 13, 12, 18, 21, 43, 15, 12, 9, 10, 5, 28, 22, 11, 15,
11, 18, 28, 16, 8, 15, 19, 44, 18, 11, 23, 15, 23, 2, 5, 4, 14, 3, 22,
9, 0, 6, 19, 15, 32, 3, 16, 14, 10, 24, 16, 24, 31, 29, 28, 16, 26, 11,
11, 4, 17, 16, 13, 20, 26, 16, 19, 34, 19, 17, 14,
Deepayan Sarkar wrote:
On 8/24/05, ernesto [EMAIL PROTECTED] wrote:
Hi,
I'm trying to develop an histogram method for a class called FLQuant
which is used by the package FLCore (http://flr-project.org). FLQuant is
an extension to array. There is an as.data.frame method that coerces
flquant
I was wandering if anyone cold advise me on a good algorithm to turn a set of
data from its original for into its cumulative form. I have written a piece
of code that takes the data and does essentially what a histogram function
would do, except add to the new bin the sum in the previous bin.
On 26-Aug-05 Stephen Choularton wrote:
Hi
I am trying to do this:
chisq.test(c(11, 13, 12, 18, 21, 43, 15, 12, 9, 10, 5, 28, 22, 11, 15,
[...]
7, 54, 34, 92, 27, 24, 19, 13, 16, 22, 18, 15, 19, 17, 31, 14, 32),
p=c(0.0016, 0.002752, 0.001728, 0.0016, 0.001792, 0.005953, 0.006081,
Will ?cumsum help?
Sean
On 8/26/05 5:15 AM, Mark Miller [EMAIL PROTECTED] wrote:
I was wandering if anyone cold advise me on a good algorithm to turn a set of
data from its original for into its cumulative form. I have written a piece
of code that takes the data and does essentially what a
Please do study the packages you mention a great deal more carefully
before posting such negative remarks about them.
In particular, rpart is already fully user-extensible (and comes with a
worked example), and both packages are supplied in source code on CRAN.
On Fri, 26 Aug 2005, zhihua li
Hello,
I use lda (package: MASS) to obtain a lda object, then want to employ
this object to do the prediction for the new data like below:
predict(object, newdata, dimen=1, method=c(plug-in, predictive, debiased))
What is the exact difference among the three methods? What is the
difference of
Insightful are now taking bookings for the Advanced Time Series Modelling
course to be held at Carlton Terrace in London SW1 on 20th September.
Advanced workshop
Extract for Financial Time Series Modelling : The Advanced Time Series Course
focuses on the most up to date theory and its
On Fri, 26 Aug 2005, Shengzhe Wu wrote:
I use lda (package: MASS) to obtain a lda object, then want to employ
this object to do the prediction for the new data like below:
predict(object, newdata, dimen=1, method=c(plug-in, predictive,
debiased))
That is not how you call it: when a
Hi,
I want to compute the quantiles of Chi^2 distributions with different
degrees of freedom like
x-cbind(0.005, 0.010, 0.025, 0.05, 0.1, 0.5, 0.9, 0.95, 0.975, 0.99, 0.995)
df-rbind(1:100)
m-qchisq(x,df)
and hoped to get back a length(df) times length(x) matrix with the
quantiles. Since
Thanks for your reply. Actually I called function as below.
p1 = predict(object, newdata, dimen=1)
p2 = predict(object, newdata, dimen=1, method=debiased)
p3 = predict(object, newdata, dimen=1, method=predictive)
The MAP classification of prediction results by any method are the
same. I know
On Fri, 26 Aug 2005 14:44:10 +0200 Sigbert Klinke wrote:
Hi,
I want to compute the quantiles of Chi^2 distributions with different
degrees of freedom like
x-cbind(0.005, 0.010, 0.025, 0.05, 0.1, 0.5, 0.9, 0.95, 0.975, 0.99,
0.995) df-rbind(1:100)
m-qchisq(x,df)
and hoped to get back
On Fri, 2005-08-26 at 14:44 +0200, Sigbert Klinke wrote:
Hi,
I want to compute the quantiles of Chi^2 distributions with different
degrees of freedom like
x-cbind(0.005, 0.010, 0.025, 0.05, 0.1, 0.5, 0.9, 0.95, 0.975, 0.99, 0.995)
df-rbind(1:100)
m-qchisq(x,df)
and hoped to get back
On Fri, 26 Aug 2005, Shengzhe Wu wrote:
Thanks for your reply. Actually I called function as below.
p1 = predict(object, newdata, dimen=1)
p2 = predict(object, newdata, dimen=1, method=debiased)
p3 = predict(object, newdata, dimen=1, method=predictive)
So why did you say something
I believe that the following is what you want:
x - c(0.005, 0.010, 0.025, 0.05, 0.1, 0.5, 0.9, 0.95, 0.975, 0.99, 0.995)
dof - 1:100
ans - outer(x, dof, qchisq)
dimnames(ans) - list(x, dof)
Note that 'df' is not a very auspicious name for an object since
it is the name of a function.
Patrick
I compared posterior of these three prediction results, they are a
little different.
The book you mentioned should be Modern Applied Statistics with S.
4th edition. But this book has been borrowed out from our univeristy
library by someone else, and I have checked the book Pattern
Recognition and
On Fri, 26 Aug 2005, Shengzhe Wu wrote:
I compared posterior of these three prediction results, they are a
little different.
The book you mentioned should be Modern Applied Statistics with S.
4th edition. But this book has been borrowed out from our univeristy
library by someone else,
So
On Thu, 25 Aug 2005, Devarajan, Karthik wrote:
Hello
I am fitting a Cox PH model using the function coxph(). Does anyone know how
to obtain the estimate of the covariance matrix under the null hypothesis.
The function coxph.detail() does not seem to be useful for this purpose.
You can
Dear R helpers,
For me ( i.e. R 2.1.1 on Mac OS X), using trellis.device
(postscript, onefile = F, etc ... with the lattice library within a R
function works fine to obtain the desired graph as an EPS file ,
provided that :
1) the command dev.off() is not included in this function
Marc Schwartz [EMAIL PROTECTED] writes:
x - c(0.005, 0.010, 0.025, 0.05, 0.1, 0.5, 0.9,
0.95, 0.975, 0.99, 0.995)
df - c(1:100)
mat - sapply(x, qchisq, df)
dim(mat)
[1] 100 11
str(mat)
num [1:100, 1:11] 3.93e-05 1.00e-02 7.17e-02 2.07e-01 4.12e-01 ...
outer() is
I suspect you have not print()-ed your graphics, see FAQ Q7.22.
It is then possible to include dev.off() within the function. E.g.
testit - function(fn = test.eps)
{
trellis.device(postscript, file=fn, onefile = FALSE, horizontal=FALSE)
print(stripplot(voice.part ~ jitter(height), data =
Hi everyone,
According to R reference manual, the nnet function uses the BFGS method
of optim to optimize the neural network parameters.
I would like, when calling the function nnet to tell the optim function
not to produce the tracing information on the progress of the
optimization, or at least
To get nice looking plots you can use trellis plots from the lattice
package. First you need:
library(lattice)
Then you can define a custom panel function that will overlay the
fitted curve on top of the data points in a different color (you just
need to do this once; the fit you want plotted
Hello,
I'm posting this to receive some comments/hints about a rather statistical than
R-technical question ... .
In an anova of a lme factor SSPos11 shows up non-significant, but in the t-test
of the summay 2 of the 4 levels (one for constrast) are significant. See below
for some truncated
On Fri, 2005-08-26 at 15:25 +0200, Peter Dalgaard wrote:
Marc Schwartz [EMAIL PROTECTED] writes:
x - c(0.005, 0.010, 0.025, 0.05, 0.1, 0.5, 0.9,
0.95, 0.975, 0.99, 0.995)
df - c(1:100)
mat - sapply(x, qchisq, df)
dim(mat)
[1] 100 11
str(mat)
num [1:100,
On Fri, 26 Aug 2005, Tarca, Adi wrote:
Hi everyone,
According to R reference manual, the nnet function uses the BFGS method
of optim to optimize the neural network parameters.
What the help page says is
...: arguments passed to or from other methods.
That means methods of nnet().
Hi,
Since I've had no replies on my previous post about my
problem I am posting it again in the hope someone
notice it. The problem is that the randomForest
function doesn't take datasets which has instances
only containing a subset of all the classes. So the
dataset with instances that either
Try profiling. Doing this many times to get an overview, e.g. for sapply
with df=1:1000:
% self% total
self secondstotalsecondsname
98.26 6.78 98.26 6.78 FUN
0.58 0.04 0.58 0.04 unlist
0.29 0.02
Dear Mark,
For that matter, the loop isn't a whole a slower (on my 3GHz Win XP system):
x - c(0.005, 0.010, 0.025, 0.05, 0.1, 0.5, 0.9, 0.95, 0.975, 0.99, 0.995)
df - 1:1000
system.time(mat - sapply(x, qchisq, df), gcFirst = TRUE)
[1] 0.08 0.00 0.08 NA NA
mat - matrix(0, 1000, 11)
Prof. Ripley,
Excellent point. Neither sapply() nor outer() are the elephant in the
room in this situation.
On Fri, 2005-08-26 at 16:55 +0100, Prof Brian Ripley wrote:
Try profiling. Doing this many times to get an overview, e.g. for sapply
with df=1:1000:
% self%
Dear all
I have a problem with splitting up a data frame called ReVerb:
» str(ReVerb)
`data.frame': 92713 obs. of 16 variables:
$ CHILD: Factor w/ 7 levels ABE,ADA,EVE,..: 1 1 1 1 1 1 1 1 1 1 ...
$ AGE : Factor w/ 484 levels 1;06.00,1;06.16,..: 43 43 43 99 99 99 99
99 99 99 ...
$
Look at ?[.factor:
finaldataset$Species - finaldataset$Species[,drop=TRUE]
solves this.
On Fri, 26 Aug 2005, Martin Lam wrote:
Hi,
Since I've had no replies on my previous post about my
problem I am posting it again in the hope someone
notice it. The problem is that the
On 8/26/05, Marc Schwartz (via MN) [EMAIL PROTECTED] wrote:
On Fri, 2005-08-26 at 15:25 +0200, Peter Dalgaard wrote:
Marc Schwartz [EMAIL PROTECTED] writes:
x - c(0.005, 0.010, 0.025, 0.05, 0.1, 0.5, 0.9,
0.95, 0.975, 0.99, 0.995)
df - c(1:100)
mat - sapply(x, qchisq,
Stefan Th. Gries [EMAIL PROTECTED] writes:
Dear all
I have a problem with splitting up a data frame called ReVerb:
» str(ReVerb)
`data.frame': 92713 obs. of 16 variables:
$ CHILD: Factor w/ 7 levels ABE,ADA,EVE,..: 1 1 1 1 1 1 1 1 1 1 ...
$ AGE : Factor w/ 484 levels
I'm working through the examples in Venables and Ripley in the 'New-style
Classes' chapter.
On a call to representation, in the lda example, it is unable to find the
class named.
Is the class named defined anywhere? I've loaded the library methods but
this hasn't helped.
Phineas Campbell
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
Hello,
Easy ways to unpaste?
xp - paste(x2, x3) # x2, x3 are two non-numeric columns.
.
.
xfg - data.frame(xp,sc1, sc2, sc3) # sc1,sc2, sc3 are numeric cols.
I want xp to be split up to form a new dataframe of the form (x3, sc1,
sc2, sc3).
IMPORTANT
Dear R-help,
Would it be appropriate to do the following to
calculate a p-value for the difference between c-ind
of x1 and c-inx of x2 using the output from
rcorrp.senc()
r-rcorrp.senc(x1,x1,y)
pValue-1-pnorm((r[11]-r[12])/(r[2]/r[5])*1.96)
Osman O. Al-Radi, MD, MSc, FRCSC
Chief Resident,
Osman Al-Radi wrote:
Dear R-help,
Would it be appropriate to do the following to
calculate a p-value for the difference between c-ind
of x1 and c-inx of x2 using the output from
rcorrp.senc()
r-rcorrp.senc(x1,x1,y)
pValue-1-pnorm((r[11]-r[12])/(r[2]/r[5])*1.96)
Osman O.
Are there NAs in the variable?
SYNTAX==Ditrans and SYNTAX!=Ditrans are not mutually exclusive.
On Fri, 26 Aug 2005, Stefan Th. Gries wrote:
Dear all
I have a problem with splitting up a data frame called ReVerb:
» str(ReVerb)
`data.frame': 92713 obs. of 16 variables:
$ CHILD: Factor
That is one of the S4 vs R differences. See the complements.
On Fri, 26 Aug 2005, Phineas Campbell wrote:
I'm working through the examples in Venables and Ripley in the 'New-style
Classes' chapter.
On a call to representation, in the lda example, it is unable to find the
class named.
Is
On Fri, 26 Aug 2005, Luwis Tapiwa Diya wrote:
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
Thank you for this and earlier help Mr. Ripley.
Martin
--- Prof Brian Ripley [EMAIL PROTECTED] wrote:
Look at ?[.factor:
finaldataset$Species -
finaldataset$Species[,drop=TRUE]
solves this.
On Fri, 26 Aug 2005, Martin Lam wrote:
Hi,
Since I've had no replies on my
Hi, I am sorry for this question, but I am trying to speed up an
application
I will need to fit many x-y data sets (input from text files) to
4-parameter Pseudo-Voigt peak function.
Until now I used SigmaPlot macro to do it (enclosed just in case...)
peaksign(q) = if(total(q)q[1], 1, -1)
On Fri, 2005-08-26 at 22:39 +0530, A Mani wrote:
Hello,
Easy ways to unpaste?
xp - paste(x2, x3) # x2, x3 are two non-numeric columns.
.
.
xfg - data.frame(xp,sc1, sc2, sc3) # sc1,sc2, sc3 are numeric cols.
I want xp to be split up to form a
What is the quickest way to create many categorical variables
(factors) from continuous variables?
This is the approach that I have used:
# create sample data
N - 20
x - runif(N,0,1)
# setup ranges to define categories
x.a - (x = 0.0) (x 0.4)
x.b - (x = 0.4) (x 0.5)
x.c - (x = 0.5) (x
?cut
-- Bert Gunter
Genentech Non-Clinical Statistics
South San Francisco, CA
The business of the statistician is to catalyze the scientific learning
process. - George E. P. Box
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David James
?cut
This is in `An Introduction to R', the manual which ships with R and basic
reading.
On Fri, 26 Aug 2005, David James wrote:
What is the quickest way to create many categorical variables
(factors) from continuous variables?
This is the approach that I have used:
# create sample data
On 8/26/05, A Mani [EMAIL PROTECTED] wrote:
Hello,
Easy ways to unpaste?
xp - paste(x2, x3) # x2, x3 are two non-numeric columns.
.
.
xfg - data.frame(xp,sc1, sc2, sc3) # sc1,sc2, sc3 are numeric cols.
I want xp to be split up to form a new
I create a zooreg object that runs from Jan-1-2002 0:00 to Jun-1-2005
0:00...
regts.start = ISOdatetime(2002, 1, 1, hour=0, min=0, sec=0, tz=)
regts.end = ISOdatetime(2005, 6, 1, hour=0, min=0, sec=0, tz=)
regts.zoo - zooreg( NA, regts.start, regts.end, deltat=3600 )
Upon inspection:
I'm new in both R and statistics. I did my homework,
I tried the archives and whatever I managed to get
from the sources, but still I need assistance with
the plsr package.
I have a model with 2 core determinants D1 and D2,
made by 3 indicators each (D1a,D1b,D1c and so on).
Also I have 2
Thanks for everyone's help with zoo -- I think I've got my data set
ready. (The data consists of surface weather temperatures, from 2002
to 2005, one observation per hour. Some values are missing... i.e. NA)
I have three goals:
GOAL #1:Get the data in proper time series form, preserving
I have not seen a reply to this, so I will offer a few comments.
1. I haven't used lrm, but I assume you are referring to the copy
in the Design package; I surmised that from reviewing
RSiteSearch(lrm).
2. I installed Design and learned that I also needed
On 8/26/05, David James [EMAIL PROTECTED] wrote:
Thanks for everyone's help with zoo -- I think I've got my data set
ready. (The data consists of surface weather temperatures, from 2002
to 2005, one observation per hour. Some values are missing... i.e. NA)
I have three goals:
GOAL #1:Get
I have the following two mapping data frames (r) and (h). I want to
fill teh value of r$seid with the value of r$seid where r$cid==h$cid.
I can do it with sapply as such:
r$seid = sapply(r$cid, function(cid) h[h$cid==cid,]$seid)
Is ther a better (faster) way to do this?
r -
I don't know if its faster but you could try timing this to find out:
r$seid - merge(h, r, by = cid)[,2]
On 8/27/05, Omar Lakkis [EMAIL PROTECTED] wrote:
I have the following two mapping data frames (r) and (h). I want to
fill teh value of r$seid with the value of r$seid where r$cid==h$cid.
67 matches
Mail list logo