Hi,
I can see that there is a function for mahalanobis distance in stat
package. But I'm wondering if there is any implementation that can
take in a mix of ordinal data and numerical values together? If no,
would you mind pointing me to some reference for a methodology to do
this? Thank you in
.
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
School of Medicine
Johns Hopkins University
Ph. (410) 502-2619
email: rvarad...@jhmi.edu
- Original Message -
From: R_help
Hi,
I'm running into a wall when trying to use the integrate function. I
have the following setting:
powerLaw2 - function(x,l1,l2,c0,t0) {
idx - which(x = 0);
if (length(idx) 0) {
x[idx] - 0;
}
xl - (-l1+l2)*log(x/t0);
L - log(c0)-l1*log(x)-log(1+exp(xl));
L - exp(L);
Hi,
I'm a bit puzzled. I uses exactly the same code in RcppExamples
package to try adding RcppFrame object to RcppResultSet. When running
it gives me segmentation fault problem. I'm using gcc 4.1.2 on redhat
64bit. I'm not sure if this is the cause of the problem. Any advice
would be greatly
Hi,
I was trying to generate RcppDatetime from a string. The main problem
for me is that my string contains millisecond. I saw that RcppDatetime
takes in double of seconds since epoch. I try to generate a double
using boost but has no success. I'm wondering if you have any sample
snippet?
The
Hi - I'm wondering if there is any existing package in R that
facilitates ACD (Autoregressive Conditional Duration) model. I
googled. Apparently there were packages dynamo and fACD. However, they
do not seem to be on any CRAN. I am wondering if anyone could point me
to an existing package (if
Hi,
Assuming I have a time series on which I will perform rolling-window
MLE. In other words, if I stand at time t, I'm using points t-L+1 to t
for my MLE estimate of parameters at time t (here L is my rolling
window width). Next, at t+1, I'll do the same.
My question is that is there anyway to
Hi,
I'm using optim with box constraints to MLE on about 100 data points.
It goes quite slow even on 4GB machine. I'm wondering if R has any
faster implementation? Also, if I'd like to impose
equality/nonequality constraints on parameters, which package I should
use? Any help would be
.
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
School of Medicine
Johns Hopkins University
Ph. (410) 502-2619
email: rvarad...@jhmi.edu
- Original Message -
From: R_help Help rhelp
Hi - I have a likelihood function that involves sums of two possions:
L =
a*dpois(Xi,theta1)*dpois(Yi,theta2)+b*(1-c)*a*dpois(Xi,theta1+theta3)*dpois(Yi,theta2)
where a,b,c,theta1,theta2,theta3 are parameters to be estimated.
(Xi,Yi) are observations. However, Xi and Yi are usually big (
Hi - a simple question. I know that on plot one can set log=xy to
set scale on both axes to log scale. I use this to plot
autocorrelation of a slow decaying autocorrelated process. It has some
points that are zero or slightly negative and cause this plot to
return error. I'm wondering if there is
Hi,
I have two DLM model specifications (x[t] and y[t] are univariate):
MODEL1:
y[t] = b[t]x[t]+e[t], e[t] ~ N(0,v1^2)
b[t] = b[t-1]+eta[t], eta[t] ~ N(0,w1^2)
MODEL2:
y[t] = a[t]+e[t], e[t] ~ N(0,v2^2)
a[t] = a[t-1]+eta[t], eta[t] ~ N(0,w2^2)
I run the filter through data recursively to
Hi - I read through dse package manual a bit. I'm not quite certain
how I can use it to estimate a time varying coefficient regression
model? I might pick up an inappropriate package. Any suggestion would
be greatly appreciated. Thank you.
rh
__
wrote:
-- Forwarded message --
From: Gabor Grothendieck ggrothendi...@gmail.com
Date: Sun, Aug 30, 2009 at 11:08 PM
Subject: Re: [R-SIG-Finance] Aggregating irregular time series
To: R_help Help rhelp...@gmail.com
Cc: r-sig-fina...@stat.math.ethz.ch, r-help@r-project.org
Try
Hi,
I have a couple of aggregation operations that I don't know how to
accomplish. Let me give an example. I have the following irregular
time series
time x
10:00:00.021 20
10:00:00.224 20
10:00:01.002 19
10:00:02:948
Hi,
I have a couple of aggregation operations that I don't know how to
accomplish. Let me give an example. I have the following irregular
time series
time x
10:00:00.02120
10:00:00.22420
10:00:01.00219
10:00:02:948
Hi,
I have the following string that I converted to a POSIXct:
a - 2009-08-24 10:00:00.213
a.p - strptime(a,%Y-%m-%d %H:%M:%OS)
as.double(as.POSIXct(a.p))
[1] 1251122400
I can't seem to get the decimal fraction of .213 out by casting to
double or numeric. Is there anyway to make sure that
Hi,
I have a list that contains about 100 elements. Each element contains
the following matrix structure
a b
1 1 4
2 2 5
3 3 6
I'd like to sum column b across all elements. I'm thinking of using
lapply or sapply but cannot get it to work. Any help would be really
appreciated. Thank you.
Hi,
I have an object in S4 class. Is there anyway that I can write to a
file and read it back to R? Thank you.
adschai
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
Hi,
When I define a new class (through setClass), members defined in
representation argument doesn't seem to like a class. For example, if
I do the following:
setClass(NotWork,representation=(x=zoo))
It seems to me that representation members will take in only primitive
type to R. Is there any
Thank you Gabor. It works. I read a bit more and understood what you're doing.
One more question, I want to know more about .Data property of a
class. I know that it defines type of the class when asking typeof.
But I don't know much how to use them. Would you mind pointing me to
some reference
Thanks David for reading for me. Anyhow, is there better way to do looping
on xts objects than using apply? Thanks again.
adschai
On Thu, Jun 25, 2009 at 12:39 AM, David Winsemius dwinsem...@comcast.netwrote:
On Jun 24, 2009, at 9:26 PM, R_help Help wrote:
Hi,
I do not understand why
Hi,
I do not understand why after I called apply on a function that returns an
xts (getIdvAdjSeries) it returns a matrix whose columns are just numeric
value of time series in xts instead of a list of xts objects.
Basically, I called the following:
I do not want to use histogram because I have more control over base graphs
that R provide. I'm wondering if hist function provides a parameter that can
set y axis as % of count instead of raw count?
If not, I'd like to know how I can add text or line on histogram function? I
don't like the idea
Hi,
To set a simple an clear picture of what I'd like to do, here is an example.
I would like to calculate mean of column A and B bucketed by factor in
column X in a data.frame. lapply or aggregate operates on a single column. I
found dapply function in some package which doesn't seem to exist
Hi,
I have a matrix or data.frame (df). When I would like to check if a column
named x exists, it becomes my habit to do the following:
if (length(which(colnames(df)==x))0)
Is there any smarter way to do this? Thank you.
adschai
[[alternative HTML version deleted]]
Hi,
I am trying to install package xts. I am using OPENSUSE 11 64 bit. When I
invoke:
install.pacakges(xts,dependencies=T)
I received a lot of ERROR: compilation failed for package errors when R
tries to install xts dependencies. I do not understand this behavior.
I notice one thing. It
27 matches
Mail list logo