[R] thurston case 5

2009-02-01 Thread japomani
Hi, I hope some one can help. I need to compute Thurston's case 5 on a large set of data. I have gotten as far as computing the proportional preference matrix but the next math is beyond me. Here us my matrix 0.500 0.472 0.486 0.587 0.366 0.483 0.496 0.434 0.528 0.500 0.708 0

Re: [R] How to analyse and model 2 time series, when one series needs to be differenced?

2009-02-01 Thread Bernardo Rangel Tura
On Mon, 2009-01-26 at 08:52 +, Andreas Klein wrote: > Hello. > > How can I analyse the cross-correlation between two time series with ccf, if > one of the time series need to be differenced, so it is stationary? > The two time series differ when in length and maybe ccf produces not the > cor

[R] display p-values and significance levels

2009-02-01 Thread herwig
Hi there, I got a piece of code for the Iris data which allows to display correlation coefficients for each Iris species in the lower panel (color coded). I would now like to add e.g. a "*" to show the significance of each correlation next to the correlation coefficient. Furthermore I would li

[R] cluster function to use with GLM

2009-02-01 Thread Veerappa Chetty
Hi,In SPlus, I use the function 'cluster' with GLM to adjust for correlated errors within a cluster ( e.g. cluster(ID)) as a covariate. Is there a similar function in R to use with GLM ? I am new to R. Thanks. V.K. Chetty -- Professor of Family Medicine Boston University Tel: 617-414-6221, Fax:

[R] Histogram height

2009-02-01 Thread Brendan Cusick
Hello. I have what I'm sure is a very simple question. Hopefully someone can help. I can't seem to find the maximum height of a histogram. In matlab it would be simple to say max(hist(x, 100)), but this doesn't seem to work in R. Any input would be greatly appreciated. Brendan [[alte

Re: [R] cluster function to use with GLM

2009-02-01 Thread Prof Brian Ripley
I am surprised: a Generalized Linear Model does not have clusters, nor did glm() allow clusters in any version of S-PLUS I have used. I suspect this is a GEE model, for which see packages gee, geepack and yags (not on CRAN) under R. But you can also have Generalized Linear Mixed Models, and t

Re: [R] Histogram height

2009-02-01 Thread Jim Lemon
Brendan Cusick wrote: Hello. I have what I'm sure is a very simple question. Hopefully someone can help. I can't seem to find the maximum height of a histogram. In matlab it would be simple to say max(hist(x, 100)), but this doesn't seem to work in R. Any input would be greatly appreciated.

Re: [R] thurston case 5

2009-02-01 Thread John Fox
Dear Jared, See ?thurstone in the psych package. RSiteSearch("Thurstone") turns this up as the first hit. Also see the BradleyTerry package for the similar Bradley-Terry model. Regards, John -- John Fox, Professor Department of Sociology McMaster University Hamilton,

Re: [R] sub question

2009-02-01 Thread Peter Dalgaard
Gabor Grothendieck wrote: On Sat, Jan 31, 2009 at 6:01 PM, Wacek Kusnierczyk th some additional boring pedantry wrt. ?gsubfn, which says: " If 'replacement' is a formula instead of a function then a one line function is created whose body is the right hand side of the formula and whose

[R] changes in RSiteSearch

2009-02-01 Thread Jonathan Baron
Because of the enormous volume of mail on R-help, I have split up the search archives in my R Site, which you can access directly (and slightly differently) at: http://finzi.psych.upenn.edu/nmz.html http://finzi.psych.upenn.edu/search.html http://finzi.psych.upenn.edu/ or http://search.r-project.or

Re: [R] Question on Sweave-Latex and examples in the Sweave Manual

2009-02-01 Thread Ista Zahn
Hi Eugene, I didn't get the attachment, so I'm not sure what error messages you are getting. But I think \usepackage{sweave} should be \usepackage{Sweave} (with a capital S). -Ista > -- Forwarded message -- > From: eugen pircalabelu > To: R-help > Date: Sat, 31 Jan 2009 12:32:11

[R] Putting all independent variables in one variable so performing many similar tests is more convenient

