This indeed seems to be the case.
Running
ar(xb, order=1, method="mle")
and
arima(xb,order=c(1,0,0),include.mean=FALSE)
give essentially the same results.
It looks to me that ar with method="mle" turns around and calls arima
function, so there is no big surprize there.
Cheers,
Dave,
I am not sure what you try to do, but I have a couple of thoughts:
1. Your t.hh is numerically identical to t.h, except the latter one is
the time series.
2. I am guessing you want the same thing for t.d and t.m. If this is the
case, all you need to do is repeat what you did with t.h:
Hello,
I am not sure if I have done something wrong or something changed between
12.2.2 and 2.13.0, but I just installed R-2.13.0 from CRAN install
executable on 64 bit Windows 7 Pro and when I try "Help>Manuals (in
PDF)>An Introduction to R" I get the following
Error: 'doc\manual\R-intro.pd
I am not sure if I am correct but I think the labels argument pertains
only to the counterplot function.
Cheers,
Andy
__
Andy Jaworski
518-1-01
Process Laboratory
3M Corporate Research Laboratory
-
E-mail: apjawor...@mmm.com
Tel: (651) 733-6092
Fax: (651) 7
Thomas,
I think the issue of having reasonable starting values is inherent in all
nonlinear optimization problems (unless they have some additional
properties like convexity, for example). Using a different algorithm may
or may not help. In fact, a vast majority of existing algorithms
guaran
Hi,
I have the following question about creating data frames. I want to
create a data frame with 2 components: a vector and a matrix.
Let me use a simple example:
y <- rnorm(10)
x <- matrix(rnorm(150), nrow=10)
Now if I do
dd <- data.frame(x=x, y=y)
I get a data frame with 16 colums, but if
Antonio,
Starting from 2.10, R dropped its support for Windows CHM help. It has
been replaced with the web browser HTML based one. To activate this add
the following line to your Rprofile
options(help_type="html")
The pages come up in your browser. They all have the same links as
before.
Hi,
This probably does not answer your question, which I presume is about the
workings of constrOptim function, but I have a couple of comments and
different solutions of your problem.
1. In general, in the problem of this type, one can incorporate the
equality constraint(s) into the objectiv
Hi,
Is there any package out there that might help me with translating R code
into MATLAB? Using RSiteSearch I found a bunch of "MATLAB stuff" but it
all seems to go in the opposite direction, i.e., emulating MATLAB
functions in R.
Thanks in advance,
Andy
__
Rebecca,
I think the problem is that subset is a nume of an R function. If you do
something like
subs <- c(rep(TRUE, 107), FALSE)
fm2 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1,
subset=subs)
everything works fine.
Hope this helps,
Andy
__
An
Here is a solution:
1. c(x, rep(NA, n-length(x)))
2. which(x==2, arr.ind=TRUE)
Cheers
Andy
__
Andy Jaworski
518-1-01
Process Laboratory
3M Corporate Research Laboratory
-
E-mail: [EMAIL PROTECTED]
Tel: (651) 733-6092
Fax: (651) 736-3122
"Eric Turkheimer"
My Linux is pretty rusty, but I think the error message means what is says:
you do not have readline header (*.h) and library files. They usually
reside in readline-devel package if I remember correctly.
Hope this helps,
Andy
__
Andy Jaworski
518-1-01
Process Lab
Milan,
This is a fairly standard trick. Let us generalize your equation slightly:
y ~ a + c*sin(x+b)
so the amplitude of the sine wave is adjustable (otherwise, you assume (or
know) that the amplitude is 1). Then
y ~ a + c*sin(b)*cos(x) + c*cos(b)*sin(x)
or
y ~ b0 + b1*x1 + b2*x2
which is
Dan,
You need to do
diag(w) %*% as.matrix(co) %*% diag(w)
The reason is that read.table creates a data frame. Although it looks like
a matrix it is not - actually it is a special kind of list. The
"as.matrix" function will coerce it to a matrix.
By the way, this will generate m[i,j]=w[i]*co[
I would like to thank Brian Ripley and Torsten Hothorn for their quick and
thoughtful responses.
I rerun the example given by Professor Ripley by just starting R and
sourcing the code below and I got slightly different results. Then I ran
it again setting the random seed before the sample command
Hi there.
I was wondering if somebody knows how to perform a bagging procedure on a
classification tree without running the classifier with weights.
Let me first explain why I need this and then give some details of what I
have found out so far.
I am thinking about implementing the bagging proc
Will,
Your SAS input indicates that within standard deviation is 9, not the
variance. If you use within.var=81 in your R statement you will get the
answer matching SAS.
Cheers,
Andy
__
Andy Jaworski
518-1-01
Process Laboratory
3M Corporate Research Laboratory
--
Jonas,
In statistical sense polynomial is a linear regression fit. The function
that handles linear fitting is called lm. Here is how you can reproduce
your results:
lm(y ~ x + I(x^2) + I(x^3))
Unless you are really after the polynomial coefficients it is probably
better to use orthogonal poly
Here is a very crude function I use quite often. It tries to recognize
whether you have headers or not by checking the very first character. If
it is numeric, it assumes that there are no headers. The suppressWarnings
gets rid of a warning one gets when trying to coerce a character to
numeric.
19 matches
Mail list logo