Forwarding to R-SIG-Finance where I believe you're likely to get more help:
In the meanwhile, I think you may wish to look at
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
Finally, I note you're posting from Nabble. Please include context in
your
Ok, apologies.
On Oct 12, 2012, at 2:52 AM, Markku Karhunen wrote:
Hi all,
I've been wondering for a long time why R drops the dimensions of
an array/matrix when you try to take a subset of one column. I mean
this:
dim(A)
[1] 2 5 2
B=A[1,,]
dim(B)
5 2 # so now dim(B)[3] doesn't work
Dear All,
is there a function in R that would help me convert a covariance matrix built
based on arithmetic returns to a covariance matrix from log-returns?
As an example of the means and covariance from arithmetic:
mu -c(0.094,0.006,1.337,1.046,0.263)
sigma
[Lightly edited for legibility.]
On Fri, Oct 12, 2012 at 7:39 PM, Andras Farkas motyoc...@yahoo.com wrote:
Dear All,
[A] few weeks ago I have posted a question on the R help listserv that some
of you have responded to with a great solution, would like to thank you for
that again. I
Hi Michael,
Thank you for pointing me in the right direction, I'm now using an email
client rather than Nabble.
Related to the issue I described below, it's resolved now, I have managed
to fix it myself. However, I believe this might be a bug, or at least
something that needs improving; I have
Dear all,
For a project I need to calculate the conditional AIC of a mixed effects
model.
Luckily, I found a reference in the R help forum for a function to be used:
CAIC - function(model) {
sigma - attr(VarCorr(model), 'sc')
observed - attr(model, 'y')
predicted -
Dear R-Users and experts,
This is my first post in this forum.
I have two csv files file1 and file2.
file1(many rows and columns) is read into dataframe *data1*
File2 is read into dataframe *data2* which have only one column of data
which contains the column names that need to be removed from
I suggest you go back to the Introduction to R document supplied with the
software and read about indexing.
In particular, pay attention to indexing into a matrix or data frame using
data1[rowspec,columnspec] syntax. There are three kinds of row and column
specification types, and any of the
On Fri, Oct 12, 2012 at 12:28 AM, Mihnea Constantinescu
mihnea.co...@gmail.com wrote:
Hi
I'm computing the correlation between two time-series x_t and y_t-1
(time-series lagged using the lag(y,-1) function) using the cor() function
and the returned value is different from the value of ccf()
On 13-10-2012, at 13:21, Andras Farkas wrote:
Dear All,
is there a function in R that would help me convert a covariance matrix built
based on arithmetic returns to a covariance matrix from log-returns?
As an example of the means and covariance from arithmetic:
mu
I tried to build (and install) XML_3.95-0.1.tar.gz on FreeBSD
10.0-CURRENT amd64, but it stopped during the check of
R_HAS_REMOVE_FINALIZERS (full log appended):
--
R CMD INSTALL XML_3.95-0.1.tar.gz
[..snip..]
Checking for 1.8: -DR_HAS_REMOVE_FINALIZERS=1
FWIW %m is the proper conversion for months. %M is minutes.
Looks like a bug.
Jeffrey Ryan|Founder|jeffrey.r...@lemnica.com
www.lemnica.com
On Oct 13, 2012, at 10:33 AM, Nicolae Caprarescu capra...@cs.man.ac.uk wrote:
Hi Michael,
Thank you for pointing me in the right
RWinEdt has not yet been updated to work with WinEdt 7 (which shows some
incompatible changes).
Please try with WinEdt 6 or earlier.
An update is under consideration but may take another month or two.
Best,
Uwe Ligges
On 12.10.2012 18:20, Mark Irwin wrote:
When trying to start RWinEdt
Thanks Arun for your quick reply.. Short code.. but brilliant.
It works very well for my requirement. My actual data has thousands of
columns fed into random forest model where I need to remove some of the
columns fed from another file by keep adding/removing the input sensors.
Thanks once again.
Hello,
Try the following.
keep - which(!names(data2) %in% names(data1))
data1[, keep]
Hope this helps,
Rui Barradas
Em 13-10-2012 15:48, siddu479 escreveu:
Dear R-Users and experts,
This is my first post in this forum.
I have two csv files file1 and file2.
file1(many rows and columns) is
Hi Rui,
By running your code on an example dataset:
set.seed(1)
dat1-data.frame(Sno=sample(1:50,10,replace=TRUE),Data_1=rnorm(10,15),Data_2=rnorm(10,25),Data_3=runif(10,0.5))
dat2-read.table(text=
Data_2
Data_3
,sep=,header=FALSE,stringsAsFactors=FALSE)
keep - which(!names(dat2) %in%
Dear List,
I am working on a stats project and have been stumped by the issue of
replacing values in a column conditional on values from a different column.
I searched the forum and google in general, and was able to put some code
together, but it's not working the way it's supposed to... I
Hello.
I'm am trying to follow a recommendation to deal with a dependent variable
in a linear regression.
I read that, due to the positive trend in my dependent variable residual vs
mean function, I should
1) run a linear regression to estimate the standard deviations from this
trend, and
2) run
Hello,
No need for a loop. else if doesn't exist in R. And Health2$CohenM and
Health2_CohenF have to be created first, in case of a loop
If Health2$q_5a only have 1 and 2 as possible values, just use which
and -. And I would suggest to not add new variables in your data
frame, because you
HI,
Not sure how your dataset looks like and not very clear whether this is what
you want.
Try this:
set.seed(1)
Health1-data.frame(q_5=sample(1:2,10,replace=TRUE),CohenSum=rnorm(10,25))
Health2-data.frame(Health1,CohenM=NA,CohenF=NA)
idxM-which(Health2$q_5==1)
idxF-which(Health2$q_5==2)
Thank you so much!!! This is exactly what I needed!! Have a wonderful rest of
the weekend!!
--
View this message in context:
http://r.789695.n4.nabble.com/Replace-column-values-in-R-conditional-on-values-from-different-column-tp4646087p4646091.html
Sent from the R help mailing list archive at
Hello,
You're right, that's the result of not having test data (and being in a
hurry).
Anyway, apologies to the op, and thanks for the correction.
Rui Barradas
Em 13-10-2012 19:13, arun escreveu:
Hi Rui,
By running your code on an example dataset:
set.seed(1)
Hello,
Try package tseries, function white.test().
Hope this helps,
Rui Barradas
Em 13-10-2012 21:40, Afrae Hassouni escreveu:
Hello,
Is there a way to perform a White test (testing heteroscedasticity) under R?
Best regards,
Afrae Hassouni
__
dear listers,
with rscript, i know how to feed arguments by command line directly,
e.g. Rscript test.r 10 20. however, if i saved all arguments in a
file, how do i make rscript to take arguments in this file? Rscript
test.r input.txt doesn't seem to work for me.
(ps: i am using windows)
thanks
On 12-10-13 3:20 PM, Christophe Genolini wrote:
Hi the list,
I am about to submit an article describing an R package to the Journal of
Statistical Software but I
encounter a strange behavior of LaTeX: the numbering of the figure is correct
(1. 2. 3. ...), but
when I make a reference to a
On 12-10-13 5:16 PM, Wensui Liu wrote:
dear listers,
with rscript, i know how to feed arguments by command line directly,
e.g. Rscript test.r 10 20. however, if i saved all arguments in a
file, how do i make rscript to take arguments in this file? Rscript
test.r input.txt doesn't seem to work
Hello,
I find your recommended procedure not very sensible but:
a) sum(fit$residuals^2)/fit|$d||f.residual
|
b) This is a statistical question but, for instance, in the case of
repeated mesures. But you'd use the precision (1/variance) of the
original data, computed by groups of regressor.
Or have a look at tapply().
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of Pascal Oettli
Sent: Saturday, October 13, 2012 22:16
To: GradStudentDD
Cc: r-help@r-project.org
Subject: Re: [R] Replace column values in R
I’m trying to set up proportional hazard model that is stratified with
respect to covariate 1 and has an interaction between covariate 1 and
another variable, covariate 2. Both variables are categorical. In the
following, I try to illustrate the two problems that I’ve encountered, using
the lung
Hi,
Please remove my email address from the list. Thanks a lot!
Sent from my iPad
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and
I’m trying to set up proportional hazard model that is stratified with
respect to covariate 1 and has an interaction between covariate 1 and
another variable, covariate 2. Both variables are categorical. In the
following, I try to illustrate the two problems that I’ve encountered, using
the lung
HI Team,
I am currently working on problem and stumped on for loop.
Data:
structure(list(Coutry = structure(c(3L, 3L, 3L, 3L, 2L, 2L, 1L,
1L), .Label = c(J, M, U), class = factor), State = structure(c(1L,
1L, 4L, 2L, 5L, 5L, 3L, 6L), .Label = c(A, C, K, O, S,
T), class = factor), City =
Hi,
Not very clear whether this is you want.
#dat1 -data
aggregate(cbind(dat1$State,dat1$Coutry,dat1$City),list(dat1$Char1,dat1$Char2,dat1$Char3),length)
#or
ddply(dat1,.(Char1,Char2,Char3),colwise(length,c(State,Coutry,City)))
# Char1 Char2 Char3 State Coutry City
#1 A ABCD ASDFG 1
Hello,
The following code is expected to produce 4 charts. But, I only get charts 1,2
, 4, NOT CHART # 3.
For Chart# 3, I am getting the following error message: Error in
tapply(1:NROW(x), list(factor(strata)), function(index) { : arguments must
have same length
I would appreciate if
R is case sensitive
either change
subset (nhis, xsmoke=='Never SMK')
to
subset (nhis, xsmoke=='Never Smk')
or change
labels=c('Current SMK','Former SMK', 'Never Smk')
to
labels=c('Current SMK','Former SMK', 'Never SMK')
but not both :)
On Sat, Oct 13, 2012 at 10:02 PM, Muhuri, Pradip
On 10/14/2012 10:26 AM, Jenny wrote:
Hi,
Please remove my email address from the list. Thanks a lot!
Hi Jenny,
Look at the bottom of this message, 2nd line, and go there. Follow the
instructions.
Sent from my iPad
figures
__
Anthony,
I now can't afford to forget that R is case-sensitive!
Thank you so much!
Pradip Muhuri
From: Anthony Damico [ajdam...@gmail.com]
Sent: Saturday, October 13, 2012 10:10 PM
To: Muhuri, Pradip (SAMHSA/CBHSQ)
Cc: Thomas Lumley; R help
Subject: Re:
Is there anyway I could receive R emails once a day (in a batch)? How
could I set it up?
Alok
--
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
38 matches
Mail list logo