2009-02-01 Thread Thomas Levine
I want to do something like this. avo(q~a+b+c+d+e+f+g+h+i+j+k+l) avo(r~a+b+c+d+e+f+g+h+i+j+k+l) avo(s~a+b+c+d+e+f+g+h+i+j+k+l) (There's likely a better way to do this actually, but I think this'll work.) How do I define e=a+b+c+d+e+f+g+h+i+j+k+l such that the following works? avo(q~e) avo(r~e)

Re: [R] Putting all independent variables in one variable so performing many similar tests is more convenient

2009-02-01 Thread Thomas Levine
oops, I mean aov On Sun, Feb 1, 2009 at 9:27 AM, Thomas Levine wrote: > I want to do something like this. > > avo(q~a+b+c+d+e+f+g+h+i+j+k+l) > avo(r~a+b+c+d+e+f+g+h+i+j+k+l) > avo(s~a+b+c+d+e+f+g+h+i+j+k+l) > > (There's likely a better way to do this actually, but I think this'll work.) > > How d

Re: [R] Extracting Coefficients and Such from mle2 Output

2009-02-01 Thread Ben Bolker
Tom La Bone gforcecable.com> writes: > > > The mle2 function (bbmle library) gives an example something like the > following in its help page. How do I access the coefficients, standard > errors, etc in the summary of "a"? > example(mle2) coef(summary(fit1)) Ben Bolker ___

Re: [R] Putting all independent variables in one variable so performing many similar tests is more convenient

