anuel Morales wrote:
As far as I can figure out, the problem with running LinBUGS on FC5 is
that support for linuxthreads was removed after being deprecated in FC4.
http://fedora.redhat.com/docs/release-notes/fc5/#id2887615
As a result, the LD_ASSUME_KERNEL workaround, which presumably
Anne S Jacobson wrote:
Hi,
I know there must be a way to do this, but I went through a couple 'Intro
to R' books and didn't see how to do this.
How do I move/copy objects from one work space to another? I have been
saving the objects I want to move/copy separately then load them into
Wuming Gong [EMAIL PROTECTED] writes:
Dear Peter,
$ uname -a
Linux bl3 2.6.15-1.1833_FC4smp #1 SMP Wed Mar 1 23:55:52 EST 2006
x86_64 x86_64 x86_64 GNU/Linux
When ./configure, I did not claim any options...
Wuming
Hm. Which are your compilers? I have (in etc/Makeconf).
AR = ar
Using runmean from caTools the first one below does
it in under 1 second but will not handle NAs. The
second one takes under 15 seconds and handles
them by replacing them with linear approximations.
Note that k must be odd.
# 1
library(caTools)
set.seed(1)
system.time({
y -
Hi !
There used to be a package called mle for maximum likelihood estimation. I
couldn't find it when I tried to get the package. Is this still available?
Perhaps under another package?
I'd appreciate any suggestion on this.
Alex
__
probably you're looking for function mle() in package stats4.
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax:
Hi
before I reinvent the wheel, has anyone coded up the Legendre symbol
(a/p)?
[
If p is an odd prime number and a is an integer, then the Legendre
symbol
(a/p) is:
* 0 if p divides a;
* 1 if a is a square modulo p — that is to say there exists an
integer k such that k^2 ≡ a
Hi
and you would better to give up thinking in for cycles as a good
tool for data manipulation and calculation.
R has usually functions for direct manipulation and calculation with
vectors or matrices, vhich are far more effective than calculation in
cycle.
I also recommend you to go
On Mon, 1 May 2006, Erich Neuwirth wrote:
I need to modify the function loess.smooth from package stats
to accept an additional weight parameter.
I found the places where I need to change things,
but there is a problem remaining (in R 2.2.1).
loess.smooth contains the call
fit -
When I compile cmpxblas.f under gfortran, I do not get a dependence on
z_abs, but I do when I compile it under g77.
So I think a mixture of compilers has been used here. z_abs is an entry
point in -lg2c not -lgfortran
On Mon, 1 May 2006, Peter Dalgaard wrote:
Wuming Gong [EMAIL
Hi Peter,
This is mine:
AR = ar
BLAS_LIBS =
C_VISIBILITY = -fvisibility=hidden
CC = gcc
CFLAGS = -g -O2 -std=gnu99
CPICFLAGS = -fpic
CPPFLAGS = -I/usr/local/include
CXX = g++
CXXCPP = g++ -E
CXXFLAGS = -g -O2
CXXPICFLAGS = -fpic
DYLIB_EXT = .so
DYLIB_LD = gcc
DYLIB_LDFLAGS = -shared
DYLIB_LINK =
No tabs are being echoed, so your cut/paste is removing the tabs.
What are you pasting from? (Not an R problem, of course.)
On Tue, 2 May 2006, Murray Jorgensen wrote:
The file TENSILE.DAT from the Hand et al Handbook of Small Data Sets
looks like this:
0.023 0.032 0.054 0.069 0.081
On Mon, 1 May 2006, Spencer Graves wrote:
As far as I know, the term deviance has no standard definition. A
good, fairly common definition (I think) is that the deviance is up to
[an additive] constant, minus twice the maximised log-likelihood. Where
sensible, the constant is chosen
Thank you very much. It rocks. And actually I
discovered that what really slow down the program is
return$vol.cap[[i]]=mean(VOL[(i-12):(i-1)],na.rm=TRUE)/return$cap[[i]]
If I took out this and my original code takes about 10
minutes and halt at the place where all NA shows up.
It seems R is
I think that Mozilla Thunderbird replaces tabs with blanks routinely.
I was actually pasting from Crimson Editor but results are identical
with Notepad and MS Word. However there is no problem when pasting from
WinEdt:
strength - scan()
1: 0.023 0.032 0.054 0.069 0.081 0.094
7:
Hi
I did not see any response so I try to express my opinion that the
behaviour is quite ok.
In your first example there is no NA level so clearly the only NA
stands for not available. However in your second example there is
NA as a level which stands for e.g. North America or New Account.
Sorry to bother you guys again. This is great. But
this is for 61 number and the second case will change
60 to 61. run* only accept odd number window. How
to get around it with 60? Any suggestion? Thanks.
--- Gabor Grothendieck [EMAIL PROTECTED]
wrote:
Using runmean from caTools the first
The file attachment I received had LF not CRLF line endings, but I think I
have guessed what is happening here.
It works from Emacs if you paste into Rterm by not if you paste into Rgui,
as the latter ignores tabs on input. The way to do it in Rgui is
scan(clipboard)
More generally, pasting
Hi,
Is there a way to define + so that a+b returns ab ?
setMethod(+,c(character,character),paste)
Error in setMethod(+, c(character, character), paste) :
the method for function '+' and signature e1=character,
e2=character is sealed and cannot be re-defined
a+b
Error in a + b :
Not easily. There's a comment in ?Ops that for efficiency the group
generics only dispatch on objects with a class attribute: otherwise you
could use an S3 method like
`+.character` - function(e1, e2) paste(e1,e2, sep=)
S4 methods are built on top of S3 methods as far as internal dispatch is
Thanks for the information. By 'not easily' it sounds like it is possible,
but how? I'm happy to allow 'errors' like 2+3=23, is that what an
erroneous use could be?
I tried the following, given the info in your reply, which works. But is
there a way to allow a+b=ab?
x = a
`+.character` -
--- Gabor Grothendieck [EMAIL PROTECTED]
wrote:
Here are a few alternatives:
replace(a, is.na(a), 0) + b
ifelse(is.na(a), 0, a) + b
mapply(sum, a, b, MoreArgs = list(na.rm = TRUE))
Excellent, thanks Gabor. I have gotten some great
answers. I had been thinking of using an ifelse but
On Tue, 2 May 2006, Matthew Dowle wrote:
Thanks for the information. By 'not easily' it sounds like it is possible,
but how?
Change the C code. R is Open Source, so anything is possible.
I'm happy to allow 'errors' like 2+3=23, is that what an
erroneous use could be?
2 + x, for example,
Dear R users,
I would like to announce a new package connectedness on CRAN.
connectedness can be used to identify disconnected sets. It contains
functions to find, plot and subset disconnected sets in a two-way
classification without interaction.
Please do not hesitate to contact me, if you find
I want to compute a new variable (newvar) based on the values of two other
variables (t1freq, t2freq).The two variables (t1freq,t2freq) are contained
in a dataframe - study1dat - read.csv(c:\\study1rb.csv,header=T) .
I gather this computation can be done using Apply and I have run the
Ok, thanks for clarifying.
-Original Message-
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
Sent: 02 May 2006 12:51
To: Matthew Dowle
Cc: 'r-help@stat.math.ethz.ch'
Subject: RE: [R] a+b
On Tue, 2 May 2006, Matthew Dowle wrote:
Thanks for the information. By 'not
Try
runmean2 - function(x, k) # k must be even
(coredata(runmean(x, k-1)) * (k-1) +
coredata(lag(x, -k/2, na.pad = TRUE)))/k
Also, in your code use matrices or vectors instead of data frames
to avoid any overhead in using data frames.
On 5/2/06,
Hi,
I am getting following error messages while using SciViews R. It displays a
message saying: Package or Bundle Rcmdr was not found in
C:\Software\R-22.1.1\Library would you like to install now?. However the Rcmdr
package is there in the library. I reinstalled Rcmdr but still gives me
I'm trying to estimate/fit a multivariate t distribution, setting the
skew/shape parameter vector Alpha[8,1] to 1, but to no avail. The 'freq'
option seems only to be for and n x 1 vector of weights, while I need
one for each of 8 margins in the distribution. None of the options from
the
Hi,
I am using parnor function of lmomco package. I believe it provides mean and
std. dev for the set of data. But the std. dev provided does not match with the
actual std. dev of the data which is 247.9193 (using sd function). Am I
missing something here?
lmr -
June 6-7, 2006, Utrecht University, The Netherlands:
Course on Generalized Additive Models for Location, Scale and Shape
(GAMLSS) using R given by the authors, R. A. Rigby en D. M.
Stasinopoulos of the recently published read paper in Applied Statistics
(2005, 54, Part 3,
1-38).
GAMLSS
Hi, all. I'm trying to automate some regression operations in R but am
confused about how to evaluate expressoins that are expressed as
character strings. For example:
y - ifelse (rnorm(10)0, 1, 0)
sex - rnorm(10)
age - rnorm(10)
test - as.data.frame (cbind (y, sex, age))
# this works fine:
Dear Prof. Ripley:
comments in line
Prof Brian Ripley wrote:
On Mon, 1 May 2006, Spencer Graves wrote:
snip
McCullagh Nelder (1989) would be the authorative reference, but the
1982 first edition manages to use 'deviance' in three separate senses on
one page. In particular, what you are
I haven't seen any replies to your post, and I know nothing
about copula. In case you are still interested in help with this, I
will offer a few suggestions / questions. First, have you reviewed the
posting guide! www.R-project.org/posting-guide.html? I believe that
the process
Try this:
e - expression(glm(y ~ age))
eval(e)
or this:
chr - glm(y ~ age)
eval(parse(text = chr))
On 5/2/06, Andrew Gelman [EMAIL PROTECTED] wrote:
Hi, all. I'm trying to automate some regression operations in R but am
confused about how to evaluate expressoins that are expressed as
Here are a few alternatives:
replace(a, is.na(a), 0) + b
ifelse(is.na(a), 0, a) + b
mapply(sum, a, b, MoreArgs = list(na.rm = TRUE))
Well, Gabor, if you want to get fancy...
evalq({a[is.na(a)]-0;a})+b
(and variants...)
Cheers,
Bert
__
in this case you need, something like:
eval(parse(text = expr))
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web:
Library gmodels include a function CrossTable that is useful for
crosstabulation. In the help, it is indicated that one can call this
function as CrossTable(data), were data is a matrix. However, when I try
to use this option, it doesn't help. Any idea? Is there a bug?
Thanks for your help.
On Tue, 2006-05-02 at 17:21 +0200, Albert Sorribas wrote:
Library gmodels include a function CrossTable that is useful for
crosstabulation. In the help, it is indicated that one can call this
function as CrossTable(data), were data is a matrix. However, when I try
to use this option, it
Dear Deepayan,
Thank you that works very well. What reading material do you recommend
to learn the lattice library?
thanks again,
Osman
On 5/2/06, Deepayan Sarkar [EMAIL PROTECTED] wrote:
On 5/1/06, Osman Al-Radi [EMAIL PROTECTED] wrote:
thank your help, here is a simulated data set
I cannot find a way to apply custom axis tick label text. Is there a way?
__
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
(comments in line)
Laurent Fanchon wrote:
Dear R-gurus,
I have an interpretation problem regarding lme models.
I am currently working on dog locomotion, particularly on some variation
factors.
I try to figure out which limb out of 2 generated more dispersed data.
I record a value
(apologies if this appears twice; I had some mail posting issues)
I think %any-symbol% defines a binary operator, so
%+% - function(x,y) paste(x,y,sep=)
a %+% b
[1] ab
or for more fun
setGeneric(%+%, function(x,y) standardGeneric(%+%))
[1] %+%
setMethod(%+%, signature(x=character,
Hello,
Could someone give me a hint about what might be the difference between running
urppTest
with Z-alpha and Z-tau in type=c(Z-alpha, Z-tau)?
Is this the underlying equation:
delta_y(t) = mu + tau*timetrend+(1-rho)*y(t-1) + alpha_1*delta_y(t-1) + ... +
alpha_k*delta_y(t-k) + error term ?
--- Berton Gunter [EMAIL PROTECTED] wrote:
Here are a few alternatives:
replace(a, is.na(a), 0) + b
ifelse(is.na(a), 0, a) + b
mapply(sum, a, b, MoreArgs = list(na.rm = TRUE))
Well, Gabor, if you want to get fancy...
evalq({a[is.na(a)]-0;a})+b
It's going into my
On 5/2/06, Osman Al-Radi [EMAIL PROTECTED] wrote:
Dear Deepayan,
Thank you that works very well. What reading material do you recommend
to learn the lattice library?
[package, not library]
?lattice would be a good start, in the sense that it has references to
further material. My suggestion
plot(1:10,axes=FALSE)
axis(1,at=1:10,labels=10:1)
axis(2,at=1:10,labels=5*10:1)
box()
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Christopher Brown
Sent: Tuesday, May 02, 2006 12:13 PM
To: r-help@stat.math.ethz.ch
Subject: [R] Axis labels
I
I would like to write atom% 15N in the ylab of a plot - 15 should be
written as superscript. How do I put % into the expression? It does
not work if I type % directly after atom in the expression below.
plot(1:10, ylab = expression(atom^15*N))
Best regards,
Thomas Larsen
[[alternative
bogdan romocea wrote:
plot(1:10,axes=FALSE)
axis(1,at=1:10,labels=10:1)
axis(2,at=1:10,labels=5*10:1)
box()
Thanks.
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
Larsen, Thomas wrote:
I would like to write atom% 15N in the ylab of a plot - 15 should be
written as superscript. How do I put % into the expression? It does
not work if I type % directly after atom in the expression below.
string-quote it?
plot(1:10,ylab=expression(atom% ^15*N))
Barry
Larsen, Thomas wrote:
I would like to write atom% 15N in the ylab of a plot - 15 should be
written as superscript. How do I put % into the expression? It does
not work if I type % directly after atom in the expression below.
plot(1:10, ylab = expression(atom^15*N))
expression(atom*%^15*N)
Larsen, Thomas [EMAIL PROTECTED] writes:
I would like to write atom% 15N in the ylab of a plot - 15 should be
written as superscript. How do I put % into the expression? It does
not work if I type % directly after atom in the expression below.
plot(1:10, ylab = expression(atom^15*N))
How
I want use a validation set for my classification tree rather than the
default 10-fold validation in rpart() but can't see which arguments to use
to get this right. Advice appreciated thanks. I assume that this is
possible!
[[alternative HTML version deleted]]
XLSolutions Corporation ([1]www.xlsolutions-corp.com) is proud to
announce
2 courses in Seattle this June (Same week!).
(1) R/Splus Advanced Programming *** Seattle/June 8-9, 2006 ***
[2]http://www.xlsolutions-corp.com/Radv.htm
(1) R/Splus Fundamentals and
--- Berton Gunter [EMAIL PROTECTED] wrote:
Here are a few alternatives:
replace(a, is.na(a), 0) + b
ifelse(is.na(a), 0, a) + b
mapply(sum, a, b, MoreArgs = list(na.rm = TRUE))
Well, Gabor, if you want to get fancy...
evalq({a[is.na(a)]-0;a})+b
On Tue, 2 May 2006, Larsen, Thomas wrote:
I would like to write atom% 15N in the ylab of a plot - 15 should be
written as superscript. How do I put % into the expression? It does
not work if I type % directly after atom in the expression below.
plot(1:10, ylab = expression(atom^15*N))
I
Hi everyone,
What's the difference between the following two linear mixed models?
Supposed productivity scores is decided by three types of machines as used
by six different workers.
scoreij=workeri+machinej+eij i=1,2,...6 j=1,2,3
machine = as.factor(machine)
worker = as.factor(worker)
Perfect. Thank you!
-Original Message-
From: Martin Morgan [mailto:[EMAIL PROTECTED]
Sent: 02 May 2006 17:10
To: Matthew Dowle
Cc: 'Prof Brian Ripley'; 'r-help@/usr/bin/idn:
idna_to_ascii_4z() failed with error 3.
r-help@stat.math.ethz.ch@fhcrc.org
Subject: Re: [R] a+b
I
On 5/2/06, Berton Gunter [EMAIL PROTECTED] wrote:
Here are a few alternatives:
replace(a, is.na(a), 0) + b
ifelse(is.na(a), 0, a) + b
mapply(sum, a, b, MoreArgs = list(na.rm = TRUE))
Well, Gabor, if you want to get fancy...
evalq({a[is.na(a)]-0;a})+b
Note that the evalq can
Below.
-Original Message-
From: Gabor Grothendieck [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 02, 2006 10:42 AM
To: Berton Gunter
Cc: John Kane; R R-help
Subject: Re: [R] Adding elements in an array where I have
missing data.
On 5/2/06, Berton Gunter [EMAIL PROTECTED] wrote:
--- Berton Gunter [EMAIL PROTECTED] wrote:
Below.
My what does it mean was meant as a joke! However
your responses + Gabor's have really helped. I don't
really have the knowledge to understand everything but
I think I am getting a better feel for what is
happening which should translate to
But the evalq solution does change a.
a - c(2, NA, 3)
b - c(3,4, 5)
evalq({a[is.na(a)]-0;a})+b
[1] 5 4 8
a
[1] 2 0 3
If evalq were changed to local then it would not change a:
a - c(2, NA, 3)
b - c(3,4, 5)
local({a[is.na(a)]-0;a})+b
[1] 5 4 8
a
[1] 2 NA 3
Also the replace, ifelse and
That is curious, as I thought when I checked it that evalq did what I said
by default. Apparently not. However, to continue in the vein of complex
solutions for simple problems, either
explicitly using local() or specifying a local environment as an argument
I have a model with a few correlated explanatory variables.
i.e.
m1=lm(y~x1+x2+x3+x4,protdata)
and I have used predict as follows:
x=data.frame(x=1:36)
yp=predict(m1,x,se.fit=T)
tprot=sum(yp$fit) # add up the predictions
tprot
tprot is the sum of the 36 predicted values and I would
I also could not get this to work (Windows, Outlook). Now, I prefer to do
the
reading in the great message reader that keeps my mail-inbox clean:
BINGO. I got it to work
I noticed that gMane had the capability of being read by a NTTP reader.
Within Microsof Outlook Newsreader one can create
I think you got it right.
The mean of the (weighted) sum of a set of random variables is the
(weighted) sum of the means and its variance is the (weighted) sum of the
individual variances (using squared weights). Here you don't have to worry
about weights.
So what you proposed does exactly
Dear Saschin,
Does the Rcmdr package load properly from the standard R for Windows SDI
console?
BTW, the reinstall of the Rcmdr package didn't go through (see your listing)
because the package was apparently already loaded.
Regards,
John
John Fox
Department of
On Tue, 2 May 2006, Christos Hatzis wrote:
I think you got it right.
The mean of the (weighted) sum of a set of random variables is the
(weighted) sum of the means and its variance is the (weighted) sum of the
individual variances (using squared weights). Here you don't have to worry
about
Hi list-members
can anybody tell me why
pairwise.t.test(val, fac)
produces an empty p-table. As shown below:
Pairwise comparisons using t tests with pooled SD
data: val and fac
AS AT Fhh Fm Fmk Fmu GBS Gf HFS Hn jAL Kol R_Fill
AT - - - - - - - - - - -
Hello,
I have an ordinary linear regression model.
for example y~x1+x2+x3;
I need to compute the percentage of variance explained by each covariate. can
anyone tell me how I can compute it in R?
thanks so much,
ms
-
[[alternative HTML
I did mean to use x1,x2,x3,x4 in the new data frame.
And I think the theory would be something like
yhat = 1' K' bhat
and so the variance should be 1' K'CK 1 where C=(X'X)-1
and 1 is a 1 vector.
The question is do I need to form these matrices and grind through it or is
there an easier
Farrel Buchinsky [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
A while back Gabor Grothendieck suggested that I try
http://news.gmane.org/gmane.comp.lang.r.general. This was after I asked
how
to easily reply to posts on the listserve. Ideally I would like the
functionality that
Thomas Hoffmann [EMAIL PROTECTED] writes:
Hi list-members
can anybody tell me why
pairwise.t.test(val, fac)
produces an empty p-table. As shown below:
Pairwise comparisons using t tests with pooled SD
data: val and fac
AS AT Fhh Fm Fmk Fmu GBS Gf HFS Hn jAL
Hi ! Wonder if I have this code below:
a - c(1, 2, 3, 2, 1)
b - c(3, 2, 3, 1, 1)
d -as.factor(a)
e -as.factor(b)
table(d,e)
is.factor(a)
is.factor(b)
is.factor(d)
is.factor(e)
de - factor(c(d,e))
is.factor(de)
require(MASS)
mca(de)
I'd like to perform a correspondence analysis, but I can't
I am modeling a trend surface using trmat and want to trim the resulting matrix
to the area enclosed by my real data (i.e., remove all the extrapolated areas).
I was using chull and in.chull to calculate the convex hull and change all the
other values created by trmat to NA. However, my real
Thanks,
that was the case.
Thomas :-)
Peter Dalgaard schrieb:
Thomas Hoffmann [EMAIL PROTECTED] writes:
Hi list-members
can anybody tell me why
pairwise.t.test(val, fac)
produces an empty p-table. As shown below:
Pairwise comparisons using t tests with pooled SD
Carlos
?mca states that mca works on a dataframe. As you've written it
is.data.frame(de) returns FALSE
Try
de - data.frame(d,e) instead of de - factor(c(d,e))
HTH
Peter Alspach
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Carlos
Dear Saschin,
As John told you, you should better make sure that Rcmdr works fine with
R. I have seen a similar message once. It was due to missing libraries
required by Rcmdr that could not be installed for some obscure reasons
under SciViews-R. Once all required libraries were installed
Dear Philippe and Sachin,
The only packages that Rcmdr absolutely needs are tcltk and car; if other
packages (with the exception of rgl) are missing, then it will offer to
install them, so a manual install shouldn't be necessary. Another possible
source of problems, apparently, can be a saved
Sachin J wrote:
I am using parnor function of lmomco package. I believe it provides mean
and std. dev for the set of data. But the std. dev provided does not match
with the actual std. dev of the data which is 247.9193 (using sd function).
Am I missing something here?
parnor
Hi All,
Except the Rand Index, Dunn Index and Silhouette width, are there
other cluster validation methods in R? Could you please also specify the
function?
Thanks!
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch
John Fox wrote:
Dear Philippe and Sachin,
The only packages that Rcmdr absolutely needs are tcltk and car; if other
packages (with the exception of rgl) are missing, then it will offer to
install them, so a manual install shouldn't be necessary.
That works fine under R, but as I said, for
I am using dgc.genetics to perform TDT analysis on SNP data from a cohort of
trios.
I now have a file with about 6008 variables. The first few variables related
to the pedigree data such as the pedigree ID the person ID etc. Thereafter
each variable is a specific locus or marker. The variables
I can't make R on a Solaris 9 box. Does anyone have any suggestions?
Thanks in advance.
3- make
`Makedeps' is up to date.
`libbz2.a' is up to date.
`Makedeps' is up to date.
`libpcre.a' is up to date.
`Makedeps' is up to date.
`libz.a' is up to date.
../../../src/include/libintl.h is
Hi All,
I created a two variable lm() model
slm-lm(y[1:3000,8]~y[1:3000,12]+y[1:3000,15])
I made two predictions
predict(slm,newdata=y[201:3200,])
predict(slm,newdata=y[601:3600,])
there is no error message for either of these.
the results are identical, and identical to slm$fitted as
On 02-May-06 Mike Saunders wrote:
I am modeling a trend surface using trmat and want to trim the
resulting matrix to the area enclosed by my real data (i.e.,
remove all the extrapolated areas). I was using chull and
in.chull to calculate the convex hull and change all the other
values
I have some time series data like
01/02/1990 0.531 0.479
01/03/1990 0.510 0.522
01/06/1990 0.602 0.604
there is no weekends and holidays.
how do I graph them in a single plot that the x-axis is the dates and
the y-axis is the time series?
Thank you
Regards,
Jincai Jiang
(Office)
Try this:
# regression of Sepal.Length on cols 2 and 4 using first 100 rows
iris.lm - lm(Sepal.Length ~ ., iris[,c(1,2,4)], subset = 1:100)
# now do it with next 50 rows
predict(update(iris.lm, subset = 101:150))
# double check - this gives same result as last line
predict(lm(Sepal.Length ~ .,
Try this (where you can replace textConnection(L) with name
of file containing data):
L - 01/02/1990 0.531 0.479
01/03/1990 0.510 0.522
01/06/1990 0.602 0.604
library(zoo)
z - read.zoo(textConnection(L), format = %m/%d/%Y)
plot(z, plot.type = single)
This will give more info on zoo:
Sorry, I don't think that my earlier reply was what you wanted.
Try this instead:
# fit using first 100 points
iris.lm - lm(Sepal.Length ~., iris[1:100,c(1,2,4)])
# predict using coefficients from above and variables from next 50 points
predict(iris.lm, iris[101:150, c(1,2,4)])
On 5/2/06,
Hello,
trying to get something like this to work and am failing:
pie(
c(length(strongN14),length(weakN14),length(weakN15),length(strongN15),length(ambiguous)),
labels = c(= 0.66, = 0.33, = -0.33, = -0.66),
col = c(#FF,#CC,#009900,lightgreen,white)
)
Can't figure out a way to display
Dear Erin:
The following worked for me:
library(fSeries)
# Load Time Series:
data(sp500dge)
# Vector of Compounded Returns:
x - diff(sp500dge[,1])
# Vector of Percentage Compounded Returns:
X = 100*x
fit = garchFit(~arma(0,1), ~garch(1,1), series = X)
Version 2.3.0 (2006-04-24)
i386-pc-mingw32
I think you should use labels = c(= 0.66, = 0.33, = -0.33,
= -0.66) .
Note the quote in each element of the vector.
2006/5/3, Johannes Graumann [EMAIL PROTECTED]:
Hello,
trying to get something like this to work and am failing:
pie(
It does not work though. How is the lag work? How
does the lag work? I read the help and do not quite
understand. Here is a test
y
[1] 1 2 3 4 5 6 7 8 9 10
coredata(lag(y,-1))
[1] 1 2 3 4 5 6 7 8 9 10
attr(,tsp)
[1] 2 11 1
--- Gabor Grothendieck [EMAIL PROTECTED]
I was assuming that this would be added to my example
where the data is a zoo object so lag.zoo is being used.
Try this:
library(zoo)
z - zoo(11:15)
z
1 2 3 4 5
11 12 13 14 15
lag(z,-1,na.pad=TRUE)
1 2 3 4 5
NA 11 12 13 14
?lag.zoo
On 5/2/06, Guojun Zhu [EMAIL PROTECTED] wrote:
Hi,
I am using lmer (from the package lme4) to predict a binary response
variable (REL) from a bunch of fixed effects and two random effects
(Speaker_ID and NPhead_lemma):
fit - lmer(REL ~
SPEAKER_GENDER +
log(SPEECHRATE) +
SQSPEECHRATE +
.
+
It appears that the adjustSigma argument of 'summary.lme' does
nothing with the default method, REML. To check, I tried the
following modification of the 'summary.lme' example:
fm1 - lme(distance ~ age, Orthodont, random = ~ age | Subject)
fm1sa - summary(fm1)
fm1s - summary(fm1,
ronggui wrote:
I think you should use labels = c(= 0.66, = 0.33, = -0.33,
= -0.66) .
Note the quote in each element of the vector.
No. Am using that at the moment. Does not give me the nice
plotmath 'greater-than' etc. signs ...
Joh
__
Linda;
You might want to look at the package ade4 and inparticular the function
dist.binary. Although you have mentioned Rand Index I would suggest that
you look at the corrected Rand Index for chance agreement as it measures
the agreement between two clusterings resulting from two
For my perticular purpose (run regression on trailing
60 number b on 60 a), I have writen a short function
for it because no available function (runmean,
rollmean) can take care of NA as I wanted. I
basically want the regression ignore the NA row. I
have read a little bit source code of runmean
1 - 100 of 103 matches
Mail list logo