Dear all,
How do I make R show the R-squared (deviance explained by the model) in
a logistic regression?
Below is how I write my syntax. Basically I want to investigate
density-dependence in parasitism of larvae. Note that in the end I
perform a F-test because the dispersion factor (residual
probably you could fit this model using the 'varIdent()' function for
the 'weights' argument of the 'lme()' function in package nlme.
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address:
Hello all,
I'm a new user of R and I have used the spdep package to calculate Moran's I
estimates. I used the dnearneigh() function and moran.test() function and
obtained what I wanted, but now I want to plot my results with the p-values. I
regrouped my results for the Moran's I like
Hi all,
I have to calculate an expression using acos -function. A strange
result of acos appears
*1. case with error*
ss - sin(10.74*pi/180)**2
+(cos(10.74*pi/180)*cos(10.74*pi/180)*cos(0*pi/180))
ss
acos(ss)
[1] NaN
Warning message:
NaNs produced in: acos(ss)
*2. case without error*
ss -
On 29-Mar-05 Klaus-Peter Pleissner wrote:
Hi all,
I have to calculate an expression using acos -function.
A strange result of acos appears
*1. case with error*
ss - sin(10.74*pi/180)**2
+(cos(10.74*pi/180)*cos(10.74*pi/180)*cos(0*pi/180))
ss
acos(ss)
[1] NaN
Warning message:
On 29-Mar-05 Ted Harding wrote:
The explanation is:
sin(10.74*pi/180)**2
+(cos(10.74*pi/180)*cos(10.74*pi/180)
*cos(0*pi/180))
-1
[1] 2.220446e-16
I.e. the expression, as internally evaluated, is very
slightly greater than 1. When you multiply ss by
0.9, you bring it back
On Ti, 2005-03-29, 10:56, Johan Stenberg skrev:
How do I make R show the R-squared (deviance explained by the model) in
a logistic regression?
Several definitions of R^2 exists in the GLM case. See e.g.
Menard, S. (2000) Coefficients of determination for multiple logistic
regression
Johan Stenberg wrote:
Dear all,
How do I make R show the R-squared (deviance explained by the model) in
a logistic regression?
Below is how I write my syntax. Basically I want to investigate
density-dependence in parasitism of larvae. Note that in the end I
perform a F-test because the dispersion
Dear all,
I would like to use the PLS method to reduce the dimension of my data
because there are much more variables that individuals. I looked at the
pcr.pls package. Do someone know if there is a mean to project a new
individual in the latent variables space (as supplementary point)?
Thank you
Dear R users,
I have a data generated as the following,
dat - data.frame(matrix(sample(24), nrow=4))
dimnames(dat) -list(rownames=c('g1','g2','g3','g4'),
colnames=c(A_CH1,A_CH2,B_CH1,B_CH2,C_CH3,C_CH3))
» dat
A_CH1 A_CH2 B_CH1 B_CH2 C_CH3 C_CH3
g11624 7 91420
g2
On Tue, 29 Mar 2005 06:58:51 -0800 (PST), Hai Lin
[EMAIL PROTECTED] wrote :
Dear R users,
I have a data generated as the following,
dat - data.frame(matrix(sample(24), nrow=4))
dimnames(dat) -list(rownames=c('g1','g2','g3','g4'),
colnames=c(A_CH1,A_CH2,B_CH1,B_CH2,C_CH3,C_CH3))
» dat
Something like this should do it:
invisible(lapply(seq(1, length(dat), by=2),
function(i) plot(dat[[i]]+dat[[i+1]], dat[[i]] -
dat[[i+1]])))
Andy
From: Hai Lin
Dear R users,
I have a data generated as the following,
dat - data.frame(matrix(sample(24), nrow=4))
Hi Gerard,
Gerard Tromp [EMAIL PROTECTED] writes:
OS: Windows
R 2.0.1
As of about a week ago the help.search function dies when used in the simple
help.search(something) usage.
The error is
Error in rbind(...) : number of columns of matrices must match (see arg 203)
After some effort I
Hallo
On 29 Mar 2005 at 6:58, Hai Lin wrote:
Dear R users,
I have a data generated as the following,
dat - data.frame(matrix(sample(24), nrow=4))
dimnames(dat) -list(rownames=c('g1','g2','g3','g4'),
colnames=c(A_CH1,A_CH2,B_CH1,B_CH2,C_CH3,C_CH3))
dat
A_CH1 A_CH2 B_CH1 B_CH2
you could try something like this:
dat - array(sample(24), dim=c(4,2,3))
par(mfrow=c(3,1))
apply(dat, 3, function(x) plot(rowSums(x), x[,2]-x[,1]))
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
On Tuesday 29 March 2005 08:58, Hai Lin wrote:
Dear R users,
I have a data generated as the following,
dat - data.frame(matrix(sample(24), nrow=4))
dimnames(dat) -list(rownames=c('g1','g2','g3','g4'),
colnames=c(A_CH1,A_CH2,B_CH1,B_CH2,C_CH3,C_CH3))
dat
A_CH1 A_CH2 B_CH1 B_CH2 C_CH3
Anne York [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
par(mfrow=c(2,3)) #set up 2 rows x 3 colums
plot(1:10) #plot 1
plot(1:10) #plot 2
plot(1:10) #plot 3
par(mfg=c(2,2)) # start next plot at 2,2 instead of 2,1
plot(1:10) # 4th plot
If you want to leave the last
Hi,
I tried to install a package using the menu option and was presented a list
filled with NA's.
I then tried visiting the R site and each option on the side bar (eg. CRAN,
Search,FAQ) sends me to the address attached below (NB: I left off the h in
http).
The first problem seems to be related to
I am running some models (for the first time) using rpart and am getting
results I don't know how to interpret. I'm using cross-validation to prune
the tree and the results look like:
Root node error: 172.71/292 = 0.59148
n= 292
CP nsplit rel error xerror xstd
1 0.124662 0
Le 25 Mars 2005 16:12, abunn a écrit :
For what I understand you run this every time you use R on a Tuesday,
which is not what I would want.
What's wrong with Tuesday? Indeed, it's not the ideal solution but has kept
me up-to-date. What has amazed me is that I think I've used R every
Dear R users,
I have a question regarding stratified bootstrap question and how to implement
it using boot() in R's boot package.
My dataset is a longitudinal dataset (3 measurements per person at year
1, 4 and 7) composed of multiple clinic centers and multiple participants
within each clinic.
Hanke, Alex [EMAIL PROTECTED] writes:
Hi,
I tried to install a package using the menu option and was presented a list
filled with NA's.
I then tried visiting the R site and each option on the side bar (eg. CRAN,
Search,FAQ) sends me to the address attached below (NB: I left off the h in
I think what Prof. Ripley meant is: you have to run R on a
Tuesday in order to
update your packages. You could lift this requirement --- and
still update on
Tuesdays --- by using a cron job instead. (That's assuming you're using a
Unix variant, I suppose there is some equivalent way to
--- Dimitris Rizopoulos
[EMAIL PROTECTED] wrote:
you could try something like this:
dat - array(sample(24), dim=c(4,2,3))
par(mfrow=c(3,1))
apply(dat, 3, function(x) plot(rowSums(x),
x[,2]-x[,1]))
##
Thank you all for the inputs. It's great of help.
The above solution also opens my mind
Sherri Miller wrote:
I am running some models (for the first time) using rpart and am getting
results I don't know how to interpret. I'm using cross-validation to prune
the tree and the results look like:
Root node error: 172.71/292 = 0.59148
n= 292
CP nsplit rel error xerror xstd
1
Seth Falcon [EMAIL PROTECTED] writes:
Hi Gerard,
Gerard Tromp [EMAIL PROTECTED] writes:
OS: Windows
R 2.0.1
As of about a week ago the help.search function dies when used in the simple
help.search(something) usage.
The error is
Error in rbind(...) : number of columns of matrices must
Hello,
This morning I downloaded, unzipped, and compiled the latest version of
R for unix, in my HOME/APPLICATIONS directory.
My current unix machine is a sparc-sun-solaris2.9, running SunOS 5.9.
Here are the last few lines of the output following ./configure:
R is now configured for
I am having difficulty with dependencies for the R rpm for Fedora Core 2.
In attempting to load R-2.0.0.0.fdr.1.fc2.i386.rpm it fails the
libtk8.4.so dependency even though I have this library loaded. The
library is located in: /usr/local/lib.
How might I tell R where to find this library? I
Jeffrey Gruen, M.D. [EMAIL PROTECTED] writes:
Hello,
This morning I downloaded, unzipped, and compiled the latest version
of R for unix, in my HOME/APPLICATIONS directory.
My current unix machine is a sparc-sun-solaris2.9, running SunOS 5.9.
Here are the last few lines of the output
Steve Sherman [EMAIL PROTECTED] writes:
I am having difficulty with dependencies for the R rpm for Fedora Core 2.
In attempting to load R-2.0.0.0.fdr.1.fc2.i386.rpm it fails the
libtk8.4.so dependency even though I have this library loaded. The
library is located in: /usr/local/lib.
How
Hi,
I'm trying to set the minimum and maximum in a parallel
plot, but trying xlim=c(-1,1) gives strange results. Am I
missing something? The call I give is:
parallel(~X[,c(6,9,12,15,18)]|X$ff,X,panel=panel.parallel.new,groups=X$protein,layout=c(3,1),xlim=c(-1,1))
Besides, I would like to add a
T.A.Wassenaar wrote on 3/29/2005 2:17 PM:
Hi,
I'm trying to set the minimum and maximum in a parallel plot, but trying
xlim=c(-1,1) gives strange results. Am I missing something? The call I
give is:
Hi all.
I have a re-occuring typical problem that I don't know how to solve
efficiently.
The situation is the following: I have a number of data-sets
(A,B,C,...) , consisting of an identifier (e.g. 11,12,13,...,20) and a
measurement (e.g. in the range 100-120). I want to compile a large
Trying to use R to build an interactive slide show, to be displayed on a
projector. The purpose of the presentation is to show how one could
construct a simple graph using R. It is meant as a general overview rather
than as detailed instruction.
For example, something like the following
One possible strategy:
see ?readLines
Write a text file with your R commands. Then
write a little function that opens a connection to the file and runs a loop
to:
1)read a line from your file via readLines
2) cat() the line on your terminal
3) prompt via readline to execute it.
You'll have to
Oops, I should have said that you can execute the text line via the
construction:
eval(parse(text=textline))
-- Bert Gunter
Genentech Non-Clinical Statistics
South San Francisco, CA
The business of the statistician is to catalyze the scientific learning
process. - George E. P. Box
Seems like emacs-ess would do the trick. You can read in the entire
file - formatted or spaced as appropriate - execute one line or several
at a time and see the results in real time.
Obviously less a slide show than an R session, but that seems to be
what you want.
A more canned slide show
This dataset below is one sample answer the questioner from our customer.
testbank - read.table(testbank.txt, header=T)
testbank
age married income gender ownhouse class
1 20-30 no high female yes 1st
2 30-40 no high female yes 1st
3 40-50 nolow
Dear list Andy,
I am hopelessly stumped, how would one add the department names as a variable?
Robin
Robin Tori Schroeder
International Institute for Sustainability
P.O. Box 873211
Arizona State University
Tempe, Arizona 85287-3211
Phone: (480) 727-7290
-Original Message-
On Tue, 29 Mar 2005, Jan Sabee wrote:
This dataset below is one sample answer the questioner from our customer.
testbank - read.table(testbank.txt, header=T)
testbank
age married income gender ownhouse class
1 20-30 no high female yes 1st
2 30-40 no high
Hi Sundar,
Thanks for the reply. And, oops, the panel.parallel.new
shouldn't be in there. That is a revised panel function to
color according to a group. As with strange, that would
generally be 'not-expected', i.e., in the present case,
not having an x-axis running from -1 to 1 for all
Another approach is to put your commands below into a text file.
Add a line like:
tmp - readline('Press Enter to Continue:')
everywhere you want to pause.
Then do:
source('path/to/text/file', echo=T)
it will print out the commands and execute them, but everytime it gets
to the tmp - ...
Hi
Earl F. Glynn wrote:
Anne York [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
par(mfrow=c(2,3)) #set up 2 rows x 3 colums
plot(1:10) #plot 1
plot(1:10) #plot 2
plot(1:10) #plot 3
par(mfg=c(2,2)) # start next plot at 2,2 instead of 2,1
plot(1:10) # 4th plot
If you want to
Paul Murrell [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
Does this do what you want?
layout(rbind(c(1, 2, 3),
c(0, 4, 0)))
plot(1:10, main=Plot 1)
plot(1:20, main=Plot 2)
plot(1:30, main=Plot 3)
plot(1:40, main=Plot 4)
# new page!
plot(1:40, main=Plot 5)
T.A.Wassenaar wrote on 3/29/2005 4:17 PM:
Hi Sundar,
Thanks for the reply. And, oops, the panel.parallel.new shouldn't be in
there. That is a revised panel function to color according to a group.
As with strange, that would generally be 'not-expected', i.e., in the
present case, not having an
Dear all,
Last December there was a thread regarding the famous FAQ 7.21 How can I
turn a string into a variable? and asking what people want to do with
these strings.
My, certainly trivial application would be as follows:
Assume I have a data.frame containing besides others also the columns f1,
merge() may be just what you want.
Cheers, Pierre
Piet van Remortel wrote:
Hi all.
I have a re-occuring typical problem that I don't know how to solve
efficiently.
The situation is the following: I have a number of data-sets
(A,B,C,...) , consisting of an identifier (e.g. 11,12,13,...,20)
On Tuesday 29 March 2005 17:04, Sundar Dorai-Raj wrote:
T.A.Wassenaar wrote on 3/29/2005 4:17 PM:
Hi Sundar,
Thanks for the reply. And, oops, the panel.parallel.new shouldn't
be in there. That is a revised panel function to color according to
a group. As with strange, that would
On Wed, 30 Mar 2005, Heinz Tuechler wrote:
Dear all,
Last December there was a thread regarding the famous FAQ 7.21 How can I
turn a string into a variable? and asking what people want to do with
these strings.
My, certainly trivial application would be as follows:
Assume I have a data.frame
x - 2:5
y - 1:10
Is there something like:
is.subset(x, y) == T
Thank you,
__
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
Dear R Users,
I'm very very interested in learning how to use R to carry out a
classification of data using discriminant function analysis. I've
found the MASS package and the lda function, but the examples in the
help system are a bit over my head. I'm not exactly sure how to
interpret the
all(x %in% y) should do what you want:
x - 2:5
y - 1:10
all(x %in% y)
[1] TRUE
all(y %in% x)
[1] FALSE
Cheers, Pierre
Terry Mu wrote:
x - 2:5
y - 1:10
Is there something like:
is.subset(x, y) == T
Thank you,
__
R-help@stat.math.ethz.ch mailing list
I'm trying to plot a grid over a levelplot
print( levelplot( var1.pred~x+y,
data=saw.pred,
aspect=mapasp(saw.pred),
col.regions=terrain.colors(80),
main=main) )
using the data...
saw.pred
x y var1.pred var1.var sort
1 5 5
agg.dat - do.call(rbind, by(dat$Salary, dat$Department,
+function(x) c(mean=mean(x), total=sum(x
agg.dat - data.frame(dept=rownames(agg.dat), agg.dat)
agg.dat
dept mean total
Finance Finance 83925.67 251777
HR HR 6.33 19
IT IT
Why don't use R-Winedt package?
If you have Winedt installed on your machine, it does something similar to
what you want.
Just highlight the command you want to execute from a text command file and
then press the R-paste button.
Good luck!
M.
**
That worked great. Thank you.
= Original Message From Peter Dalgaard [EMAIL PROTECTED] =
Steve Sherman [EMAIL PROTECTED] writes:
I am having difficulty with dependencies for the R rpm for Fedora Core 2.
In attempting to load R-2.0.0.0.fdr.1.fc2.i386.rpm it fails the
libtk8.4.so
On Tuesday 29 March 2005 19:16, Jeff D. Hamann wrote:
I'm trying to plot a grid over a levelplot
print( levelplot( var1.pred~x+y,
data=saw.pred,
aspect=mapasp(saw.pred),
col.regions=terrain.colors(80),
main=main) )
using
Although base graphics does not mix with lattice in the one graph,
I've found that print.trellis(position=..., ) and the use of
par(fig=...)
to put regular and trellis graphics on the one graphics page works
like a treat, at least in version 2.0.1 of R. [Base graphics functions
that are
On Tuesday 29 March 2005 22:32, John Maindonald wrote:
Although base graphics does not mix with lattice in the one graph,
I've found that print.trellis(position=..., ) and the use of
par(fig=...)
to put regular and trellis graphics on the one graphics page works
like a treat, at least in
Hello,
Could you please tell me how i can get an input from the user in R?
C-Ming
Mar 29, 2005
-
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing list
Hi!
I am new to R just 3 days in it and i apologize if my questions seem very
trivial and consumed your valuable time.
I am coding in perl and i stumbled upon R regarding plotting good
statistical graphs.
I tried the kmean clustering for a large matrix ,say 150 * 150 . I tried
the example
On 29 Mar 2005 22:04:51 +0200
Peter Dalgaard [EMAIL PROTECTED] wrote:
Steve Sherman [EMAIL PROTECTED] writes:
I am having difficulty with dependencies for the R rpm for Fedora Core 2.
In attempting to load R-2.0.0.0.fdr.1.fc2.i386.rpm it fails the
libtk8.4.so dependency even though I
Cuichang Zhao wrote:
Hello,
Could you please tell me how i can get an input from the user in R?
Depends on the kind of input.
See, e.g., ?scan or ?menu
Uwe Ligges
C-Ming
Mar 29, 2005
-
[[alternative HTML version deleted]]
Hi!
There are more than 8 colors.
x - rbind(matrix(rnorm(100, sd = 0.3), ncol = 2),
matrix(rnorm(100, mean = 1, sd = 0.3), ncol = 2))
(cl - kmeans(x, i, 20))
s - c(tomato4, turquoise, slateblue, wheat, snow, skyblue,
peru, pink)
# see at:
colors()
plot(x, col
TEMPL Matthias wrote:
Hi!
There are more than 8 colors.
Yes, e.g. for rgb space there are 16777216, see ?rgb.
Uwe Ligges
x - rbind(matrix(rnorm(100, sd = 0.3), ncol = 2),
matrix(rnorm(100, mean = 1, sd = 0.3), ncol = 2))
(cl - kmeans(x, i, 20))
s - c(tomato4, turquoise,
65 matches
Mail list logo