2009-02-01 Thread Henrique Dallazuanna
Try this: e <- as.formula(paste("q", paste(letters[1:12], collapse = " + "), sep = " ~ ")) aov(e) On Sun, Feb 1, 2009 at 12:27 PM, Thomas Levine wrote: > I want to do something like this. > > avo(q~a+b+c+d+e+f+g+h+i+j+k+l) > avo(r~a+b+c+d+e+f+g+h+i+j+k+l) > avo(s~a+b+c+d+e+f+g+h+i+j+k+l) > > (T

Re: [R] Putting all independent variables in one variable so performing many similar tests is more convenient

2009-02-01 Thread Gabor Grothendieck
Try: aov(yield ~., npk) On Sun, Feb 1, 2009 at 9:27 AM, Thomas Levine wrote: > I want to do something like this. > > avo(q~a+b+c+d+e+f+g+h+i+j+k+l) > avo(r~a+b+c+d+e+f+g+h+i+j+k+l) > avo(s~a+b+c+d+e+f+g+h+i+j+k+l) > > (There's likely a better way to do this actually, but I think this'll work.)

[R] density plot & probabilities

2009-02-01 Thread gregor rolshausen
hello ! I have question concerning *kernel density plots*: how to plot of a vector, when that vector is very short (5-10 values)? I tried: > plot(density(x)) or > hist(x,probability=T,border="white") > lines(density(x)) for small length of vectors, the ylab is not 0from 0 to 3. thats confu

Re: [R] density plot & probabilities

2009-02-01 Thread Uwe Ligges
gregor rolshausen wrote: hello ! I have question concerning *kernel density plots*: how to plot of a vector, when that vector is very short (5-10 values)? I tried: > plot(density(x)) or > hist(x,probability=T,border="white") > lines(density(x)) for small length of vectors, the ylab i

Re: [R] Extracting Coefficients and Such from mle2 Output

2009-02-01 Thread BooBoo
I had asked this question once before about a function in the NADA package, and you provided this neat response: [Begin quote] An approach that may yield somewhat more self-documenting code would be to examine either the fit object or the summary object with str and then to access results by

[R] correction for density plot question

2009-02-01 Thread gregor rolshausen
sorry! I ment to plot the probability vs. the values of course. not the probability vs. the density... cheers,gregor __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-proj

Re: [R] Histogram height

2009-02-01 Thread Brendan Cusick
Jim, you are a genius. Thanks for the help. Brendan On Sun, Feb 1, 2009 at 5:44 AM, Jim Lemon wrote: > Brendan Cusick wrote: > >> Hello. I have what I'm sure is a very simple question. Hopefully someone >> can help. I can't seem to find the maximum height of a histogram. In >> matlab it w

Re: [R] sub question

2009-02-01 Thread Gabor Grothendieck
On Sun, Feb 1, 2009 at 6:44 AM, Peter Dalgaard wrote: > Gabor Grothendieck wrote: >> >> On Sat, Jan 31, 2009 at 6:01 PM, Wacek Kusnierczyk > > th some additional boring pedantry wrt. ?gsubfn, which says: >>> >>> " If 'replacement' is a formula instead of a function then a one >>>line function

[R] R in Batch mode query

2009-02-01 Thread Philip Smith
Hi All: How does one run R in batch mode on Windows? Thank you! Phil Smith __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide c

Re: [R] Extracting Coefficients and Such from mle2 Output

2009-02-01 Thread David Winsemius
As Ben Bolker's reply hints, our difficulty was that because we were insufficiently knowledgeable regarding working with S4 objects such as "a" and summary(a) object. Both mle2 and summary(a) produce S4 objects which need a different set of extraction technology. Although I did not know

Re: [R] R in Batch mode query

2009-02-01 Thread Gabor Grothendieck
Try this: ?BATCH ?Rscript On Sun, Feb 1, 2009 at 10:34 AM, Philip Smith wrote: > Hi All: > > > How does one run R in batch mode on Windows? > > > Thank you! > > > Phil Smith > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/list

Re: [R] correction for density plot question

2009-02-01 Thread Uwe Ligges
gregor rolshausen wrote: sorry! I ment to plot the probability vs. the values of course. not the probability vs. the density... You have plotted the histogram, i.e. the empirical version of the density. If you want to plot a (empirical?) probability function, you might want to look at ?ec

Re: [R] sub question

2009-02-01 Thread Wacek Kusnierczyk
Peter Dalgaard wrote: > Gabor Grothendieck wrote: >> On Sat, Jan 31, 2009 at 6:01 PM, Wacek Kusnierczyk > th some additional boring pedantry wrt. ?gsubfn, which says: >>> >>> " If 'replacement' is a formula instead of a function then a one >>> line function is created whose body is the right ha

Re: [R] Multidimensional scalling

2009-02-01 Thread stephen sefick
#this is all assuming you want Bray-Curtis distances, but there are other distances involved. library(vegan) library(labdsv) dis.bc <- vegdist(your.data) bc4d.nmds <- nmds(dis.bc,4) ordcomp(bc4d.nmds,dis.bc,dim=4) On Sat, Jan 31, 2009 at 6:53 AM, Titus von der Malsburg wrote: > Hi Tomek, have a

Re: [R] bug in R2WinBUGS

2009-02-01 Thread Uwe Ligges
Obviously my last bugfix introduced another issue. Arrgh. I will need to generate some more test cases. Not that funny to maintain code that I'd never use myself anymore since BRugs has been released... Best, Uwe Ligges Mike Meredith wrote: Problem with the change is that none of our ol

Re: [R] Extracting Coefficients and Such from mle2 Output

2009-02-01 Thread David Winsemius
Let me admit at this point that I am not really sure that S4 classes is the correct classification of such "@"-using extraction processes. The documentation refers to "formal methods" and I don't yet have enough knowledge to know that how tightly slots and formal classes are linked with S4

Re: [R] display p-values and significance levels

2009-02-01 Thread Uwe Ligges
herwig wrote: Hi there, I got a piece of code for the Iris data which allows to display correlation coefficients for each Iris species in the lower panel (color coded). I would now like to add e.g. a "*" to show the significance of each correlation next to the correlation coefficient. Furt

[R] setting a large value of --max-vsize

2009-02-01 Thread Shlomo Ahal
Hello, I'm using a 64bit Linux with 16GB of RAM. I'd like to limit the memory that the R process can use so I'm trying to use --max-vsize switch. However, it is seems that I can't enforce a limit above 2GB. shl...@hippo:~$ uname -a Linux hippo 2.6.24-16-generic #1 SMP Thu Apr 10 12:47:45 UTC 2008

Re: [R] Extracting Coefficients and Such from mle2 Output

2009-02-01 Thread Marc Schwartz
on 02/01/2009 10:45 AM David Winsemius wrote: > Let me admit at this point that I am not really sure that S4 classes is > the correct classification of such "@"-using extraction processes. The > documentation refers to "formal methods" and I don't yet have enough > knowledge to know that how tight

[R] need some help about using R for Kaplan-Meier estimator

2009-02-01 Thread chen chen
Hi Fello: I am asked to compute the Kaplan-Meier estimator of data with right censoring without using surfit(). Does anyone know how to use R to compute the estimators? The data should input X: vector of right-censored observed time for n individuals, and d: vector of failure time indicators (

Re: [R] need some help about using R for Kaplan-Meier estimator

2009-02-01 Thread Peter Dalgaard
chen chen wrote: Hi Fello: I am asked to compute the Kaplan-Meier estimator of data with right censoring without using surfit(). I.e., a homework problem... For such problem people will at best offer hints. The KM estimator is the ---> cumulative product of ---> decrements that depend

Re: [R] sub question

2009-02-01 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: > Gabor Grothendieck wrote: > >> On Sat, Jan 31, 2009 at 4:46 PM, Wacek Kusnierczyk >> wrote: >> >> >>> >>> to extend the context, if you were to solve the problem in perl, the >>> regex below would work in perl 5.10, but not in earlier versions of >>> perl; an

[R] R: Trellis Graph

2009-02-01 Thread
I would like to plot X against Y in a trellis graph, wherein Y is the conditioning variable. Y represents time, but instead of distinct categories (eg, 0-10,11-20,21-30,...) I would like to use overlapping categories (0-10,0-20,0-30,...). Does anyone know how to do this, either via options in R g

Re: [R] How do I get my IT department to "bless" R?

2009-02-01 Thread Carl Witthoft
It's just not that easy. A friend of mine at a large company whose name rhymes with "Maytheon" spent over 3 months trying to get approval from IT for a commercial database tool. IT departments tend to be empire-building fools, and extraordinarily paranoid to boot. At my parent company, who

Re: [R] run query using rexcel runrfile and rodbc sql query

2009-02-01 Thread Erich Neuwirth
1. Please subscribe to the rcom mailing list, and pose your question there. RExcel questions should not be posed on r-help. 2. You have a trivial typo in your code, you define inSet and then you use inSET. When code does not run in RExcel, please test the same code in R. You code will not run in R

Re: [R] How do I get my IT department to "bless" R?

2009-02-01 Thread Spencer Graves
One of the benefits of the current global economic crisis is that some organizations facing financial difficulties are considering options that were not unmentionable only 6 months ago. Spencer Graves Carl Witthoft wrote: It's just not that easy. A friend of mine at a large compa

Re: [R] How do I get my IT department to "bless" R?

2009-02-01 Thread Stavros Macrakis
Though there are certainly some *ir*rational reasons for IT departments' behavior, there are also many rational reasons that IT departments try to control the software running in their organizations. Condescendingly assuming that the IT department is run by idiots whose decisions are ruled by emot

[R] Environmental variables

2009-02-01 Thread David Epstein
I use a Mac (10.4.11 Mac Os X). In my .tcshrc I define an environmental variable MY. Is it possible to find out its value from inside R? When one loads R for Mac OS X Cocoa GUI written by: Simon Urbanek Stefano M. Iacus are files like .tcshrc read by R? Can I make the value of th

Re: [R] Extracting Coefficients and Such from mle2 Output

2009-02-01 Thread Ben Bolker
Marc Schwartz comcast.net> writes: > > on 02/01/2009 10:45 AM David Winsemius wrote: > > Let me admit at this point that I am not really sure that S4 classes is > > the correct classification of such "@"-using extraction processes. The > > documentation refers to "formal methods" and I don't ye

[R] Fit indexes in SEM with categorical data + ML estimation

2009-02-01 Thread Dorothee
Hello, It has been found that SEM analysis using polychoric correlations + maximum likelihood estimator produces incorrect test statistics and standard errors (e.g., Flora, D. B., & Curran, P. J. (2004). An Empirical Evaluation of Alternative Methods of Estimation for Confirmatory Factor Analysis

Re: [R] Extracting Coefficients and Such from mle2 Output

2009-02-01 Thread Bill.Venables
A minor footnote to Ben's response. Why is it *supposed* to be harder to get bits out of objects like this and why should you work through accessor functions? ("If it works, why shouldn't I use it?" - why indeed.) The answer I would give is that if you work through the official accessor funct

[R] logLik for poisson models

2009-02-01 Thread Antonio.Gasparrini
Dear all, I have a very basic question: how does the logLik function work for poisson models? Example: I simulate 20 observations from a Poisson distribution with mean 800. y <- rpois(20,800) model <- glm(y ~ 1, family=poisson()) logLik(model) I would like to know what's the exact formula th

Re: [R] Power analysis for MANOVA?

2009-02-01 Thread Rick Bilonick
On Wed, 2009-01-28 at 21:21 +0100, Stephan Kolassa wrote: > Hi Adam, > > first: I really don't know much about MANOVA, so I sadly can't help you > without learning about it an Pillai's V... which I would be glad to do, > but I really don't have the time right now. Sorry! > > Second: you seem to

[R] gbm package: relationship between interaction.depth and number of features?

2009-02-01 Thread Tim Converse
I'm puzzled by the interaction.depth argument to the gbm() function, and whether it specifies just the tree depth, or also (implicitly) the number of distinct features used in splits. >From some version of the documentation I have: "interaction.depth The maximum depth of variable interactions

Re: [R] Environmental variables

2009-02-01 Thread andrew
can you use the system function? system("echo $PATH") On Feb 2, 11:10 am, David Epstein wrote: > I use a Mac (10.4.11 Mac Os X). > > In my .tcshrc I define an environmental variable MY. > Is it possible to find out its value from inside R? When one loads > R for Mac OS X Cocoa GUI written by:

[R] Problems in Recommending R

2009-02-01 Thread Ajay ohri
Dear List, One persistent feedback I am getting to people who are newly introduced to R ( especially in this cost cutting recession) is - 1) The website looks a bit old. While the current website does have a lot of hard work behind it, should n't a world class statistics package have a better we

Re: [R] logLik for poisson models

2009-02-01 Thread John Sorkin
Antonio, Given the model you used, the log link means you are modeling log(expected value of y)=intercept If you had an independent variable e.g. x model <- glm(y ~ x, family=poisson()) you would be modeling log(expected value of y)=intercept+x John John David Sorkin M.D., Ph.D. Chief, Biosta

Re: [R] How do I get my IT department to "bless" R?

2009-02-01 Thread Murray Cooper
I was about to post a similar reply. Stavros's reply was very eloquent and should be taken to heart! Murray M Cooper, Ph.D. Richland Statistics 9800 N 24th St Richland, MI, USA 49083 Mail: richs...@earthlink.net - Original Message - From: "Stavros Macrakis" To: Sent: Sunday, February

Re: [R] Environmental variables

2009-02-01 Thread Charles C. Berry
On Sun, 1 Feb 2009, David Epstein wrote: I use a Mac (10.4.11 Mac Os X). In my .tcshrc I define an environmental variable MY. Is it possible to find out its value from inside R? When one loads R for Mac OS X Cocoa GUI written by: Simon Urbanek Stefano M. Iacus are files like .t

Re: [R] logLik for poisson models

2009-02-01 Thread Charles C. Berry
On Mon, 2 Feb 2009, antonio.gasparr...@lshtm.ac.uk wrote: Dear all, I have a very basic question: how does the logLik function work for poisson models? You mean its inner workings or just what is the computation? The computation is just the vanilla loglikelihood: sum( dpois( y, mean

Re: [R] Problems in Recommending R

2009-02-01 Thread Stavros Macrakis
A first step that would make the current Web page look much better would be to anti-alias the demonstration graphic. The current graphic makes R graphics seem (falsely!) to be very primitive. I'm afraid I don't know how to do the anti-aliasing myself. Replacing the fixed-width, typewriter-style f

Re: [R] Environmental variables

2009-02-01 Thread Gad Abraham
David Epstein wrote: I use a Mac (10.4.11 Mac Os X). In my .tcshrc I define an environmental variable MY. Is it possible to find out its value from inside R? When one loads R for Mac OS X Cocoa GUI written by: Simon Urbanek Stefano M. Iacus are files like .tcshrc read by R? Can

Re: [R] Problems in Recommending R

2009-02-01 Thread Thomas Petzoldt
Hi, you are probably right, though I must say that I like *spartanic and efficient* homepages and I don't think that the example given by the first mail is a good prototype for the R homepage. But, yes, occasional face lifting may be adequate. Anti-aliasing is of course simple, but that's pr

[R] hatching part of an area under curve

2009-02-01 Thread Alphonse Monkamg
Dear R users, I have drawn a kernel density curve and I would like to hatch a part of it: where value is less than -2, P(Z< -2). I only know how to hatch the entire area under the curve. Please, does any one know how to hatch part of it. Thanks,   Alphonse. [[alternative HTML ve