Hello,
I have just completed first experiments in using R, especially creating and
using ARIMA models, e.g.
# create a model as in example(arima)
fit - arima(USAccDeaths, order = c(1,1,1),seasonal = list(order=c(1,1,1)))
# use the model to generate a prediction
dp-predict(fit, n.ahead = 24)
Having experimented with both a sun workstation and a PC, changing
pointsize within the PC does have the desired effect, but it does nothing
within the Sun.
Unforutnately, the PC won't let me load the workspace I want (which
I normally access through the sun) due to `lazy loading' errors.
Is there a way to fit mixed proportional odds models in R?
--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
R-help,
I'm using a function whose end result is a trellis plot.
When I call the function I get sometimes the following message:
Note: The default device has been opened to honour attempt to modify
trellis settings
leading up to any plot whatsoever.
I call the package 'lattice' within the
Robert Pollak robert.pollak at scietec.at writes:
:
: Hello,
:
: I have just completed first experiments in using R, especially creating and
: using ARIMA models, e.g.
:
: # create a model as in example(arima)
: fit - arima(USAccDeaths, order = c(1,1,1),seasonal = list(order=c(1,1,1)))
:
: #
Luis Ridao Cruz wrote on 3/16/2005 5:16 AM:
R-help,
I'm using a function whose end result is a trellis plot.
When I call the function I get sometimes the following message:
Note: The default device has been opened to honour attempt to modify
trellis settings
leading up to any plot whatsoever.
I
Well, one way you can try is to define the different styles you want in
your $HOME/.Rprofile file (see ?Startup). For example
---
library(graphics)
op - par(no.readonly = TRUE) # store original par
par0 -
Insightful are now taking bookings for the Financial Time Series Modelling
course to be held at Carlton Terrace in London SW1 on 12th and 13th April
2005. We are also pleased to offer the 1 day Advanced Time Series Modelling
course on April 19th at the same location.
Extract for Financial Time
Adaikalavan Ramasamy wrote:
Well, one way you can try is to define the different styles you want in
your $HOME/.Rprofile file (see ?Startup). For example
---
library(graphics)
op - par(no.readonly = TRUE) #
Zoran Loncarevic wrote:
Is there a way to fit mixed proportional odds models in R?
As far as I know, no. (anyway have a look to J Lindsey's packages, I
don't know)
However MIXOR and friends at http://tigger.uic.edu/~hedeker/mix.html
(standalone programs running on Windows systems ) can fit mixed
All,
I am using the tcltk package (under macos 10.3.8, running R from ESS, R
2.0.0). I am using tcltk libraries from fink:
i tcltk 8.4.1-12
Tool Command Language and the Tk toolkit
i tcltk-dev
--- Rau, Roland [EMAIL PROTECTED] wrote:
-Original Message-
From: r-help
On Behalf Of bogdan romocea
Sent: Tuesday, March 15, 2005 2:49 PM
I would suggest that you consider another GNU/Linux distribution,
I don't think it is necessary. Mandrake 10.1 is fine for
running
If anyone is interested, I found out that something (Access or ODBC?) didn't
like the column name 'Left', after changing it to something else, both
sqlSave and sqlUpdate are working as expected.
Thanks to those that replied.
Matthew Nash,
Post-Doctoral Research Worker,
GENDEP study,
SGDP,
SAULEAU Erik-André schrieb:
Why not just ts.plot(USAccDeaths, dp$pred) ?
Because I did not look at help.search(time series) hard enough :)
Thank you for your help!
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
I'm running R-2.0.0-1mdk.i586.rpm under Mandrake 10.1 without problem.
I know that there is a problem of dependency with other packages.
Try that from a shell (eg: Konsole):
cd path_to_your_R_rpm
su
urpmi info-4.7-2.mdk
rpm -i R-2.0.0-1mdk.i586.rpm
Just a remark: While encountering problems
ODBC also doesn't like the name 'index' for a column name. It also
doesn't like any '.' periods in the column name. You can use a name
like 'from' as a column name, but then when you query it you have to
put [] around it because from is a sql key word. Most of these issues
are sql issues rather
Hi
just now I had an apparently insurmountable problem
that's been bugging me for days, but phrasing my question in a form
suitable for the R-help list enabled me to solve my own problem
in two minutes flat.
thanks everyone.
--
Robin Hankin
Uncertainty Analyst
Southampton Oceanography Centre
On Tue, 15 Mar 2005, Liaw, Andy wrote:
From: Adaikalavan Ramasamy
You will need to _apply_ the t-test row by row.
apply( genes, 1, function(x) t.test( x[1:2], x[3:4] )$p.value )
apply() is a C optimised version of for. Running the above code on a
dataset with 56000 rows and 4 columns took about
Hi netters.
Assume Y = {Y1,.Yn} and X = {X1..Xm}, where Yi and Xi are random
variables that can take on discrete values from V={0,1,2}.
Each Yi in Y has some (0-k) parent variables in X, which means given the
values of the parent variables (Xi0Xik) the values of Yi is set. Yi =
Dear All:
Could you please tell me how I can draw figure formatted like figure 4.18 of
MASS (4th) with the attached data set?
Thanks
Zhongming Yang
-
md idno month group
-0.090 521 0.00NN
-1.330 521 12.460274NN
Dear all,
I think that my question is very simple but I failed to solve it.
I have a list which elements are matrices like this:
mylist
[[1]]
[,1] [,2] [,3]
[1,]135
[2,]246
[[2]]
[,1] [,2] [,3]
[1,]79 11
[2,]8 10 12
I'd like to create a
Zhongming Yang wrote:
Dear All:
Could you please tell me how I can draw figure formatted like figure 4.18 of MASS (4th) with the attached data set?
The example is given on page 101.
Uwe Ligges
Thanks
Zhongming Yang
-
try this:
matSums - function(lis, na.rm=FALSE){
if(!is.list(lis) || !all(sapply(lis, is.matrix))) stop('lis' must
be a list containing 2-dimensional arrays)
dims - sapply(lis, dim)
n - dims[1, 1]
p - dims[2, 1]
if(!all(n == dims[1, ]) || !all(p == dims[2, ])) stop(the
matrices
Dear Zhongming,
By asking for the figure in the book you are restricting you question to
only the people that has the 4th edition. I would love to help you but
unfortunatelly I have the 3rd edition of MASS and there is no figure 4.18
since chapter 4 is Programming in S. Please give us an idea
Dear Vicky,
Actually, this question was asked before (about a year ago, I think).
Looping turns out to be not so bad a solution; check out the following
example (from a short-course that I taught):
--- snip
# to loop or not to loop?
# Example: summing a list of matrices
On Wed, 2005-03-16 at 18:21 +0200, Vicky Landsman wrote:
Dear all,
I think that my question is very simple but I failed to solve it.
I have a list which elements are matrices like this:
mylist
[[1]]
[,1] [,2] [,3]
[1,]135
[2,]246
[[2]]
[,1] [,2]
Vicky Landsman wrote on 3/16/2005 10:21 AM:
Dear all,
I think that my question is very simple but I failed to solve it.
I have a list which elements are matrices like this:
mylist
[[1]]
[,1] [,2] [,3]
[1,]135
[2,]246
[[2]]
[,1] [,2] [,3]
[1,]79 11
mylist - list( matrix(1:6, nc=3), matrix(7:12, nc=3) )
do.call(+, mylist)
[,1] [,2] [,3]
[1,]8 12 16
[2,] 10 14 18
Regards, Adai
On Wed, 2005-03-16 at 18:21 +0200, Vicky Landsman wrote:
Dear all,
I think that my question is very simple but I failed to solve it.
I have a
Dear Mark,
I believe that your solution won't work if there are more than two matrices
to sum.
Regards,
John
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox
Dear Francisco and All:
Following is the source code to create figure 4.18 from MASS (4th).
library(MASS)
library(lattice)
if(F) { # no data supplied
xyplot(ratio ~ scant | subject, data = A5,
xlab = scan interval (years),
ylab = ventricle/brain volume normalized to 1 at start,
On Wed, 16 Mar 2005, Adaikalavan Ramasamy wrote:
mylist - list( matrix(1:6, nc=3), matrix(7:12, nc=3) )
do.call(+, mylist)
[,1] [,2] [,3]
[1,]8 12 16
[2,] 10 14 18
Yes, but this works only when the list is of length 2, when
M-mylist[[1]]+mylist[[2]] seems preferable.
Vicky Landsman msvika at mscc.huji.ac.il writes:
:
: Dear all,
: I think that my question is very simple but I failed to solve it.
: I have a list which elements are matrices like this:
:
: mylist
: [[1]]
: [,1] [,2] [,3]
: [1,]135
: [2,]246
:
: [[2]]
:
John,
That is correct. I took the example perhaps too literally, depending
upon what Vicky requires. If indeed the data structure is comprised of
2 matrices, the approach using do.call() will not work.
Thanks for pointing that out. I see that Adai had a similar idea.
Best regards,
Marc
On
yes, but I think this works only if the list contains 2 matrices,
isn't it?
mylist - list(matrix(1:6, 2), matrix(7:12, 2), matrix(13:18, 2))
do.call(+, mylist)
Error in do.call(+, mylist) : operator needs one or two arguments
Best,
Dimitris
- Original Message -
From: Adaikalavan
Here's a slight variation:
lst - list(matrix(1:4, 2, 2), matrix(5:8, 2, 2), matrix(9:12, 2, 2))
m - matrix(0, 2, 2)
m[] - rowSums(do.call(cbind, lapply(lst, c)))
m
[,1] [,2]
[1,] 15 21
[2,] 18 24
This can probably be simplified even more with the `abind' package...
Andy
From:
Hi, Robin: Thanks. That's a great advertisement for
http://www.R-project.org/posting-guide.html;, which I might quote in
the future. spencer graves
Robin Hankin wrote:
Hi
just now I had an apparently insurmountable problem
that's been bugging me for days, but phrasing my question in a form
Dear All,
I am very new to R projects.May be i am wrong in some steps.I have given the
code which i tried for drawing 3d surface using persp.I need to label the axes
with scales
z - array(topnew2$V2, dim=c(600,2))
x - 10 * (1:nrow(z))
y - (1:ncol(z))
persp(x, y, z, theta = 30, phi =
Lakshmi Dhevi Baskar wrote on 3/16/2005 12:02 PM:
Dear All,
I am very new to R projects.May be i am wrong in some steps.I have given the code which i tried for drawing 3d surface using persp.I need to label the axes with scales
z - array(topnew2$V2, dim=c(600,2))
x - 10 * (1:nrow(z))
y -
Thanks to everyone who posted on this topic. I tried apply() as Ramasamy had
suggested and it took 40 seconds on my machine. The for loop however took over
4 minutes and i gave up. I am going to strip the t.test function and write it
as suggested by Andy. Hope that will be the quickest.
Once
Dear All,
I am very new to R projects.i would like to get some help regarding the graph
construction using persp.
May be i am wrong in some steps.I have given the commands which i tried for
drawing 3d surface using persp.I would like to label the axes using the scales.
z -
Hello,
I'm using a dataset with unequally spaced time series
and I'd want to know if there is in R some function in
order to calculate the autocorrelation function, because
acf() in stats package cannot calculate it, because I
have many missing data, and data are not equally spaced.
And if so, is
see packages zoo and its on cran.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 16, 2005 7:17 PM
To: r-help@stat.math.ethz.ch
Subject: [R] Time Series
Hello,
I'm using a dataset with unequally spaced time series
and I'd want to
On Wed, 16 Mar 2005 [EMAIL PROTECTED] wrote:
I'm using a dataset with unequally spaced time series
and I'd want to know if there is in R some function in
order to calculate the autocorrelation function, because
acf() in stats package cannot calculate it, because I
have many missing data, and data
Could somebody help with the definition of new correlation structure for use
with a linear mixed-effects model (package nlme). Specifically, I want to
define a Toeplitz type correlation structure, but due to my inexperience with
programming in R, I feel a bit overwhelmed with the task at
I've used the HDF5 library to bring some data into R. THe verbose output
looks like this:
hdf5load(hdfGraphWed_Mar_16_13_33_37_2005.hdf,load=T,verbosity=1,tidy=T)
Processing object: cprSeats .. which is a Group
Processing object: Seats 0 .. its a dataset..Finished dataset
Well, just for fun, and assuming we don't care about efficiency, we can also
use recursion (I don't think this was posted yet):
sumlist-function(mylist){
## warning -- arguments not checked
if(length(mylist)==2)mylist[[1]] + mylist[[2]]
else mylist[[1]]+ Recall(mylist[-1])
}
Note that this will
Is there a ready means to do mixture models of binned data in R?
I have a two dimensional grid of intensity values that represents many
individual observations that are known to have bivariate normal
distributions, although there is frequent overlap between the
distributions. There is also a
I am not sure of what you really want. Do you want one scatterplot with
'month' in the x axis and 'md' in the y axis, with a line joining each point
on the plot? Or you want a regression line with a diferent color for each
group? Or do you want them in 3 separate panels?
If you want one plot
On Wed, 16 Mar 2005, Cheng, Bu Qi wrote:
Hi,
We are working on R language compiler to find out the way to
improve the performance of R in multi core processor and the parallelism
in the workload of R. Where can I find the typical workload wrote by R?
Thanks!
Cheng, Buqi
There are several
Ups, one mistake! Change the second line of the code from library(lattice)
to attach(d), so you get:
d-read.table('clipboard', header = T)
attach(d)
plot(month,md, col = c('red','blue','black'), type='p')
lines(lowess(d[group=='NN',1]), col = 'red')
lines(lowess(d[group=='SN',1]), col = 'blue')
Hi,
if a striped down version of t.test is required for speed, before implementing
a rewrite I would check out the multtest Bioconductor package.
It takes a fraction of a second to do 56000 t-tests on a 2.4 Ghz PIV.
dim(X)
[1] 56000 4
pcols - 4
replicates - rep(0:1, each=2)
Dear all,
Is there exist a function which provides an OPG (outer product of the gradient)
estimate for variance - covariance matrix of the MLE? I tried to write my own
function but it produces significantly different results comparing with
empirical sd estimates computed from simulations and I
Dear R
I'm trying to do a correlation matrix for some variables I have.
Unfortunately there are some NA entries for some of the variables
I tried the following
cor(sleep[c(logbw, logbrw, SlowSleep, ParaSleep, loglife,
loggest)])
but it told me
Error in cor(sleep[c(logbw, logbrw, SlowSleep,
Brett Stansfield wrote on 3/16/2005 3:54 PM:
Dear R
I'm trying to do a correlation matrix for some variables I have.
Unfortunately there are some NA entries for some of the variables
I tried the following
cor(sleep[c(logbw, logbrw, SlowSleep, ParaSleep, loglife,
loggest)])
but it told me
Error
Dear list members,
How can I replace the nested for loops at then end of the script
below with more efficient code?
# Begin script__
# Dichotomous scores for 100 respondents on 3 items with
# probabilities of a correct response = .6, .4, and .7,
?cor revealed that the cor function has an argument use with
a default of all.obs and options of complete.obs' or
'pairwise.complete.obs. Either of these other two should get you past
this error message.
hope this helps.
spencer graves
p.s. As indicated by earlier remarks on
You may be able to simplify it further, but just by replacing the whole
inner-most loop with
opt.mat2[k,j] - mean(x.mat[kt == x.mat[, nc], j])
the computation is instantaneous on my 1.6GHz Pentium M laptop (whereas your
code took just over 7 seconds).
HTH,
Andy
From: Haynes, Maurice
Hello,
I have used prcomp and the variances for the first 3 PC's are 2.65,
1.97 and 0.38.
When I plot the principal component values for each data point I can see
that the points lie in a plane as one might expect from the variances.
But this plane is diagonal through the 3D space of the first
Hi,
I am using SVM from e1071 package. I can get decision values very easily. But
whenever, I try to get the probability measure, it returns NULL. I use the
following codes to generate decision.values and probability. Is there anything
wrong in it?
predictor-svm(train[,c(x1, x2, x3)],
Dear r-help,
Sleep-deprivation from having 2 youngsters under 2 around the house is
fuzzing my brain, so please be gentle if the answer to this query is obvious!
In the example below, I'm trying to use grid.rect to add grey rectangles to
the panels of a lattice plot to indicate which months
I apologize for posting on this question again, but unfortunately, I don't have
and can't get access to MASS for at least three weeks. I have found some code
on the web however which implements the prediction error algorithm in cv.glm.
On Wednesday 16 March 2005 18:48, Leon Barmuta wrote:
Dear r-help,
Sleep-deprivation from having 2 youngsters under 2 around the house
is fuzzing my brain, so please be gentle if the answer to this query
is obvious!
In the example below, I'm trying to use grid.rect to add grey
rectangles
Dear R
I recently created some variables in R as in I opened a data set and then
produced log base 10 transformations on some of the variables. When I ask R
to do a simple x, y plot it recognises the raw data but does not recognise
the log transformed variables. It says
plot(logbrw, ParaSleep,
I assume opened a data set means that you have attached a data
frame. If you add new variables to the data frame (e.g. by
transforming a variable in that data.frame), you will have to
detach() and re- attach() it in order to get access to the variables
without using the $ operator. I think
On Thu, 2005-03-17 at 14:43 +1100, Simon Blomberg wrote:
I assume opened a data set means that you have attached a data
frame. If you add new variables to the data frame (e.g. by
transforming a variable in that data.frame), you will have to
detach() and re- attach() it in order to get
On Wed, 16 Mar 2005 17:59:01 -0700
Trevor Wiens [EMAIL PROTECTED] wrote:
I apologize for posting on this question again, but unfortunately, I don't
have and can't get access to MASS for at least three weeks. I have found some
code on the web however which implements the prediction error
Dear people,
I've been trying to find a way to do the following.
I have a data set in text file with 3 columns and 2400 rows. i tried to read
the table as
fisrt-(ex.txt,header=FALSE)
I would like to read the third column values (which has 2400 value) and split
them into matrix of size
I'm not sure I am answereing your question, but here goes
# Create a vector with 2400 items
x - runif(2400)
# Create a 600 by 4 matrix
y - matrix(x,ncol = 4)
#If you needed the matrix to be done row by row
#y - matrix(x,ncol = 4,byrow = T)
# Extract values from a particular part of the matrix
type ?cor and read the help file
In particular read it till you find the entry that tells you how to deal with
missing observations. You need to do this because as you get more competent you
will undoubdtedly come across other issues, so learning the format of the help
and realising why you
Hi,
I am a compiler guy and not familiar with the most scientific
computation. We are doing research work on R language for multi core
processor. Would you like give me any suggestion on the typical
algorithms or solutions in most scientific computation area?
Such as: What are the
Hello,
I have data of the following form:
data - data.frame(type=c(c,d,e), size=c(10,20,30), count=c(20,10,5))
data
type size count
1c 1020
2d 2010
3e 30 5
I would like to compute the quantiles of size given the counts. For
instance, in this example, the
71 matches
Mail list logo