AugS == [EMAIL PROTECTED]
on Wed, 22 Feb 2006 17:13:17 +1100 writes:
AugS Good day everyone,
AugS I want to use the Gram-Charlier series expansion to model
AugS some data. To do that, I need functions to:
AugS 1) Calculate 'n' moments from given data
AugS 2)
On Tue, 21 Feb 2006 11:08:38 -0600 (CST), David Forrest wrote:
perhaps binning of package sm is what you want
best wishes,
Adelchi Azzalini
DF Hi all,
DF
DF I'd like to quantize a variable to map it into a limited set of
DF integers for use with a colormap. image and filled.contour do
DF
Hi.
I have a factor and I want to extract just those elements that appear
exactly once.
How to do this?
Toy example follows.
a - as.factor(c(rep(oak,5) ,rep(ash,1),rep(elm,1),rep
(beech,4)))
a
[1] oak oak oak oak oak ash elm beech beech beech beech
Levels: ash beech elm oak
Martin Maechler writes:
AugS == [EMAIL PROTECTED]
on Wed, 22 Feb 2006 17:13:17 +1100 writes:
AugS Good day everyone,
AugS I want to use the Gram-Charlier series expansion to model
AugS some data. To do that, I need functions to:
AugS 1) Calculate 'n'
another approach is:
names(which(table(a) == 1))
but I don't know if you find this more elegant :)
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel:
Hi Quin,
the package 'drc' on CRAN deals with modelling dose-response curves.
Moreover it allows adjustment for heterogeneity by means of
transformation (Box-Cox transformation)
modelling the variance as a power of the mean.
See the package documentation for more features.
Christian
I would take the line that if they hadn't pre-specified any stopping rules, the
only reason to stop is safety or new external data. I would be very suspicious
of requests from the steering committee to stop for futility - they should be
blinded so why are they thinking futility unless results
I believe this page includes more up to date version:
http://fisher.utstat.toronto.edu/david/Sym2004/Sym2004.html
Janusz.
On Wed, 22 Feb 2006, Ernst Hansen wrote:
Martin Maechler writes:
AugS == [EMAIL PROTECTED]
on Wed, 22 Feb 2006 17:13:17 +1100 writes:
AugS Good day
Hi Dmitris, and list
On 22 Feb 2006, at 09:24, Dimitris Rizopoulos wrote:
another approach is:
names(which(table(a) == 1))
but I don't know if you find this more elegant :)
well, thank you for this (which() is good here!) but this is still
inelegant IMHO
because it uses the names()
I think the idea of defining dir1 and dir2 is a good one. If you want to
simplify life even further, you can put these into files that get
initialised when R starts. See help(Startup) for details.
Regards, Adai
On Wed, 2006-02-22 at 16:54 +1100, [EMAIL PROTECTED] wrote:
Tom,
You can define
Dear everyone,
the following problem: Our group has written a lengthy program in c++, to which
we would like to add some additional features. Because we are not sure if those
features are actually useful, we would prefer to take a quick and dirty
approach just to try them out. The additional
A slight variation on your solution but hopefully more readable:
names( which( table(a) == 1 ) )
Regards, Adai
On Wed, 2006-02-22 at 09:11 +, Robin Hankin wrote:
Hi.
I have a factor and I want to extract just those elements that appear
exactly once.
How to do this?
Toy
I want to get the logLik to calculate McFadden.R2 ,ML.R2 and
Cragg.Uhler.R2, but the value from multinom does not have logLik.So my
quetion is : is logLik meaningful to multinomial logistic model from
multinom?If it does, how can I get it?
Thank you!
ps: I konw VGAM has function to get the
On Wed, 22 Feb 2006, Robin Hankin wrote:
Hi Dmitris, and list
On 22 Feb 2006, at 09:24, Dimitris Rizopoulos wrote:
another approach is:
names(which(table(a) == 1))
but I don't know if you find this more elegant :)
Since the names of the table are the levels of the factor, I would use
Dear R users,
I'm trying to read data from a tab-delimited text file to
R, but I have problems with missing values. R gives this
kind of error messages: line 1 did not have 9 elements.
Could someone tell me how I can deal with missing values
in this case?
Thanks a lot in advance,
Istvan
David Duffy [EMAIL PROTECTED] writes:
Date: Mon, 20 Feb 2006 16:43:55 -0600
From: Aldi Kraja [EMAIL PROTECTED]
Hi,
Using package gclus in R, I have created some graphs that show the
trends within subgroups of data and correlations among 9 variables (v1-v9).
Being interested for more
This is discussed in the `Writing R Extensions' manual which ships with
every copy of R.
Yes, it is possible and widely used. For example, this is how optim() and
nls() work.
See the posting guide, which clearly indicates this is a topic for
the R-devel list.
On Wed, 22 Feb 2006, [EMAIL
Le 22.02.2006 13:25, [EMAIL PROTECTED] a écrit :
Dear everyone,
the following problem: Our group has written a lengthy program in c++, to
which we would like to add some additional features. Because we are not sure
if those features are actually useful, we would prefer to take a quick and
Hello R-Experts,
Currently I'm using RBloomberg package in R-2.2.1 in Windows machine (
XP). When I'm running one specific example using blpGetData given in
help file I'm getting the following error message.
conn - blpConnect()
edb - blpGetData(conn, ED1 Comdty, PX_LAST,
Does using read.delim instead of read.table fix your problem?
Sean
On 2/22/06 7:40 AM, I.Szentirmai [EMAIL PROTECTED] wrote:
Dear R users,
I'm trying to read data from a tab-delimited text file to
R, but I have problems with missing values. R gives this
kind of error messages: line 1 did
I am not sure whether this is desirable but here is another way just
in case:
paste(setdiff(a, a[duplicated(a)]))
You could replace paste with as.character if you prefer or
could remove it entirely if you want the result as a factor.
On 2/22/06, Robin Hankin [EMAIL PROTECTED] wrote:
Hi.
I
Robin Hankin [EMAIL PROTECTED] writes:
Hi Dmitris, and list
On 22 Feb 2006, at 09:24, Dimitris Rizopoulos wrote:
another approach is:
names(which(table(a) == 1))
but I don't know if you find this more elegant :)
well, thank you for this (which() is good here!) but
might be, but I have already found another solution:
reat.table(file,sep=\t)
Thanks,
Istvan
On Wed, 22 Feb 2006 07:54:49 -0500
Sean Davis [EMAIL PROTECTED] wrote:
Does using read.delim instead of read.table fix your
problem?
Sean
On 2/22/06 7:40 AM, I.Szentirmai [EMAIL PROTECTED]
Hello everyone.
For reasons too long to explain I wanted to do plots similar to histograms with
plot(type=h).
I ran into a problem - if I set line width too high, histogram isn't accurate
anymore.
For example:
par(lend=2)
plot(c(2,4,3,2),ylim=c(0,5), type=h)
abline(h=3)
Column 3 appears
Hello,
I have a very simple question about 2 barplots in the same graph.
It seems quite easy, but I searched google for long time, haven't find
solution.
For example, I want one graph like:
x1=seq(0,2,by=0.3)
x2=seq(3,0,by=-0.1)
barplot(x1,col=red)
barplot(x2,col=green)
It means if it's on the
Dear All,
I'm using a glm to analyse the effect of year on a
variable with poisson distribution. Using the summary() I
can test whether years are different from each other, but
how can I test whether year has an overall effect on my
respons variable? My guess is that by a Wald-test, but I
On Wed, 22 Feb 2006, ronggui wrote:
I want to get the logLik to calculate McFadden.R2 ,ML.R2 and
Cragg.Uhler.R2, but the value from multinom does not have logLik.So my
quetion is : is logLik meaningful to multinomial logistic model from
multinom?If it does, how can I get it?
From the help
Gasper Cankar wrote:
Hello everyone.
For reasons too long to explain I wanted to do plots similar to histograms
with plot(type=h).
I ran into a problem - if I set line width too high, histogram isn't accurate
anymore.
For example:
par(lend=2)
plot(c(2,4,3,2),ylim=c(0,5), type=h)
So it's valid to get logLik (deviance/-2) when the summ argument is unused?
Thank you.
2006/2/22, Prof Brian Ripley [EMAIL PROTECTED]:
On Wed, 22 Feb 2006, ronggui wrote:
I want to get the logLik to calculate McFadden.R2 ,ML.R2 and
Cragg.Uhler.R2, but the value from multinom does not have
Gasper Cankar gasper.cankar at ric.si writes:
Hello everyone.
For reasons too long to explain I wanted to do plots similar to histograms
with plot(type=h).
I ran into a problem - if I set line width too high, histogram isn't accurate
anymore.
try par(lend=1) instead. Far from obvious,
Dear Prof. Ripley
I'm sorry about the confusion; this reply will simply avoid any humor
attempts (good or bad).
About S
I'm sorry, as a user I was not aware of any S still existing outside
of s-plus or R. So your right, the procedure I was referring to was
conducted on s-plus. I used the GUI
Hi Gašper
On Wed, 2006-02-22 at 14:12 +0100, Gasper Cankar wrote:
Hello everyone.
For reasons too long to explain I wanted to do plots similar to histograms
with plot(type=h).
I ran into a problem - if I set line width too high, histogram isn't accurate
anymore.
For example:
On Tue, 2006-02-21 at 12:49 -0800, Bryan Sykes wrote:
Hi:
I have tried (unsuccessfully) to change the default
background color for my xyplot. I have used
trellis.device(bg = white, new = F) and
par(bg=white) before my xyplot command. Yet the
color of the background has not changed. Is
On 2/21/06, Christoph Buser [EMAIL PROTECTED] wrote:
Hi Rick
There may be a better way, but the following should work:
attributes(vc.fit)$sc
That works but a more direct way would be
attr(vc.fit, sc)
By the way, that value is the estimated standard deviation not the
estimated variance.
See ?barplot
If I understand what you want, try:
barplot(x1,border=red,density=0)
par(new=TRUE)
barplot(x2,border=green,density=0)
Rob
Robert W. Baer, Ph.D.
Associate Professor
Department of Physiology
A. T. Still University of Health Science
800 W. Jefferson St.
Dear ronggui,
You could use deviance().
Regards,
John
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox
-Original Message-
From:
I have experienced a similar problem when saving Excel data in this
format. When any of the variables, except the last, contained missing
values, there was not a problem. However, the problem occurred when the
last variable contained missing values. My guess is that the last
delimiter was left
Here is a function for calculating the measures of fit for
multinomial logistic model (using nnet::multinom).If anything wrong ,I
hope experts point it out.Thank you.
fitstat - function(object) {
#thanks Ripley, B. D. for telling how to get the LogLik and when is invalid.
{if
please excuse me if this ones a basic error
y-c(-0.7,-0.6,-0.5)
-0.7^1.22
[1] -0.6471718
y^1.22
[1] NaN NaN NaN
am I missing something important in my basic math?
__
R-help@stat.math.ethz.ch mailing list
If you do not want to use csv file transfer you can:
Open Excel
select data
Ctrl-C
Open R
your.data - read.delim(clipboard)
will transfer clipboard contents of clipboard into your.data.
HTH
Petr
On 21 Feb 2006 at 8:52, Carl Klarner wrote:
Date sent: Tue, 21 Feb 2006 08:52:04
Hello,
I have R for Mac OS X Aqua GUI Version 1.14 with R 2.2.0 Framework. I
got following warnings when installing qtl package 1.01-9 from CRAN
(sources) on the austrian mirror:
warning 1:
ld: warning multiple definitions of symbol _signgam
When reshaping a dataframe in which there are unused factor levels in the id
variable, I get the following error:
Error in if (!all(really.constant)) warning(gettextf(some constant variables
(%s) are really varying, :
missing value where TRUE/FALSE needed
For example,
df -
On Wed, 22 Feb 2006, I.Szentirmai wrote:
Dear All,
I'm using a glm to analyse the effect of year on a
variable with poisson distribution. Using the summary() I
can test whether years are different from each other, but
how can I test whether year has an overall effect on my
respons
On Wed, 2006-02-22 at 14:31 +0100, jia ding wrote:
Hello,
I have a very simple question about 2 barplots in the same graph.
It seems quite easy, but I searched google for long time, haven't find
solution.
For example, I want one graph like:
x1=seq(0,2,by=0.3)
x2=seq(3,0,by=-0.1)
I'm trying to plot a dendrogram object which is created using
as.dendogram function. It works fine however I can not change the
yaxis limits of the plot.
tree-as.dendrogram(hclust(as.dist(dissim),method=single))
plot(tree,ylim=range(0,20))
Error in plot.default(0, xlim = xlim, ylim =
And an added US$.02 is that the raw response (optical density, counts (large
numbers) of radio decay, fluorescence units, etc.) in dose response curves
often varies over several orders of magnitude, so that, in conformance to
John Tukey's First Aid suggestions, a log transformation or something
The barplot solution already presented is probably what you want
but just in case here is a zoo solution:
library(zoo)
z - merge(zoo(x2), zoo(x1, seq(x1)+.5))
plot(z, type = h, plot.type = single, col = 1:2, lwd = 5)
Or a similar solution without zoo:
plot(c(x1, x2) ~ c(seq(x1)+.5, seq(x2)),
On Wed, 22 Feb 2006, tom wright wrote:
please excuse me if this ones a basic error
y-c(-0.7,-0.6,-0.5)
-0.7^1.22
[1] -0.6471718
?Syntax shows ^ has a higher precedance than -, so that is
-(0.7^1.22)
y^1.22
[1] NaN NaN NaN
am I missing something important in my basic math?
On 22-Feb-06 tom wright wrote:
please excuse me if this ones a basic error
y-c(-0.7,-0.6,-0.5)
-0.7^1.22
[1] -0.6471718
y^1.22
[1] NaN NaN NaN
am I missing something important in my basic math?
Ummm, not sure ... it depends where the explanation fits in.
It's certainly important, but
Thank you Spencer and Steve for your helpful comments. If I may, I
would like to elaborate on some of the points you raise.
Stephen A Roberts wrote:
I would take the line that if they hadn't pre-specified any stopping
rules, the only reason to stop is safety or new external data. I
would be
On Wed, 22 Feb 2006, tom wright wrote:
please excuse me if this ones a basic error
y-c(-0.7,-0.6,-0.5)
-0.7^1.22
[1] -0.6471718
y^1.22
[1] NaN NaN NaN
am I missing something important in my basic math?
Yes.
Non-integer powers of negative numbers don't work (well, they are complex
Hello all,
I am using the heatmap.2 function in the gplots package. I want to supress the
reordering of the columns of the data matrix i pass to the function. I used the
statement,
heatmap.2(z,Colv=FALSE,dendrogram=row,col=redgreen(75))
where z, is the matrix of data. The output i want should
On Wed, 22 Feb 2006, Daniel Farewell wrote:
When reshaping a dataframe in which there are unused factor levels in
the id variable, I get the following error:
Error in if (!all(really.constant)) warning(gettextf(some constant variables
(%s) are really varying, :
missing value where
Dear All,
I'm trying to run a model on a subset of my data
identified by year = 2002. Does anyone know whats wrong
with the syntax below:
glmmPQL(desm~desdat,random=~1|male,family=quasibinomial,
data=mcare,subset=year=2002)
I get an error message all the time, but it worked with
string
-0.7^1.22
[1] -0.6471718
(-0.7)^1.22
NaN
Arithmetically this makes perfect sense, syntactically I'm not sure it does.
z-c(-0.7)
z == -0.7
[1] TRUE
z^1.22
[1] NaN
I remember a programming homily: if you are unsure of the operator
precedence then you shouldn't assume the person who has to
Hello Akkineni,
This bug has already been reported and we have a tentative solution that we are
testing. I'll send you a copy of the modified code once we finish testing.
-G
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Akkineni,Vasundhara
Sent:
On 2/22/06 12:09 PM, Akkineni,Vasundhara [EMAIL PROTECTED]
wrote:
Hello all,
I am using the heatmap.2 function in the gplots package. I want to supress the
reordering of the columns of the data matrix i pass to the function. I used
the statement,
Hello all,
I am fairly new to R and am trying to bring together data from multiple
sources. Here is one problem that I cannot seem to crack I hope somebody can
help. Let me simplify the problem: Lets say I have two datasets: DATA1 and
DATA2. I would like to work with all the cases in
Dear R-users,
I have two dataframes FIRST and SECOND that do not share any rows
(i.e., there is no unique identifier linking the rows in the two
dataframes, the rows are independent).
The dataframes have three variables (in columns) in common, but each
dataframe also has some variables not
You need year == 2002.
Andy
From: I.Szentirmai
Dear All,
I'm trying to run a model on a subset of my data
identified by year = 2002. Does anyone know whats wrong
with the syntax below:
glmmPQL(desm~desdat,random=~1|male,family=quasibinomial,
data=mcare,subset=year=2002)
I get
Brian Perron wrote:
Hello all,
I am fairly new to R and am trying to bring together data from multiple
sources. Here is one problem that I cannot seem to crack – I hope somebody
can help. Let me simplify the problem: Let’s say I have two datasets:
DATA1 and DATA2. I would like to
first - data.frame(a=1:3, b=4:6)
second - data.frame(b=7:9, c=10:12)
third - merge(first, second, by=b, all=TRUE)
third
b a c
1 4 1 NA
2 5 2 NA
3 6 3 NA
4 7 NA 10
5 8 NA 11
6 9 NA 12
It's easy to replace the Nas with whatever value you want.
No, merge() does not work with more than
Something like this?
data1 - data.frame(id=c(1, 3, 5), x=runif(3))
data2 - data.frame(id=1:10, y=runif(10))
data3 - merge(data1, data2, by=id, all.x=TRUE, all.y=FALSE)
data3
id x y
1 1 0.9533341 0.1803271
2 3 0.9143624 0.5033228
3 5 0.2866931 0.4233733
Andy
From: Brian
Dear Istvan,
You might want to take a look at the Anova() and linear.hypothesis()
functions in the car package.
Regards,
John
On Wed, 22 Feb 2006, I.Szentirmai wrote:
Dear All,
I'm using a glm to analyse the effect of year on a
variable with poisson distribution. Using the summary()
Does R have any equivalent for proc nlin?
Thanks,
Elizabeth Lawson
-
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing list
On Wed, 2006-02-22 at 11:57 -0500, Kevin E. Thorpe wrote:
Thank you Spencer and Steve for your helpful comments. If I may, I
would like to elaborate on some of the points you raise.
Kevin,
I am not sure if you received any offlist replies to your post. Given
the subject matter, I had
Dear list members,
I would like to plot a time series, with grayshaded background in time
phases were the value of the timeseries exceeds the mean value. For
example, if the temperature from 1995-1998 exeeds the mean value between
1980 and 2005, the background in the plot from 1995-1998 shall
Does this thread help?
https://stat.ethz.ch/pipermail/r-help/2006-February/086874.html
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Thomas Hoffmann
Sent: Wednesday, February 22, 2006 2:17 PM
To: r-help@stat.math.ethz.ch
Subject: [R] shaded
Dear Elizabeth,
See ?nls. [You could have found this via help.search(nonlinear least
squares).]
I hope this helps,
John
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox
I used Colv=1:ncol(z), and i got the display the way i need it. Thanks.
One more question, is there a way to increase the size of the color key in
heatmap.2 so that all the tick values(for Eg.,in my case, values range between
10,000-50,000) can be seen clearly. In the normal case i am just able
On 2/22/06 3:15 PM, Akkineni,Vasundhara [EMAIL PROTECTED]
wrote:
I used Colv=1:ncol(z), and i got the display the way i need it. Thanks.
One more question, is there a way to increase the size of the color key in
heatmap.2 so that all the tick values(for Eg.,in my case, values range
I would like to see how the matrix multiplication operator %*% is implemented
(because I want to see which external Fortran/C routines are used). How can I
do so?
Best
Søren
__
R-help@stat.math.ethz.ch mailing list
On Wed, 22 Feb 2006, Søren Højsgaard wrote:
I would like to see how the matrix multiplication operator %*% is
implemented (because I want to see which external Fortran/C routines are
used). How can I do so? Best Søren
[This is probably a R-devel question: please study the posting guide.]
get(%*%)
tells you that it is a primitive (i.e., implemented in C). The file
R_HOME/src/main/names.c directs you to do_matprod, in file
R_HOME/src/main/array.c.
Martin
Søren Højsgaard [EMAIL PROTECTED] writes:
I would like to see how the matrix multiplication operator %*% is implemented
Dear all
Somebody may have asked this before but I could not find any answers in the web
so let me ask a question on lme.
When I have a fixed factor of, say, three levels (A, B, C), in which each level
has different size (i.e. no. of observations; e.g. ABC). When I run an lme
model, I get the
Hi All,
What is the R function for computing multinomial distribution, e.g. f(2,1,3;
2/9, 1/6, 11/18, 6)?
That is, a total of 6 trials, event 1's p1=2/9, x1=2, event 2's p2=1/6, x2=1,
and event 3's p3=11/18, x3=3.
thanks,
Johnny
[[alternative HTML version deleted]]
?sample
sample(1:3, 6, TRUE, prob=c(2/9, 1/6, 11/18))
On 2/22/06, Li,Qinghong,ST.LOUIS,Molecular Biology
[EMAIL PROTECTED] wrote:
Hi All,
What is the R function for computing multinomial distribution, e.g.
f(2,1,3; 2/9, 1/6, 11/18, 6)?
That is, a total of 6 trials, event 1's p1=2/9,
Qinghong:
R Has an extensive Help system which you should learn to use.
help.search('multinomial')
?Multinomial
Jim: sample() is wrong -- it gives random samples, not probabilities.
-- Bert Gunter
Genentech Non-Clinical Statistics
South San Francisco, CA
-Original Message-
From:
Thanks Jim. I think my previous posting wasn't clear enough. What I try to do
is to compute the probability: f(2,1,3; 2/9, 1/6, 11/18, 6). (If we compute by
hand, it is 0.1127). What is the R funtion for doing that?
I know for binomial tests, there is a function called binom.test. But for
Thanks. That is what I try to find. You know what, I have tried ?multinomial,
but it didn't recognize. It is case sensitive I guess.
Johnny
-Original Message-
From: Berton Gunter [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 22, 2006 5:44 PM
To: 'jim holtman';
This is what I get when I try ?multinomial:
?multinomial
No documentation for 'multinomial' in specified packages and libraries:
you could try 'help.search(multinomial)'
^^
Which leads to ?Multinomial and Bert's advice below.
--sundar
I think this happens because degrees of freedom in lme are calculated using the
containment method (see documentation to proc mixed in SAS if you don't know
the method).
Formally this means that the t-tests are wrong for (most) unbalanced designs.
However, if the sample sizes are not too
Hi Adai,
I think your solution only works if the rows of the data frame are ordered
by date and
the ordering function is the same used to order the levels of
factor(df$date) ?
It turns out (as I implied in my question) my data is indeed organized in
this manner, so my
current problem is
maneesh deshpande [EMAIL PROTECTED] writes:
Hi Adai,
I think your solution only works if the rows of the data frame are ordered
by date and
the ordering function is the same used to order the levels of
factor(df$date) ?
It turns out (as I implied in my question) my data is indeed
Hi,
I am trying to build R 2.2.1 with Kazushige Goto's BLAS library (libgoto) and
encountered a problem: I have two computers with the almost identical
hardware (P4 Northwood CPU, i875 chipset, 2GB DDR400 RAM) and identical Linux
OS. I have the latest version of libgoto for this CPU installed
85 matches
Mail list logo