Prof. Bates, Gabor,
I had written a posting, some weeks ago, where I had written
fortrannish code for moving window regressions (also called 'rolling
window regression'), and asked how to do the code better. Both of you
had put much pain on this, and emerged with this great code:
data(women)
The issue is not `duplicate rows' but duplicated row names. You asked R
explicitly to make a column into row names -- if they are not suitable row
names, don't do that. You can remove duplicated rows later (see ?unique)
but you cannot have duplicated row names in a data frame so leave them as
You forgot drop=FALSE, one of the commonest S programmers' oversights.
The lm.fit call should be
fit = lm.fit(x[ind, , drop = FALSE], y[ind])
Please don't mix assignment operators in posted code, BTW.
--
Brian D. Ripley, [EMAIL PROTECTED]
Professor
Hi,
I am getting errors of the following kind. I can't
seem to point the source of the error. I would greatly
appreciate any advice.
Many thanks and good day,
-Melinda
Error message :
Ran out of iterations and did not converge in:
fitter(X, Y, strats, offset, init, control,
Note you said you used 1-F but the output said you used F. You also say
`1-F is a vector of '0's' so I think you may have declared that all
observations are right-censored. (NB if you give Surv an event vector of
all 1's it is ambiguous, so don't do this.)
If you did declare all observations as
Christian Schulz wrote:
X - numeric(length(data.frame))
before the loop maybe work, because
my computer works and works !?
christian
-- Weitergeleitete Nachricht --
Subject: filter out many data.frames
Date: Sonntag, 16. Mai 2004 00:02
From: Christian Schulz [EMAIL PROTECTED]
Ajay Shah [EMAIL PROTECTED] writes:
I had written a posting, some weeks ago, where I had written
fortrannish code for moving window regressions (also called 'rolling
window regression'), and asked how to do the code better. Both of you
had put much pain on this, and emerged with this great
Douglas Bates [EMAIL PROTECTED] writes:
...
Try changing the call of lm.fit to
lm.fit(x[ind, , drop = FALSE), y[ind])
It will probably work better without the syntax error, as
lm.fit(x[ind, , drop = FALSE], y[ind])
__
[EMAIL
Yes, i have recognized my stupid approach.
Now it works but any help how i get
the names in tList from the expand.grid combinaton's instead
number from 1:64 would like great!
Thanks Christian
data - expand.grid(class02 = c(A,B,C,D), class04 =
c(A,B,C,D),PREDICT = c(A,B,C,D))
tList -
Others have already addressed the bug.
Your other question seems to be how to get some simplification.
Note that Greg Warnes responded in:
http://article.gmane.org/gmane.comp.lang.r.general/18033
regarding the use of running in gregmisc.
Another thing you could do
if you want to retain the
Prof Brian Ripley [EMAIL PROTECTED] writes:
Note you said you used 1-F but the output said you used F. You also say
`1-F is a vector of '0's' so I think you may have declared that all
observations are right-censored. (NB if you give Surv an event vector of
all 1's it is ambiguous, so don't
Christian Schulz wrote:
Yes, i have recognized my stupid approach.
Now it works but any help how i get
the names in tList from the expand.grid combinaton's instead
number from 1:64 would like great!
Thanks Christian
data - expand.grid(class02 = c(A,B,C,D), class04 =
c(A,B,C,D),PREDICT =
I have a list d, in which the names of each elements are single characters,
and the actual elements are bit sequences representing those characters. If
I type d[1], I get the name and the bit sequence. If I type d[[1]], I get
only the bit sequence.
What I want is some way to be able to get the
Ned wrote:
I have a list d, in which the names of each elements are single
characters, and the actual elements are bit sequences representing those
characters. If I type d[1], I get the name and the bit sequence. If I
type d[[1]], I get only the bit sequence.
d[1] returns a list of length 1,
On Sun, May 16, 2004 at 02:25:07PM +0200, Peter Dalgaard wrote:
Prof Brian Ripley [EMAIL PROTECTED] writes:
Note you said you used 1-F but the output said you used F. You also say
`1-F is a vector of '0's' so I think you may have declared that all
observations are right-censored. (NB if
Thanks for the interesting solution.
I am happy to find a way to save all graphic options into a file.
There is a minor glitch.
Is there is any way to replace title, not to overwrite it?
And if I want to change the color of a line or the ranges of x or y axis,
how can I do it with the restored
So, why are you doing these complicated things?
Hmm, want upgrade my sklls, because
i need more and more function's to reduce
complexity in my analysis.
And try , do.call and match.call seems very usefuel and
i want at long last understand the flexbilty of this functions.
Just using
I don't think you can produce a graphic in R and then easily edit it
*in R* to change the title and so on; however, if you are using Windows you
can save the graphic as a Windows metafile (right click graphic and
save as a Windows metafile or just copy it as Windows metafile to clipboard)
and
On 16 May 2004, Peter Dalgaard wrote:
Prof Brian Ripley [EMAIL PROTECTED] writes:
Note you said you used 1-F but the output said you used F. You also say
`1-F is a vector of '0's' so I think you may have declared that all
observations are right-censored. (NB if you give Surv an event
The display list on a screen device is enabled unless you explicitly
disable it, and if you know how to do that you will understand the help
for recordPlot, which says that it saves the display list so there had
better be one.
I suspect only a handful of R users have ever used dev.control and I
Unfortunately a bug has been introduced into the recordPlot/replayPlot
internal code, so what is saved is the current display list and not a
snapshot. (For cognescenti, especially Paul M: duplicate() is required or
the saved object will get a pointer to the actual display list.) There are
many
Greetings.
I'm getting started learning R, and I'm trying to reproduce some models
I've done previously in SAS. I'm trying to fit simple Poisson
regressions, and I keep getting impossible results: the models predict
negative numbers of cases for many observations. The code for the
models
[EMAIL PROTECTED] writes:
Greetings.
I'm getting started learning R, and I'm trying to reproduce some
models I've done previously in SAS. I'm trying to fit simple Poisson
regressions, and I keep getting impossible results: the models
predict negative numbers of cases for many
Hi,
I wrote a few days ago about an error message I'm getting when I use GLMM
from lme4 to do random effects modelling.
When I add random effects, I get the following error message: Error in
EMsteps-(`*tmp*`, value = control) : invalid source matrix.
(I wanted to note that I've only just
On Sunday 16 May 2004 16:03, Matt Loveland wrote:
Hi,
I wrote a few days ago about an error message I'm getting when I use
GLMM from lme4 to do random effects modelling.
When I add random effects, I get the following error message: Error
in EMsteps-(`*tmp*`, value = control) : invalid
Matt Loveland [EMAIL PROTECTED] writes:
Hi,
I wrote a few days ago about an error message I'm getting when I use GLMM
from lme4 to do random effects modelling.
When I add random effects, I get the following error message: Error in
EMsteps-(`*tmp*`, value = control) : invalid source
On Sun, 16 May 2004, Siew Leng TENG wrote:
Hi,
I am getting errors of the following kind. I can't
seem to point the source of the error. I would greatly
appreciate any advice.
In addition to things other people have pointed out, you didn't actually
set any of the control parameters you were
Thank you so much. I'll tell it not to use the row names.
Also, if you have advice for basic texts for learning the programming
language, please let me know. I am using Dalgaard's Introductory
Statistics with R, but would like to find something with more of the
command line options, regardless
Hi
Shin, Daehyok wrote:
Thanks for the interesting solution.
I am happy to find a way to save all graphic options into a file.
There is a minor glitch.
Is there is any way to replace title, not to overwrite it?
And if I want to change the color of a line or the ranges of x or y axis,
how can I do
29 matches
Mail list logo