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 adv
(410) 502-2619
> email: rvarad...@jhmi.edu
>
>
> - Original Message -
> From: R_help Help
> Date: Wednesday, August 11, 2010 9:44 pm
> Subject: [R] Need help to understand integrate function
> To: r-help@r-project.org
>
>
>> Hi,
>>
>> I'm running i
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 <- e
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 appre
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 str
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 any).
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 a
you are trying to do.
>
> Ravi.
>
>
> Ravi Varadhan, Ph.D.
> Assistant Professor,
> Division of Geriatric Medicine and Gerontology
> School of Medicine
> Johns Hopkins University
>
> Ph. (410) 502-2619
> email: rv
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 appreciated.
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 (>
2)
Hi - I ran into a problem when the argument to gamma function is
large. Says, if I do the following:
> gamma(17000)
[1] Inf
Warning message:
value out of range in 'gammafn'
Is there anyway to get around this or other implementation? Thank you.
-rc
__
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 obtain
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
__
R-help@
Hi Gabor,
I appreciate your suggestion. I'm wondering if there's any faster
implementation that one could achieve. The dataset I have is about
400K rows and I have many of them. Just wondering if you have any
thoughts. Thanks.
Sakda
On Tue, Sep 8, 2009 at 6:57 AM, R_help
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 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
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 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 http://www.R-proje
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.
adsch
reference and example? Thank you again!
ads
On Sat, Jun 27, 2009 at 10:29 PM, Gabor
Grothendieck wrote:
> Try this:
>
>> setClass("zoo")
> [1] "zoo"
>> setClass("Work",representation=(x="zoo"))
> [1] "Work"
>
>
>
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 a
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 wrote:
>
> On Jun 24, 2009, at 9:26 PM, R_help Help wrote:
>
> Hi,
>>
>> I do not under
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 o
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:
apply(matrix(tickers,ncol=1),1,FUN=getDivAdjSer
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 any
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 com
28 matches
Mail list logo