dear List:
glm(a~b+c,family=binomial,data=x)-fit
deviance(fit) returns the same as the residual deviance.
I don't not know much about logistic regression.Some book tells that:
Deviance (likelihood ratio statistic):
Deviance = -2log( likelihoodof the currentmodel /likelihoodof thesaturated
You appear to have fitted a seasonal model to a non-seasonal time series.
See ?ts for how to set up a time series (a step you seem to have omitted),
and ?arima for how to specify the model in R.
Otherwise, this is not the place for a tutorial on fitting time series,
and many of us do not offer
On Nov 20, 2007 7:04 PM, Moshe Olshansky [EMAIL PROTECTED] wrote:
You can do the following:
set1 - Matrix1[,1]
set2 - Matrix2[,1]
common - intersect(set1,set2)
ind1 - which(set1 %in% common)
ind2 - which(set2 %in% common)
A1 - Matrix1[ind1,-1]
A2 - Matrix2[ind2,-1]
Ok, this far.
and
On Tue, 20 Nov 2007, Tim Hesterberg wrote:
I wrote the original rowSums (in S-PLUS).
There, rowSums() does not coerce integer to double.
Actaully, neither does R. It computes a double answer but does no
coercion per se.
However, one advantage of coercion is to avoid integer overflow.
Hi
[EMAIL PROTECTED] napsal dne 20.11.2007 17:07:42:
On 11/20/2007 10:50 AM, Ken Fullish wrote:
as.character(seq(-.25,.95,.1))
[1] -0.25 -0.15 -0.05 0.05 0.15 0.25 0.35 0.45
0.55 0.65 0.75 0.85 0.95
as.character(seq(-.35,.95,.1))
[1] -0.35 -0.25
Dear Ilham,
see ?performance for a list of available performance measures ('auc'
gives AUC, 'rmse' gives root-mean-squared error).
Here is a link to a slide deck with several examples:
http://rocr.bioinf.mpi-sb.mpg.de/ROCR_Talk_Tobias_Sing.ppt
HTH,
Tobias
On 11/21/07, G Ilhamto [EMAIL
On 21 Nov 2007, at 08:30, Prof Brian Ripley wrote:
On Tue, 20 Nov 2007, Tim Hesterberg wrote:
I wrote the original rowSums (in S-PLUS).
There, rowSums() does not coerce integer to double.
Actaully, neither does R. It computes a double answer but does no
coercion per se.
However, one
On Wed, 21 Nov 2007, Robin Hankin wrote:
On 21 Nov 2007, at 08:30, Prof Brian Ripley wrote:
On Tue, 20 Nov 2007, Tim Hesterberg wrote:
I wrote the original rowSums (in S-PLUS).
There, rowSums() does not coerce integer to double.
Actaully, neither does R. It computes a double answer
[EMAIL PROTECTED] wrote:
Hi,
I am a new student to R and I was hoping someone could help me with
the error message I keep getting when I try to use the nb2listw()
function.
I have 45 sites and I want to get an autocorrelation value for sites
within 1000m of each other.
Dear list,
I'm still trying to calculate the sd for V2 for
each group in V1 if V3 is '0':
x
V1 V2 V3
1 A01 2.40 0
2 A01 3.40 1
3 A01 2.80 0
4 A02 3.20 0
5 A02 4.20 0
6 A03 2.98 1
7 A03 2.31 0
8 A04 4.20 0
# Work
x$vmean - ave(x$V2, x$V1, x$V3 == 0, FUN = mean)
# Work
x$vsd2 -
Hello
We have a problem with sorting our dataframe...
i have tried to write
x - males[sort(males$index, decreasing=T),]
But that just gives me
x
id sex BVgain BVmeat phenogain phenomeat index
NANA NA NA NANANANA
NA.1 NA NA NA NANA
I get tables with millions of rows. For plotting to a screen-size
jpg, obviously just about 1000 points are enough. Instead of feeding
plot() the original millions of rows, I'd rather shrink the original
dataframe, using some kind of the following interpolation:
-- split dataframe into
See order(). -Henrik
On 21/11/2007, Rina Oldager Miehs [EMAIL PROTECTED] wrote:
Hello
We have a problem with sorting our dataframe...
i have tried to write
x - males[sort(males$index, decreasing=T),]
But that just gives me
x
id sex BVgain BVmeat phenogain phenomeat index
NA
Alexy Khrabrov wrote:
I get tables with millions of rows. For plotting to a screen-size
jpg, obviously just about 1000 points are enough. Instead of feeding
plot() the original millions of rows, I'd rather shrink the original
dataframe, using some kind of the following interpolation:
--
On Nov 21, 2007, at 1:24 PM, Thibaut Jombart wrote:
Alexy Khrabrov wrote:
I get tables with millions of rows. For plotting to a screen-size
jpg, obviously just about 1000 points are enough. Instead of feeding
plot() the original millions of rows, I'd rather shrink the original
dataframe,
- or the orderBy function in the doBy package.
Soren
From: [EMAIL PROTECTED] on behalf of Henrik Bengtsson
Sent: Wed 21-11-2007 11:14
To: Rina Oldager Miehs
Cc: r-help@r-project.org
Subject: Re: [R] sorting dataframe
See order(). -Henrik
On 21/11/2007, Rina
Hi all,
(Apologies if this has been asked before; I tried to search for it in the
archives, but searching for terms like 'N' yields too many hits)
Is it possible to display symbols like 'R' (the set of real numbers, so with an
additional vertical line on the left) in plots using
Eleni, this question appears about every month on this list,
try using the RSiteSearch command before posting. Thanks.
RSiteSearch(replace NA)
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/109176.html
Gabor
On Wed, Nov 21, 2007 at 01:15:32PM +0200, Eleni Christodoulou wrote:
Hi all!
I
?is.na
On Nov 21, 2007 12:15 PM, Eleni Christodoulou [EMAIL PROTECTED] wrote:
Hi all!
I am new to R and I would like to ask you the following question:How
can I substitute the NA values with 0 in a data frame? I cannot find a
command to check if a value is NA...
Thank you very much!
Hi
[EMAIL PROTECTED] napsal dne 21.11.2007 10:45:55:
Dear list,
I'm still trying to calculate the sd for V2 for
each group in V1 if V3 is '0':
x
V1 V2 V3
1 A01 2.40 0
2 A01 3.40 1
3 A01 2.80 0
4 A02 3.20 0
5 A02 4.20 0
6 A03 2.98 1
7 A03 2.31 0
8 A04 4.20 0
#
I am not sure whether there is a bug. When I tested the example given
for glht in the help, I entered the following error:
Running commands:
amod - aov(minutes ~ blanket, data = recovery)
rht - glht(amod, linfct = mcp(blanket = Dunnett),
alternative = less)
Errors are:
Thanks for help.
--
View this message in context:
http://www.nabble.com/display-basename-tf4846650.html#a13876120
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
Yes, thanks a lot! It works fine!
Eleni
On Nov 21, 2007 2:03 PM, Ted Harding [EMAIL PROTECTED] wrote:
On 21-Nov-07 11:15:32, Eleni Christodoulou wrote:
Hi all!
I am new to R and I would like to ask you the following question:
How can I substitute the NA values with 0 in a data frame?
I
Is there an R analog of the Unix command uniq -c:
http://en.wikipedia.org/wiki/Uniq
Given an array x, uniq -c replaces each contiguous subsequence of
identical numbers with a tuple (count, number). E.g.
$ cat usample
10
10
9
8
8
7
7
7
6
3
1
1
1
0
$ uniq -c usample
2 10
1 9
I am not sure whether there is a bug. When I tested the example given for glht
in the help, I entered the following error:
Running commands:
amod - aov(minutes ~ blanket, data = recovery)
rht - glht(amod, linfct = mcp(blanket = Dunnett),
alternative = less)
Errors are:
Error in
On Wed, 2007-11-21 at 15:27 +0300, Alexy Khrabrov wrote:
Is there an R analog of the Unix command uniq -c:
http://en.wikipedia.org/wiki/Uniq
Given an array x, uniq -c replaces each contiguous subsequence of
identical numbers with a tuple (count, number). E.g.
$ cat usample
10
10
See ?table function.
On 21/11/2007, Alexy Khrabrov [EMAIL PROTECTED] wrote:
Is there an R analog of the Unix command uniq -c:
http://en.wikipedia.org/wiki/Uniq
Given an array x, uniq -c replaces each contiguous subsequence of
identical numbers with a tuple (count, number). E.g.
$ cat
Do you need something more than a simple ssh connection to a remote
host in which you run R (trivial when the server is Linux)?
My advice is to run R in a screen session on the remote host (it
protects from sudden disconnections). Then you have a window on your
screen with the R command line,
Anqi Qiu wrote:
I am not sure whether there is a bug. When I tested the example given for
glht
in the help, I entered the following error:
Running commands:
amod - aov(minutes ~ blanket, data = recovery)
rht - glht(amod, linfct = mcp(blanket = Dunnett),
alternative =
GaGr == Gabor Grothendieck [EMAIL PROTECTED]
on Tue, 20 Nov 2007 13:35:34 -0500 writes:
GaGr See:
GaGr http://finzi.psych.upenn.edu/R/Rhelp02a/archive/57255.html
Also, incidentally several weeks ago, I had added the following
to the 'ChangeLog' of my package sfsmisc :
2007-10-13
Hi,
tbe R.batch package (http://www.braju.com/R/) was written to run
multiple batch jobs on one or more hosts sharing the same file system.
It doesn't do everything you want but part of it. For details, see
r-help thread 'R.batch (Was: Re: [R] Calling R from R and specifying
wait until script is
Hi there
I have an interesting problem:
My csv file is of array dimensions [12,50], but it was saved the wrong way:
there should be only 11 colums. What happens now if I read it into R is that
the whole data set is shifted ( in the first row, the last column contains
already the first value
Some of the bits and pieces in this look like very strong candidates for
breaking off into CRAN packages, if you haven't done so already.
This looks like very nice work - you should be proud! :-)
--elijah
On Mon, 19 Nov 2007, Karim Chine wrote:
Date: Mon, 19 Nov 2007 19:44:51 +
Fellow Rers,
Please forgive me if I have posted this to the wrong R list serve.
Over the course of the years that I have used R and participated in this list
server, I have noted a large number of questions and answers that direct people
to specific packages. The multitude of packages is one
The survfit function, when applied to the results of a Cox model, will give
the predicted survival curve for any particular combination of covariates in
the
model. You cannot get what you are asking for, i.e., distinct levels of X
while
ignoring Y, from survfit. What you need to do is
John, what about
http://cran.r-project.org/src/contrib/PACKAGES.html
Isn't this good enough? You might also take a look at
http://cran.r-project.org/src/contrib/Views/
Gabor
On Wed, Nov 21, 2007 at 09:24:14AM -0500, John Sorkin wrote:
Fellow Rers,
Please forgive me if I have posted this
Gabor,
The URL you cited is helpful, but it is not searchable. It can not be used, for
example, to easily determine that MASS can be used for boxcox tranforms.
John
John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
Baltimore VA Medical Center GRECC,
University of Maryland School of
Hello R users,
Is it possible after making a plot(x,y) to change axis scale?
For example : I have a range of 0 to 3000 in my y-axis and I want to make a
zoom between 2000 and 3000.
Thanks for any help.
--
View this message in context:
This was my intention, but I'm not able to read it in as a vector (because i
don't know the function, neither I can convert the read in table to a vector
and then to matrix or directly.
What did I miss or where do I have to look up?
thanks alot
marc
Original-Nachricht
xlim(),ylim()
so, ylim(2000,3000)
mysimbaa wrote:
Hello R users,
Is it possible after making a plot(x,y) to change axis scale?
For example : I have a range of 0 to 3000 in my y-axis and I want to make
a zoom between 2000 and 3000.
Thanks for any help.
--
View this message in
On Wed, 21 Nov 2007, John Sorkin wrote:
Gabor,
The URL you cited is helpful, but it is not searchable. It can not be
used, for example, to easily determine that MASS can be used for boxcox
tranforms.
It is searchable (use your browser's search facilities), and that is often
helpful. But
You mean non-linearity?
You can use a lack of fit test by using:
anova(lm(y ~ x+factor(x), data))
The F-value of factor(x) is the lack of fit test, and when lineair, the p
value should be 0.05 when using 0.95% significance.
Bart
Wensui Liu wrote:
in statistics, is there a measure for
Hi Thanks for the reply.
I implemented your solution to my problem but ...
For some of my column there is not enough data to do t-test so it gives me
error and stops the for loop, is any graceful way to check for error msg and
say ok if there is no $p.value continue to the next column
Once
Hi,
I am trying to find some information on the strata option in randomForest().
I am hoping to make predictions from some clustered data (many predictors
measured repeatedly on the same subject over time). I would like to apply
random forests or gradient boosting ( gbm() ) to this problem but
Hi Friends
I am working on a Financial Model project in R and require help in
writing code for Moving Averages. Since I am very new to R, it would be
good if any seniors in the group can guide me on a proper moving average
code.
Thanks Best Regards,
Kushal
The information in
Hi
Which package(s) is R fit frailty models to univariate survival data, i.e.
simple data with one survival time per person.
David
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
Gabor Csardi csardi at rmki.kfki.hu 11/21/07 9:31 AM
http://cran.r-project.org/src/contrib/PACKAGES.html
Isn't this good enough? You might also take a look at
http://cran.r-project.org/src/contrib/Views/
On Wed, Nov 21, 2007 at 09:24:14AM -0500, John Sorkin wrote:
Over the course of the
On Wed, 2007-11-21 at 09:24 -0500, John Sorkin wrote:
Fellow Rers,
Please forgive me if I have posted this to the wrong R list serve.
Over the course of the years that I have used R and participated in
this list server, I have noted a large number of questions and answers
that direct
There is code for moving averages already in R. There is some
information in the 'zoo' package.
?filter
What specifically are you looking for?
On Nov 20, 2007 11:53 PM, Kushal M Shah [EMAIL PROTECTED] wrote:
Hi Friends
I am working on a Financial Model project in R and require help in
mogra wrote:
Hi Thanks for the reply.
I implemented your solution to my problem but ...
For some of my column there is not enough data to do t-test so it gives me
error and stops the for loop, is any graceful way to check for error msg and
say ok if there is no $p.value continue to the
Hello everyone,
Since the fields in variables column are unique with respect to ID and
fiscal year; any function like
sum,min,max,mean etc will lead to the desired result
Therefore cast(dataread, ID + Period ~ variable,sum)
Will lead to the desired result in my case;
Thanks,
Punit
Hello.
I'm replying because you haven't had a reply. You haven't said which
system you are running or which version of different packages you have
installed.
On my system (see below for the results from running sessionInfo())
that code runs fine with no errors at all.
library(multcomp)
#
Nutter, Benjamin wrote:
So if I understand you correctly, if I include in my namespace file the
commandimportFrom(MASS, stepAIC), whenever stepAIC is called from
my package, it will still run even if I haven't explicitly imported the
MASS package?
Yes.
Or if I use the command
On 11/21/07, Punit Anand [EMAIL PROTECTED] wrote:
Hello everyone,
Since the fields in variables column are unique with respect to ID and
fiscal year; any function like
sum,min,max,mean etc will lead to the desired result
You should probably check that, as the warning only occurs when
John Sorkin [EMAIL PROTECTED] wrote:
The multitude of packages is one of the great strengths of R. Unfortunately
there is no (or at least I am not aware of) any single source
that lists all available packages and gives a synopsis of what
each package does. One can install and load packages
Hello Mysimbaa,
If you want to fit a smooth line to your data, there are many ways to do
it. One option is to use splines. See the smooth.spline() function.
If you only want to add a line to highlight the trend in your data, that
should be enough. But if you want to do more serious
A further tip:
subset(as.data.frame(xtabs( ~. , dat )), Freq != 0 )
Comes very close to generating output along the lines of what
'sort | uniq -c'
provides (if this is what was wanted rather than rle() ) and works for
multiple columns of data. The count becomes the last
Hey Marc,
You can use the function scan() directly to read your file as a single
vector. Then, as Rob suggested, use the matrix function to give it the
dimensions you want.
Other option (perhaps less elegant) is to do something like this.
x=read.table (myfile,...etc.etc.)
Hello fellow R users,
I have a matrix computation that I imagine should be relatively easy to do,
however I cannot figure out a nice way to do it. I have two matrices, for
example
mat1 - matrix(c(1:5,rep(NA,5), 6:10), nrow=3, byrow=T)
mat2 - matrix(c(2:6, 6:10, rep(NA,5)), nrow=3, byrow=T)
Hi:
Does anyone(Hadley?)know how to change the axis labels
with the new version of ggplot2? With the old version
I used the code below:
grid.gedit(label, gp=gpar(fontsize=10, col=blue))
Thanks
Felipe D. Carrillo
Fishery Biologist
US Fish Wildlife Service
California, USA
Maybe there is a more elegant solution, but here is one possibility:
mat1[is.na(mat1)]-mat2[is.na(mat1)]
mat2[is.na(mat2)]-mat1[is.na(mat2)]
(mat1+mat2)/2
On Nov 21, 2007 12:30 PM, Gregory Gentlemen [EMAIL PROTECTED] wrote:
Hello fellow R users,
I have a matrix computation that I imagine
On Wed, 2007-11-21 at 14:30 -0500, Gregory Gentlemen wrote:
Hello fellow R users,
I have a matrix computation that I imagine should be relatively easy
to do, however I cannot figure out a nice way to do it. I have two
matrices, for example
mat1 - matrix(c(1:5,rep(NA,5), 6:10), nrow=3,
Hi,
I have processed measurements of a rough surface to a heigh-height
correlation plot. What the meaning of this exactly is, is not important.
Only that it is a plot that had two (almost ) linear parts when plotted on a
logaritmic scale. In this plot, I want to draw the best fitting lines for
I recently installed R 2.6 on Linux/SuSE
When I was running the previous version on Windows I was able to save my
plots from a script.
There was a command savePlot that is no more retrieved in the last
version.
In this scenario, how can I tell R to save the currently displayed plot to a
file ?
The
All-
I have rhel4 and just installed R2.6.0. The error suggests it cant find the
font library. I have failed to trouble shoot. Can anyone help me?
Thanks
James Correia Jr
Post Doc
PH: 372-6463
[EMAIL PROTECTED]
Wisdom. Strength. Courage. Generosity. Each of us are born with one of these.
We
Dear list,
I've recently become interested in comparing the spectral estimates
using the different methods (pgram and ar) in the spectrum()
function in the stats package.
With many thanks to the authors of these complicated functions, I
would like to point out what looks to me like a bit of an
Maura:
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Maura E Monville
Sent: Wednesday, November 21, 2007 12:46 PM
To: [EMAIL PROTECTED]
Subject: [R] How can I save a plot ?
I recently installed R 2.6 on Linux/SuSE
When I was running the previous
David wrote:
Hi
Which package(s) is R fit frailty models to univariate survival data, i.e.
simple data with one survival time per person.
I haven't used it myself, but have a look at ?frailty in the survival
package.
--
Gad Abraham
Department of Mathematics and Statistics
The University of
I wonder if anyone know why survest (a function in Design package) and
standard survfit.coxph (survival) returned different confidence
intervals on survival probability estimation (say 5 year).
I am trying to estimate the 5-year survival probability on a continuous
predictor (e.g. Age in this
have a look at:
help(dev.print)
(there are a few functions documented there and you can choose which one
suits better your needs)
concerning multiple graphics devices just open another one,
for instance with
x11()
havina a look at
help(dev.set)
will provide further usrful information on the
platform i686-pc-linux-gnu
arch i686
os linux-gnu
system i686, linux-gnu
status
major 2
minor 6.0
Thanks to all those of you who answered my question about how to save a plot
to a file.
But now I have another problem. That is I wish to see / examine the plot on
the screen in advance of saving it to a file. If I launch X11() or pdf() or
Poscript() the plot does not appear on my screen .. So I
How about
if (is.na(c(x,1))[1]) ...
--- Gregory Wall [EMAIL PROTECTED] wrote:
Hello,
I've searched the list but haven't found anything
really applicable to my
question. Any advice would be super.
I'm working on a snippet of R code and I have a
function with a prototype
like
Hi friends,
I used heatmap(as.matrix(y2),col=rainbow(256),scale = column) to
generate the heatmap. But it did not show the code that which
color correspond the value. Is there any parameter for this in
heatmap()?
Thanks a lot!
Allen
[[alternative HTML version deleted]]
Welcome to the R-help@r-project.org mailing list!To post to this list, send
your email to: r-help@r-project.orgGeneral information about the
mailing list is at: https://stat.ethz.ch/mailman/listinfo/r-helpIf you
ever want to unsubscribe or change your options (eg, switch
One possibility is:
a- V1 V2 F1
+ 1 A 2 0
+ 2 A 3 0
+ 3 A 4 1
+ 4 B 3 0
+ 5 B 2 1
+ 6 C 6 0
+ 7 C 2 0
+ 8 C 6 0
+
b-read.table(textConnection(a),header=TRUE)
f-rep(0,dim(b)[1])
f[b$F1==0] - ave(b$V2[b$F1==0],b$V1[b$F1==0])
cbind(b,f)
V1 V2 F1f
1 A 2 0
One possibility is to save in ASCII format from Matlab (save -ascii)
Suresh
On 17/11/2007, Prof Leslie Smith [EMAIL PROTECTED] wrote:
Is there any way to read these files (standard .mat files, created by
matlab version 7 onwards are compressed)? I know that R.matlab doesn't
read them (it
Since t.test takes much more time than parsing loop, I
won't hesitate to do a loop on the columns.
--- sata pinal [EMAIL PROTECTED] wrote:
I have two matrix with same dimensions. I want to do
t.test using each column from 2 different matrix.
Row n Column names in both matrix are same.
sapply(1:4000, function(k){
t.test(Matrix1[,k], Matrix2[,k])$p.value
})
I did not test, though.
HTH,
Weiwei
On 11/19/07, sata pinal [EMAIL PROTECTED] wrote:
I have two matrix with same dimensions. I want to do t.test using each column
from 2 different matrix.
Row n Column names in both
Dear Sir
Sir when I use png function to save graph. At last it is written dev.off().
it does not produce any postscript file.
Please help in this regard
Thank you
--
AMINA SHAHZADI
Department of Statistics
GC University Lahore, Pakistan.
[[alternative HTML version deleted]]
C.J.Albers [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
Hi all,
(Apologies if this has been asked before; I tried to search for it in
the archives, but searching for terms like 'N' yields too many hits)
Is it possible to display symbols like 'R' (the set of real numbers,
so with
png function is used for producing png format (Portable Network
Graphics) of image.
you need to use the postscript() function to generate a ps graph.
Refer to:
http://stat.ethz.ch/R-manual/R-patched/library/grDevices/html/postscript.html
On 11/22/07, amna khan [EMAIL PROTECTED] wrote:
Dear Sir
Greetings,
I would like to use some of the spatial statistics functions in R, but I am
having trouble entering data. My data is already in a distance matrix format,
not an X Y coordinate format (each Xij cell in the matrix represens the
distance from point i to j). Does anyone know of a way
Dear Sir
grDevices package is not found in packages list?
Thank You
--
AMINA SHAHZADI
Department of Statistics
GC University Lahore, Pakistan.
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
84 matches
Mail list logo