Cuichang Zhao wrote:
Hello,
thank you very much for your help in last email. it is very helpful. right now, i have more questions about my project,
1. solve can i remove the NA from a vectors:
for exmample, if my vector is:
v - (NA, 1, 2, 3, 4, 5)
how can I remove the NA from vector v
2. how
Course in
STATISTICAL PRACTICE IN EPIDEMIOLOGY USING R
Tartu, Estonia, 26 - 31 May 2005
The course is aimed at epidemiologists and statisticians who wish to
use R for statistical modelling and analysis of epidemiological data.
The course
A wild guess: Do you have one file one function? Could it be that the last
line in one of the files does not end with a newline and this is not taken
care of by the build with lazy loading? Try to add a newline at the end of
each of your files.
Henrik Bengtsson
-Original Message-
From:
The answers to your questions are in the text below. However these questions
are generally answered in the base documentation. You might try going through
the Keywords by Topic which on the windows system at least) is accessed by
going through the html help entry on the help menu. Once your
Drew Balazs wrote:
Has anyone else ran into problems installing Rggobi with R 2.0.1 on a
windows platform? I've followed all the instructions available and I
still can not get R to recognize Rggobi as a library (package). I
I think it won't be that easy to get it installed.
By any chance, have you
Hi
On 25 Jan 2005 at 9:00, Uwe Ligges wrote:
Cuichang Zhao wrote:
Hello,
thank you very much for your help in last email. it is very helpful.
right now, i have more questions about my project,
1. solve can i remove the NA from a vectors:
for exmample, if my vector is:
v - (NA,
Cuichang Zhao wrote:
Hello,
thank you very much for your help in last email. it is very helpful. right now, i have more questions about my project,
1. solve can i remove the NA from a vectors:
for exmample, if my vector is:
v - (NA, 1, 2, 3, 4, 5)
which should read v - c(NA, 1, 2, 3, 4, 5):
Dear all,
Regarding the lme with varFunc() question I posted a few days ago: I
have used the following two approaches:
model1-lme(response~Covariate+Block+TreatmentA+TreatmentB,random=~1|Plot/Subplot,method=ML)
model2a-update(model1,weights=varPower(form=~ fitted(.)))
Dear List:
the CODA and BOA packages for the analysis of MCMC output yield different
results on two dignostic test of convergence: 1) Geweke's convergence
diagnostic; 2) Heidelberger and Welch's convergence diagnostic. Does that
imply that the CODA and BOA packages implement different ``flavors''
Paul == Paul Murrell [EMAIL PROTECTED]
on Tue, 25 Jan 2005 13:40:15 +1300 writes:
Paul Hi
Paul Cari G Kaufman wrote:
Hello,
Does anyone know how to make movies in R by making a sequence of
plots?
I'd like to animate a long trajectory for exploratory purposes
From: boston knot [EMAIL PROTECTED]
Date: Mon, 24 Jan 2005 20:50:53 -0800 (PST)
Recursive default argument reference keeps appearing when I try to run a
haplo.score function in R for Windows. I'm new to using this program. Does
anyone know what this means?
I don't know exactly what it
Sorry, I forgot to add to my original post that I want to use the envir
argument of eval() so that I can specify a secondary data source as follows:
eval(expression(model.frame(formula, data = lookHereFirst), envir =
lookHereSecond, enclos = lookHereThird)
Your version of f1 does produce the
Dear R-useRs,
I've written a contribute (in Italian language)
concering fitting distribution with R. I believe it
could be usefull for someones. It's available on CRAN
web-site:
http://cran.r-project.org/doc/contrib/Ricci-distribuzioni.pdf
Here's the abstract:
This paper deals with
Hi Chris,
You could perform a graphical check before deciding which variance
function is reasonable to use. For example, in your case maybe
something like:
plot(model1, resid(., type=p)~Block)
would have shown that the variability depends on `Block' (note:
`Block' sounds like a categorical
Información de incidente:-
Base de datos: g:/notes/data/mail1.box
Originador: r-help@stat.math.ethz.ch@PROSEGUR
Destinatarios: [EMAIL PROTECTED]
Asunto: Mail Delivery (failure [EMAIL PROTECTED])
Fecha/Hora: 25/01/2005 10.32.53
El mensaje enviado a
many thanks for your great tip. I didn't know reshape.
Unfortunately in my real data, the values of my variables are ont all
within the same range. Therefore, what shall I change in the code to get
for each plot a scale, which is adjusted to the range of my variable?
thanks a lot
christoph
How about something like this?
mydata - matrix(runif(180), ncol=9)
mydata - as.data.frame(mydata)
mydata$V10 - rnorm(20, 50, 10)
mydata$GROUP - as.factor(rep(c(G1,G2), c(10,10)))
par(mfrow=c(2,5))
for(i in 1:10){
boxplot(mydata[,i] ~ mydata$GROUP, main=names(mydata)[i])
}
hope it helps,
Chuck
On 25-Jan-05 Weiguang Shi wrote:
Hi,
Is there a Zipf-like distribution RNG in R?
Thanks,
Weiguang
Zipf's Law (as originally formulated in studies of the
frequencies of words in texts) is to the effect that the
relative frequencies with which words occur once, twice,
3 times, ... are in
Hi,
when I performe LDA on some of my datasets I get the error message:
Error in lda.default(x, grouping, ...) : variable(s) 3 appear to be constant
within groups
I assume the reason is the small values of my varibale 3 ( e.g. 4.530353e-05).
Has someone a suggestion how to solve this problem?
Is there a specific reason why, instead of
CHAR(STRING_ELT(chstr, 0));
The S-Plus compatible
CHARACTER_POINTER(chstr)[0]
does not work in R?
--
Edzer
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
Hi all,
I'm fitting a linear model (using lm) to some 2500 data points. The
model consists of 4 single terms and two combined terms. I get the
following warning message:
Extra arguments projections are just disregarded. in: lm.fit(x, y,
offset = offset, singular.ok = singular.ok, ...)
Can
Hallo,
does anybody know if there is an implementation of the Spearman rank
correlation in R that gives a correct (or at least 'safe') p-value in
the case of ties??
I have browsed the R-help archives but I found nothing.
Thanks a lot in advance for any help,
Antonino Casile
Hi Piet,
did you put an argument named `projections' in you lm call? If you
look in lm.fit, then you'll see when this warning message appears.
E.g.,:
x - rnorm(100)
y - rnorm(100)
lm(y~x, projections=5)
Call:
lm(formula = y ~ x, projections = 5)
Coefficients:
(Intercept)x
-0.09678
Hi,
see: http://finzi.psych.upenn.edu/search.html and
search for Spearman test there are many results;
for Spearman rank test see:
cor.test(, method=spearman)
? cor.test
? rcorr {Hmisc}
? spearman2 (Hmisc)
http://finzi.psych.upenn.edu/R/library/Hmisc/html/rcorr.html
Regards,
Vito
you
On Tue, 25 Jan 2005, Edzer J. Pebesma wrote:
Is there a specific reason why, instead of
CHAR(STRING_ELT(chstr, 0));
The S-Plus compatible
CHARACTER_POINTER(chstr)[0]
does not work in R?
Yes.
This is really a question for R-devel, but briefly, R and S-PLUS store
character vectors in very
On Tue, 25 Jan 2005, Piet van Remortel wrote:
I'm fitting a linear model (using lm) to some 2500 data points. The
model consists of 4 single terms and two combined terms. I get the
following warning message:
Extra arguments projections are just disregarded. in: lm.fit(x, y,
offset = offset,
Hi,
In the archive I found a function for testing contrasts
after manova, based on solving 'LBM=K'. There are a few
questions on my mind:
1. A contrast between levels A and B of a certain factor
with levels ABC is given as (0 -1 0) because the
parameters for the intercept are fixed to zero in
Google really can be a very useful thing, in case you haven't found that.
This is the first hit I got with `agglomerative coefficient':
http://www.unesco.org/webworld/idams/advguide/Chapt7_1_4.htm
Andy
From: Weiguang Shi
I haven't read the book, but could anyone explain more
about this
Hello,
I have x and y data to plot (synthetic example):
x - seq(0,4*pi,by=0.1)
y - sin(x)
I then want to plot (x,y) in those points where abs(y) is smaller than
0.5. As a first approximation
plot(x[abs(y) 0.5],y[abs(y) 0.5])
is quite close - however I want to plot with lines, i.e.
Paul,
You don't want to write you own function. merge() will do that for
you very quickly and efficiently. Just to elaborate on Mike's reply,
here is an example of how to use merge:
test - merge(out, trt1m, by=gvkey)
names(out)
[1] gvkeydatadate PriceFV ER Rank
is quite close - however I want to plot with lines, i.e. type=l, and
then I get solid lines connecting the endpoint of one active region
to the start of the next active region, I would prefer to get rid of
those.
Is there a simple general solution to my problem?
Plot will draw disconnected
On Tue, 25 Jan 2005 14:57:18 +0100 Joakim Hove wrote:
Hello,
I have x and y data to plot (synthetic example):
x - seq(0,4*pi,by=0.1)
y - sin(x)
I then want to plot (x,y) in those points where abs(y) is smaller than
0.5. As a first approximation
plot(x[abs(y) 0.5],y[abs(y)
Barry Rowlingson [EMAIL PROTECTED] writes:
Is there a simple general solution to my problem?
Plot will draw disconnected lines if there are NA values in the
vector of X or Y values, so if you do:
x - seq(0,4*pi,by=0.1)
y - sin(x)
x[abs(y)=0.5]=NA
y[abs(y)=0.5]=NA
Hello all,
I found a weird result of the GLM function that seems
to be a bug.
The code:
a=c(rep(1,8),rep(2,8))
b=c(rep(0,8),rep(3,8))
cbind(a,b)
model=glm(b~a, family=poisson)
summary(model)
generates a dataset with two groups. One group
consists entirely of zeros, the other of 3s (as
a simple approach is to use NAs, i.e.,
x - seq(0,4*pi,by=0.1)
y - sin(x)
##
x. - x; x.[!abs(y) 0.5] - NA
y. - y; y.[!abs(y) 0.5] - NA
plot(x., y., type=l)
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic
Dear R users,
Is it reasonable to transform data (measurements of plant height) to the
power of 1/4? I´ve used boxcox(response~A*B) and lambda was close to 0.25.
Regards,
Christoph
__
R-help@stat.math.ethz.ch mailing list
I have a data frame containing children, with variables 'year' = birth
year, and 'm.id' = mother's id number. Let's assume that all the births of
each mother is represented in the data frame.
Now I want to create a subset of this data frame containing all children,
whose mother's first birth was
On Tue, Jan 25, 2005 at 06:22:26AM -0800, Florian Menzel wrote:
Hello all,
I found a weird result of the GLM function that seems
to be a bug.
The code:
a=c(rep(1,8),rep(2,8))
b=c(rep(0,8),rep(3,8))
cbind(a,b)
model=glm(b~a, family=poisson)
summary(model)
generates a dataset
Hi
Running R v2.0 on SuSe linux 8.2.
I'm trying to build a package (which built perfectly on Windows...) on
Linux, and I ran:
R CMD check mypackage
I got:
* checking mypackage-maual.tex ... ERROR
LaTeX errors when creating DVI version
This typically indicates Rd problems
OK, there are no
On Tuesday 25 January 2005 03:42, Christoph Lehmann wrote:
many thanks for your great tip. I didn't know reshape.
Unfortunately in my real data, the values of my variables are ont all
within the same range. Therefore, what shall I change in the code to
get for each plot a scale, which is
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Florian Menzel
Sent: Tuesday, January 25, 2005 3:22 PM
To: r-help@stat.math.ethz.ch; r-help@stat.math.ethz.ch
Subject: [R] GLM function with poisson distribution
Hello all,
I found a weird
From: Göran Broström
I have a data frame containing children, with variables 'year' = birth
year, and 'm.id' = mother's id number. Let's assume that all
the births of
each mother is represented in the data frame.
Now I want to create a subset of this data frame containing
all
From: michael watson (IAH-C)
[snip]
I have in my notes that I used to use:
R CMD R2dvi
But that now returns an error saying R2dvi is not found... Did this
change when upgrading to v2? Or are my notes wrong?
Would that be `Rd2dvi' by any chance? If so, it's still there...
Andy
So
your approach, after omitting the as.numeric() in the second line,
seems to work even for `m.id' being factor, i.e.,
dat - data.frame(m.id=rep(letters[1:10], 10), year=sample(1805:1950,
100, TRUE))
###
mid - tapply(dat$year, dat$m.id, min)
mid - names(mid)[mid = 1816]
dat. -
michael watson (IAH-C) wrote:
Hi
Running R v2.0 on SuSe linux 8.2.
I'm trying to build a package (which built perfectly on Windows...) on
Linux, and I ran:
R CMD check mypackage
I got:
* checking mypackage-maual.tex ... ERROR
LaTeX errors when creating DVI version
This typically indicates Rd
On Tue, 25 Jan 2005, Florian Menzel wrote:
Hello all,
I found a weird result of the GLM function that seems
to be a bug.
No, the problem is that you are using the Wald test when the mle is
infinite, which is always going to be unreliable. It's even worse because
you are using data that couldn't
Ah! I think this is what happened -- whenever I restarted R, it would
automatically load the previous workspace and its objects (call this
workspace 1). Then, when I would attempt to load another workspace (call
this workspace 2), it would retain the objects from workspace 1 in ADDITION
to the
Thanks Andy. Google is really useful.
But that page doesn't answer my question, does it?
I repeat: AC highly depends on the value of the
dissimilarity of the last merge.
My question: what is the use of AC?
Weiguang
--- Liaw, Andy [EMAIL PROTECTED] wrote:
Google really can be a very
Hello
Could you please suggest a way to find out the r square values for each
independent variable while using lm for developing a multiple linear
regression model.
Thank you
avneet
I have no data yet. It is a capital mistake to theorize before one has
data. Insensibly one begins to twist facts
Hi!
I am newbee to R and I am facing the problem in plotting
the dedrogram with lot of objects. The lines and labels are overlapped very
badly, and writing the graphic to postscript and zooming there is not helping
either. I tried cut.dendrogram method, but getting the error that it doesn't
Hi!
I am newbee to R and I am facing the problem in plotting
the dedrogram with lot of objects. The lines and labels are overlapped very
badly, and writing the graphic to postscript and zooming there is not helping
either. I tried cut.dendrogram method, but getting the error that it doesn't
Think the problem I had with the bandplot (gplots) function is solved by
changing the expand.dots = FALSE to expand.dots = TRUE.
Don't understand actually why it says FALSE here, because that means it
does *not* pass extra arguments to plot.
If I change it to TRUE, my main/xlab/ylab arguments are
Samatha,
Look at ?cutree.
Sean
On Jan 25, 2005, at 1:06 PM, [EMAIL PROTECTED] wrote:
Hi!
I am newbee to R and I am facing the problem in plotting
the dedrogram with lot of objects. The lines and labels are overlapped
very
badly, and writing the graphic to postscript and zooming there is not
I think you need to use just:
cut
You may also want to look at:
cutree
-Original Message-
From: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED]
Sent: Tue 1/25/2005 6:06 PM
To: r-help@stat.math.ethz.ch
Cc:
Subject:[R] Plotting hclust with lot of objects
Hi!
I am
On Tue, Jan 25, 2005 at 10:43:24AM -0500, Liaw, Andy wrote:
From: Göran Broström
I have a data frame containing children, with variables 'year' = birth
year, and 'm.id' = mother's id number. Let's assume that all
the births of
each mother is represented in the data frame.
Now I
Hi,
I am trying to make a multi-class classification tree by using rpart.
I used MASS package'd data: fgl to test and it works well.
However, when I used my small-sampled data as below, the program seems
to take forever. I am not sure if it is due to slowness or there is
something wrong with my
From: WeiWei Shi
Hi,
I am trying to make a multi-class classification tree by using rpart.
I used MASS package'd data: fgl to test and it works well.
However, when I used my small-sampled data as below, the program seems
to take forever. I am not sure if it is due to slowness or there is
The example ducks that issue. Someone needs to write a function for
merging these results. Probably just involves making a suitable call
to boot.return, which is what happens at the end of boot(), but I
don't know if anyone has actually done this yet.
luke
On Fri, 21 Jan 2005, BEER Michael
Hi, Andy:
Thanks. It works after I removed the variable. I think I got a similar
problem when I used randomForest. And I am not sure if they were due
to the same reason.
Practically and Unfortunately, that variable is very important to the
accuracy. I am wondering if there is another way besides
Hi everyone,
How can I calculate systematic and stochastic components for SUR, 2SLS,
W2SLS, 3SLS models. I am using systemit library for multiple equations.
Thanks
--
Ferdinand Alimadhi
Programmer / Analyst
Harvard University
Center for Basic Research in the Social Sciences
(617) 496-0187
Dear R users;
I am using R for a project. I have some PHP forms that
pass parameters to R for calculations, and publish the
result in HTML format by CGIwithR. I'm using a Linux
machine and every things work perfectly. However, it
is too slow, it takes 5 to 10 seconds to run, and
even if I start
Hi, All:
The variable is used to encode industries: like computer science,
electronics and so on. Therefore, there is no order in them.
My previous effforts indicate that grouping them according to some
domain knowledge decreases the accuracy. However, using some
distance or entropy is my
My standard algorithm for improving speed is as follows:
1. Identify what takes the most time.
2. Try to find ways in R to speed it up, e.g., converting loops
to vector operations. Many tasks in R can be performed in a variety of
different ways to get the same result but
You could break your 3 class problem into several (2 or 3) 2 class problems,
and then use Andy's suggestion (see the CART book). There are several ways
to break the problem into 2 class problems, and several ways to combine the
resulting classifiers. Tom Dietterich, Jerry Friedman, Trevor Hastie
Thanks very much Ted for the detailed explanation.
It might be flawed but some common practices in my
area use the following approach to generate a random
rank for some Zipf-like distribution with the
parameter alpha.
The key is to introduce the limit of ranks, N. With N
and alpha, therefore,
I have one data frame with a column of dates and I want to fill another data
frame with one column of dates, one of years, one of months, one of a unique
combination of year and month, and one of days, but R seems to have some
problems with this. My initial data frame looks like this (ignore the
From: Uwe Ligges
WeiWei Shi wrote:
Hi, Andy:
Thanks. It works after I removed the variable. I think I
got a similar
problem when I used randomForest. And I am not sure if they were due
to the same reason.
Practically and Unfortunately, that variable is very
important to the
Hello,
I am interested in fitting a generalized nonlinear regression (gnlr) model
with negative binomial errors.
I have found Jim Lindsay's package that will do gnlr, but I have having
trouble with the particular model I am interested in fitting.
It is a threshhold model, where below a
A few things to add to what Spencer said:
- Please give more info about your setup, as the posting guide asks you to
(e.g., R version, OS [which Linux distro and which release?], hardware).
These things matter! As an example, the time it takes to start an R process
was dramatically reduced since
Hi
Paul Murrell wrote:
Hi
Bobai Li wrote:
Hi,
I have been using R to create some mathematical and statistical graphs
for a book manuscript, but I got some problems:
1) Some web positngs said that default typeface for math expressions
is italic, but in my system (R 2.01 on WinXP), the default
hello,
i wonder what command should i used in R to do the modular.
right now i have a vector v - c(3, 4, 5, 6), but i have tried v%2 or v mod 2
or mod(v, 2) or modular(v, 2), and none of these works.
Also, how can i find more function command online, i have to search in the
mailing list
From: Cuichang Zhao
hello,
i wonder what command should i used in R to do the modular.
right now i have a vector v - c(3, 4, 5, 6), but i have
tried v%2 or v mod 2 or mod(v, 2) or modular(v, 2), and none
of these works.
It's `%%', as in v %% 2.
Also, how can i find more function
Thomas Lumley [EMAIL PROTECTED] writes:
On Tue, 25 Jan 2005, Florian Menzel wrote:
Hello all,
I found a weird result of the GLM function that seems
to be a bug.
No, the problem is that you are using the Wald test when the mle is
infinite, which is always going to be unreliable. It's
Ken Termiso [EMAIL PROTECTED] writes:
Ah! I think this is what happened -- whenever I restarted R, it would
automatically load the previous workspace and its objects (call this
workspace 1). Then, when I would attempt to load another workspace
(call this workspace 2), it would retain the
Hi Vito
The document seems a systematic and organized primer on distribution fitting
in R. Thanks for sharing it with the R community!. Are you planning to make
it available in English? I would offer you help with the translation but I
don't know enough italian to be useful for this task!
From: Peter Dalgaard
Kemp S E (Comp) [EMAIL PROTECTED] writes:
I have got as far as being able to compute the residual noise, a_t.
However, I am slightly confused about what to do next. Reading
Box-Jenkins, 1976 (pp. 391) they state the following
However, it seems simplest to
Hi,
Are there any plans to do multi line commenting? like /*...*/
Jean
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
On Tue, 25 Jan 2005, Liaw, Andy wrote:
From: WeiWei Shi
Hi,
I am trying to make a multi-class classification tree by using rpart.
I used MASS package'd data: fgl to test and it works well.
However, when I used my small-sampled data as below, the program seems
to take forever. I am not sure if it
Benjamin M. Osborne Benjamin.Osborne at uvm.edu writes:
:
: I have one data frame with a column of dates and I want to fill another data
: frame with one column of dates, one of years, one of months, one of a unique
: combination of year and month, and one of days, but R seems to have some
:
On Tue, 25 Jan 2005, Jean Eid wrote:
Are there any plans to do multi line commenting? like /*...*/
This has been discussed on R-devel (the appropriate place!) in 2005.
Please see the archives at
https://stat.ethz.ch/pipermail/r-devel/2005-January/031833.html
Short answer: No.
Slightly longer
Hello,
how can use change the plot function to change the range of axises. I want my
graph from a certain range [a, b], instead of from the min to max of of datas?
if i want draw a line instead of dots, should i use both plot and lines
function.
for example:
plot(x, y);
lines(x, y);
things
Liaw, Andy wrote:
From: Uwe Ligges
WeiWei Shi wrote:
Hi, Andy:
Thanks. It works after I removed the variable. I think I
got a similar
problem when I used randomForest. And I am not sure if they were due
to the same reason.
Practically and Unfortunately, that variable is very
important to the
On Tue, 25 Jan 2005 16:03:57 +0100
Göran Broström [EMAIL PROTECTED] wrote:
On Tue, Jan 25, 2005 at 06:22:26AM -0800, Florian Menzel wrote:
Hello all,
I found a weird result of the GLM function that seems
to be a bug.
The code:
a=c(rep(1,8),rep(2,8))
b=c(rep(0,8),rep(3,8))
83 matches
Mail list logo