[R] R, Coda, and OpenBUGS

2009-10-07 Thread Bill Halteman
Hi All, I am trying to figure out how to use R-Coda with the output from OpenBugs. I have installed and loaded the packages BRugs and R2WinBUGS. I have successfully run a simple Bayes model in WinBUGS using R2WinBUGS' bugs and have used read.bugs to build the coda object. I can

[R] rpois formula

2009-10-07 Thread nedmt60
Hi all, It's been a while since i've used R and I can't remember how to do the following: i have a = rpois (10, x) b = rpois (10, y) what is the code to show that ab, ba and a=b to show just the number of occurances? at the moment when I type ab I get a nice long list of true or

[R] power?

2009-10-07 Thread SNN
Hi, I have used multiple linear regression on a data set and one if the regressor was significant with a p-value =0.01 I need to calculate the power for a multiple linear regression. i.e. do I have enough power to believe the above p-value? -- View this message in context:

Re: [R] power?

2009-10-07 Thread Simon Blomberg
The short answer is Yes. If you reject the null hypothesis based on that p-value, then by definition you had enough power to do that. This is because there is a precise inverse relationship between the p-value and the observed power, once you fix the effect size and the sample size. In other

Re: [R] gnu ODBC driver for ORACLE in WinXP platform?

2009-10-07 Thread Prof Brian Ripley
On Tue, 6 Oct 2009, Kenneth Roy Cabrera Torres wrote: Hi R users and Dr. Uwe Ligges: I read on the ROracle pre-compiled binary README file that: Hmm, that is from the CRAN README on Windows pre-compiled binary packages: there is no 'ROracle pre-compiled binary' (for Windows or Mac OS X) on

[R] RExcel

2009-10-07 Thread Benjamin Ward
Hello- I am a Graduate Assistant for an instructor who has written programs for statistics calculations such as binomial distributions and regressions. The programs had worked with no problem in Excel 2003. Now we are trying to use it with Excel 2007, and we are having some trouble. I have

[R] R-beta: adjusting y-axis scale with multiple lines in plot

2009-10-07 Thread Marko Lõoke
__ 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 commented, minimal, self-contained, reproducible code.

[R] Saving tkrplot/Clearing contents on frames/tkProgressBar

2009-10-07 Thread c...@wcs
1) How do i save tkrplots?do the Jpeg,png commands used for saving plots of RGui work for tkrplots? 2)How do I embed tkProgressBar onto a frame.I do not want that to appear in separate window? 3)Is it possible to insert a StatusBar at the bottom of the window.(My window has three frames)? 4)My

Re: [R] gnu ODBC driver for ORACLE in WinXP platform?

2009-10-07 Thread Uwe Ligges
Prof Brian Ripley wrote: On Tue, 6 Oct 2009, Kenneth Roy Cabrera Torres wrote: Hi R users and Dr. Uwe Ligges: I read on the ROracle pre-compiled binary README file that: Hmm, that is from the CRAN README on Windows pre-compiled binary packages: there is no 'ROracle pre-compiled binary'

Re: [R] how to output profile plots for groups using lattice package

2009-10-07 Thread Peter Ehlers
see below George Kalema wrote: Dear R users, I am trying to have an xyplot of a data set which has the following variables: case (n=10,20,30) parameter (parm=a,b) group (grp=g1,g2) y (y values) x (x=2,4,8) My plot should be parameter by case such that I have 2 rows (each row= each parameter)

Re: [R] Is there a recent book on Q-Q plot and data visualization in general?

2009-10-07 Thread Paul Hiemstra
Hi, See page 335 for a qq plot in the third edition of the book. cheers, Paul Peng Yu wrote: Hi, I checked the 3rd edition of this book. But I don't find Q-Q plot. Would you please take a look of the table of content below and let me know if the same section is available in the 3rd edition?

Re: [R] plot an arrow / add arrow to a line

2009-10-07 Thread Peter Ehlers
For nicer arrows, there are also the p.arrows() function in pkg:sfsmisc and the Arrows() function in pkg:IDPmisc. -Peter Ehlers Sarah Goslee wrote: How about arrows() ? On Tue, Oct 6, 2009 at 4:25 PM, Martin Batholdy batho...@googlemail.com wrote: hi, is it possible to end a line plotted

Re: [R] 'persp' query

2009-10-07 Thread Peter Ehlers
Certainly, you will want to set zlab=. mtext() is quite flexible; you can control distance to the axis with line=1.5, say. But remember that mtext() is a 2-dim graphics function - it looks at your plot as a 2-d plot. That's why I made the comment about your z-axis having to be fairly close to

Re: [R] RExcel

2009-10-07 Thread Erich Neuwirth
Please post this kind of questions to the rcom mailing list. You can subscribe at rcom.univie.ac.at __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Question about mirroring CRAN

2009-10-07 Thread Rainer M Krug
Hi this might be the wrong mailing list, but it also does not fit the dev list. As we are planning to setup a mirror of CRAN, we would like to know the approximate size of the mirror and the necessary bandwidth requirements to keep it updated. Thanks a lot in advance, Rainer -- Rainer M.

[R] two plots on the same axis

2009-10-07 Thread ogbos okike
Good morning. I wish to plot two data on the same axis. I tried plot(x,y, type = l) for the first and tried to use lines or points(x,y, lty = 2, col = 4) to add or plot the second data on alongside the first. However, what I got was not encouraging. I have attached the two data and would be

[R] Second y-axis --- alternative to par(new=

2009-10-07 Thread Rainer M Krug
Hi is there an alternative to par(new), for ading data to a plot for a different y-axis? My problem with par(new=TRUE) is, that it re-defines all axis and labels (as in example 1) and one has to use xlim=... to fix the x-axis. I am looking for something, which simply resets the y-axis, so that a

[R] Odp: two plots on the same axis

2009-10-07 Thread Petr PIKAL
Hi You did not provide enough information of what and how you want to do the plot summary(temp) V1 V2 V3 V4 Min. :5 Min. : 1.000 Min. : 1.00 Min. :3300 1st Qu.:5 1st Qu.: 3.000 1st Qu.: 8.00 1st Qu.:3947 Median :5 Median :

Re: [R] two plots on the same axis

2009-10-07 Thread baptiste auguie
Hi, Your two data sets have a different year so I'm not sure what you want to do with the x axis. The code below plots both data sets on the same graph, with a range of two years, d1 - read.table(~/Downloads/2005.txt) d2 - read.table(~/Downloads/2006.txt) cleanup - function(d){ names(d) -

[R] communication of R Programs

2009-10-07 Thread wesley mathew
Dear All I am very beginner in R I need to communicate between R programs. I have one R program for writing data in XML File. suppose I can execute same program in different R section for writing different XML files but another R program need to read these data after i wrote in XML file. Could

[R] 1st R Conferences in Spain!!

2009-10-07 Thread Usuario R
Hi all, I would like to announce that the firsts *R Conferences for the Spanish R community* will be taken place in University of Murcia on 26 and 27th of November. You can have all the information in the web page: http://www.ereros.org/where you can also subscribe and send your talk proposals

[R] help with regexps

2009-10-07 Thread Luca Braglia
Hello everybody I'd like to match exactly numbers from 1 to 27. I've tried a character class like [1-27], but it matches 1,2 and 7. How to tell R (pcre) to interpret 27 correctly? Have been fastly looking throughout pcre man pages, without success. Many thanks Luca

[R] Odp: Second y-axis --- alternative to par(new=

2009-10-07 Thread Petr PIKAL
Hi Try ?twoord.plot from plotrix package. Regards Petr r-help-boun...@r-project.org napsal dne 07.10.2009 10:29:53: Hi is there an alternative to par(new), for ading data to a plot for a different y-axis? My problem with par(new=TRUE) is, that it re-defines all axis and labels (as in

Re: [R] 1st R Conferences in Spain!!

2009-10-07 Thread Usuario R
Hi all, I am sending you again the links for the R Conferences in Spain, I think in the previous message they where not correct: Web page: www.ereros.org Email to send talk proposals: comunicaciones2...@ereros.org Information of the Spanish R community:

Re: [R] previous.best in metaMDS

2009-10-07 Thread Gavin Simpson
On Tue, 2009-10-06 at 11:03 +0200, Kim Vanselow wrote: Dear R-community, dear Jari Oksanen! I use metaMDS (package vegan) to calculate NMDS. In a lot of papers I read that it is recommended to use previous best solutions as a new starting configuration to get better results and to avoid

Re: [R] Second y-axis --- alternative to par(new=

2009-10-07 Thread Rainer M Krug
On Wed, Oct 7, 2009 at 11:28 AM, Petr PIKAL petr.pi...@precheza.cz wrote: Hi Try ?twoord.plot from plotrix package. Thanks Petr - I was not aeware of this command. But I would prefer a more general solution. An example on where I am using is, to plot a histogram overlayed by its density

Re: [R] Second y-axis --- alternative to par(new=

2009-10-07 Thread Petr PIKAL
r-help-boun...@r-project.org napsal dne 07.10.2009 11:37:22: On Wed, Oct 7, 2009 at 11:28 AM, Petr PIKAL petr.pi...@precheza.cz wrote: Hi Try ?twoord.plot from plotrix package. Thanks Petr - I was not aeware of this command. But I would prefer a more general solution. An example

Re: [R] Second y-axis --- alternative to par(new=

2009-10-07 Thread Rainer M Krug
On Wed, Oct 7, 2009 at 11:53 AM, Petr PIKAL petr.pi...@precheza.cz wrote: r-help-boun...@r-project.org napsal dne 07.10.2009 11:37:22: On Wed, Oct 7, 2009 at 11:28 AM, Petr PIKAL petr.pi...@precheza.cz wrote: Hi Try ?twoord.plot from plotrix package. Thanks Petr - I was

Re: [R] Plot

2009-10-07 Thread Jim Lemon
On 10/07/2009 01:05 AM, Ashta wrote: Days- matrix(c(Monday, Tuesday, Wed, Thu, Fri, Sat, Sun),7,1) Hum-matrix(c(56,57,60,75,62,67,70), Temp-matrix(c(76,77,81,95,82,77,83), Hi Ashta, Are you looking for something like this: dht-data.frame( Days=c(Mon,Tue,Wed,Thu,Fri,Sat,Sun),

Re: [R] Second y-axis --- alternative to par(new=

2009-10-07 Thread Petr PIKAL
Hi Rainer M Krug r.m.k...@gmail.com napsal dne 07.10.2009 12:09:21: On Wed, Oct 7, 2009 at 11:53 AM, Petr PIKAL petr.pi...@precheza.cz wrote: r-help-boun...@r-project.org napsal dne 07.10.2009 11:37:22: On Wed, Oct 7, 2009 at 11:28 AM, Petr PIKAL petr.pi...@precheza.cz wrote: Hi

Re: [R] rpois formula

2009-10-07 Thread Duncan Murdoch
nedmt60 wrote: Hi all, It's been a while since i've used R and I can't remember how to do the following: i have a = rpois (10, x) b = rpois (10, y) what is the code to show that ab, ba and a=b to show just the number of occurances? at the moment when I type ab I get a nice long list

Re: [R] Second y-axis --- alternative to par(new=

2009-10-07 Thread Rainer M Krug
On Wed, Oct 7, 2009 at 12:26 PM, Petr PIKAL petr.pi...@precheza.cz wrote: Hi Rainer M Krug r.m.k...@gmail.com napsal dne 07.10.2009 12:09:21: On Wed, Oct 7, 2009 at 11:53 AM, Petr PIKAL petr.pi...@precheza.cz wrote: r-help-boun...@r-project.org napsal dne 07.10.2009 11:37:22: On

Re: [R] two plots on the same axis

2009-10-07 Thread Jim Lemon
On 10/07/2009 07:12 PM, ogbos okike wrote: Good morning. I wish to plot two data on the same axis. I tried plot(x,y, type = l) for the first and tried to use lines or points(x,y, lty = 2, col = 4) to add or plot the second data on alongside the first. However, what I got was not encouraging. I

Re: [R] Second y-axis --- alternative to par(new=

2009-10-07 Thread Petr PIKAL
Hi Rainer M Krug r.m.k...@gmail.com napsal dne 07.10.2009 12:40:39: On Wed, Oct 7, 2009 at 12:26 PM, Petr PIKAL petr.pi...@precheza.cz wrote: Hi Rainer M Krug r.m.k...@gmail.com napsal dne 07.10.2009 12:09:21: snip In the meantime, what about x - rnorm(200) hist(x, col =

[R] Grid on persp plot

2009-10-07 Thread Jesse Brown
Hello, I have a persp plot that I am generating which shows a growth trend toward the 'rear' of the displayed box. I would like to have grid lines visible on the plot to give a reference to the amount the values are increasing. I have tried rotating the plot 180 degrees to put the growth in

[R] Formatting outputs:(chronological object)

2009-10-07 Thread Subodh Acharya
Hello everyone, I have a data generated in a way similar to the following library(chron);library(zoo) date- seq(as.Date(1990-01-01),, as.Date(2000-12-31), by = 1) obs- zoo(rnorm(length(date), mean = 10, sd = 2.5), order.by = date) monthly- function(date) as.Date(as.yearmon(Date)) result-

Re: [R] Second y-axis --- alternative to par(new=

2009-10-07 Thread Rainer M Krug
On Wed, Oct 7, 2009 at 1:48 PM, Petr PIKAL petr.pi...@precheza.cz wrote: Hi Rainer M Krug r.m.k...@gmail.com napsal dne 07.10.2009 12:40:39: On Wed, Oct 7, 2009 at 12:26 PM, Petr PIKAL petr.pi...@precheza.cz wrote: Hi Rainer M Krug r.m.k...@gmail.com napsal dne 07.10.2009

Re: [R] Save plot to text file

2009-10-07 Thread Henrique Dallazuanna
See ?recordPlot On Wed, Oct 7, 2009 at 5:09 AM, Pradeep Raje raje.prad...@gmail.com wrote: Dear all:I am sorry if I have missed a solution posted earlier. My collaborator (sitting in a different time zone  and not on R) wants to re-plot the charts that I have obtained after some complex

Re: [R] help with regexps

2009-10-07 Thread Dieter Menne
Luca Braglia-2 wrote: I'd like to match exactly numbers from 1 to 27. If you feel in masochistic mode, you can do it: b = c(32,3,17,27,28,57,a13) a = c(^([0-9]|[0-1][0-9]|2[0-7])$) grep(a,b,value=TRUE) A much more flexible way would be to isolate the numeric part first, and test for

[R] Parameters of Beta distribution

2009-10-07 Thread Maithili Shiva
  Supose I have a data pertaining to credit loss as   amounts - c(46839.50,31177.12,35696.69,21192.57,29200.91,42049.64,42422.19, 44976.18, 32135.36,47936.57,27322.91,37359.09,43179.60, 48381.02, 45872.38, 28057.30,44643.83,36156.33,16037.62, 45432.28)   I am trying to fit Beta distribution (two

Re: [R] communication of R Programs

2009-10-07 Thread Dieter Menne
wesley mathew wrote: I have one R program for writing data in XML File. suppose I can execute same program in different R section for writing different XML files but another R program need to read these data after i wrote in XML file. It is a bit unclear for me what you mean with 'R

Re: [R] rpois formula

2009-10-07 Thread Peter Dalgaard
David Winsemius wrote: Or: a = rpois (10, 0.1) b = rpois (10, 0.15) table(ab, a==b, ba) table(sign(b-a)) comes to mind too (and table(a,b) is illuminative). -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box

[R] [R-pkgs] Updates to rms package

2009-10-07 Thread Frank E Harrell Jr
The rms package, a replacement for the Design package, has been updated on CRAN. The most major change is the addition of smooth calibration curves for externally (val.surv function) or internally (calibrate.cph, calibrate.psm) validating a survival model with right-censored data. The

Re: [R] R, Coda, and OpenBUGS

2009-10-07 Thread Frank E Harrell Jr
Have you tried the rjags package which uses the jags system? It is much more integrated into R and works quite well. It uses the same modeling language as BUGS. It is also better supported than OpenBUGS. Frank Bill Halteman wrote: Hi All, I am trying to figure out how to use R-Coda

Re: [R] Formatting outputs:(chronological object)

2009-10-07 Thread jim holtman
try this -- the example you provided did not work, so I had to hack together an example: library(chron);library(zoo) date- seq(as.Date(1990-01-01), as.Date(2000-12-31), by = 1) obs-rnorm(length(date), mean = 10, sd = 2.5) monthly- function(date) as.Date(as.yearmon(date)) obs - tapply(obs,

Re: [R] R, Coda, and OpenBUGS

2009-10-07 Thread Uwe Ligges
Bill Halteman wrote: Hi All, I am trying to figure out how to use R-Coda with the output from OpenBugs. I have installed and loaded the packages BRugs and R2WinBUGS. I have successfully run a simple Bayes model in WinBUGS using R2WinBUGS' bugs and have used read.bugs to build the coda

Re: [R] Parameters of Beta distribution

2009-10-07 Thread JLucke
Rescale your data x to (x-A)/(B-A). Maithili Shiva maithili_sh...@yahoo.com Sent by: r-help-boun...@r-project.org 10/07/2009 08:39 AM To r-help@r-project.org cc Subject [R] Parameters of Beta distribution Supose I have a data pertaining to credit loss as amounts -

[R] Prediction from BMA

2009-10-07 Thread Anthony Staines
Dear colleagues, I am doing a little bit of work using the BMA package to examine predictive models for types of pain - the outcome variable is a binary (Yes/No) for the type of pain experienced by a patient. Our observation is that BMA makes a lot of sense in this application, as the data

[R] Emacs + ESS + R installer

2009-10-07 Thread Frank Liu
Dear list, I and some students built an Emacs + ESS + R installer, which allows users to download and install the newest version of Emacs, ESS, and R with little pain.The size of the installer is about 8Mb. http://sourceforge.net/projects/emacs-for-r/ Please feel free to give me comments and

[R] how to extract the second table from the factanal functions result's loadings part?

2009-10-07 Thread Moumita Das
Hi All, Can someone help me?The way to do this may be very easy but i do not know. *Question1:* factanal() function produces the results in this way:-- *RESULTS:--* *fact1- factanal(data_withNA,factors=1,rotation=none) fact1$loadings* Loadings: Factor1 i1 0.784 i2 0.874 i3 0.786 i4

Re: [R] communication of R Programs

2009-10-07 Thread Richard M. Heiberger
I don't understand the context of the question. Since the data is already in R, you should use it from within R. What is the reason for translating it to XML and then back? You take the risk of two levels of distortion. I am guessing that you want continuity of your work over multiple login

Re: [R] R, Coda, and OpenBUGS - Thanks!!

2009-10-07 Thread Bill Halteman
Worked perfectly. Thanks very Much Uwe Ligges wrote: Bill Halteman wrote: Hi All, I am trying to figure out how to use R-Coda with the output from OpenBugs. I have installed and loaded the packages BRugs and R2WinBUGS. I have successfully run a simple Bayes model in WinBUGS using

[R] merging dataframes with an unequal number of variables

2009-10-07 Thread christiaan pauw
Hallo Everyone I have the kind of problem that one should never have because one must always plan well and communicate with your team. But now I haven't so here is my problem. I have data coming in on a daily basis from surveys in 10 towns. The questionnaire has 62 variables but some of the

Re: [R] [ESS] Emacs + ESS + R installer

2009-10-07 Thread Stephen Eglen
Frank Liu frankcs...@gmail.com wrote: I and some students built an Emacs + ESS + R installer, which allows users to download and install the newest version of Emacs, ESS, and R with little pain.The size of the installer is about 8Mb. http://sourceforge.net/projects/emacs-for-r/ Please

Re: [R] merging dataframes with an unequal number of variables

2009-10-07 Thread Gabor Grothendieck
See ?rbind.fill in the plyr package. On Wed, Oct 7, 2009 at 9:32 AM, christiaan pauw cjp...@gmail.com wrote: Hallo Everyone I have the kind of problem that one should never have because one must always plan well and communicate with your team. But now I haven't so here is my problem. I have

[R] windows system file aux

2009-10-07 Thread christophe dutang
Hi all, I just would like to notice a small problem of R on windows (XP at least). If you execute the following lines x - rexp(1000) write.csv(x, file=aux.csv) the R GUI just loops for ever... this is due to the fact on windows, users can create a file or directory with the name aux or aux.*. If

[R] Unable to load rjags

2009-10-07 Thread JLucke
I am trying to install rjags. Although I can install the library, I cannot load the package. See below. Here is my session sessionInfo() R version 2.9.2 (2009-08-24) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United

Re: [R] Second y-axis --- alternative to par(new=

2009-10-07 Thread cls59
Rainer M Krug-6 wrote: Thanks - but if I want to have the histogram with counts (freq=TRUE), then I have exactly the situation I was talking about - sorry for not being clear: x - rnorm(200) hist(x, col = blue, freq = TRUE) lines(density(x), col = red, lwd = 2) i.e. left y-axis

[R] neural network arguments

2009-10-07 Thread CJ Rubio
hi everyone! my inquiry with neural network is rather basic. i am just learning neural network, particularly the VR bundle. i read the documentations for the said bundle but still is struggling on understanding some arguments - x is the matrix or data frame of x values for example does this

Re: [R] Second y-axis --- alternative to par(new=

2009-10-07 Thread cls59
cls59 wrote: # recovering par('xaxp') uses the original x limits. plot.window( xlim = range( par('xaxp')[1:2] ), ylim = range( density(x)$y )) Actually, I misspoke. I believe the following is the voodoo you want for exactly recovering the original xlimit: plot.window( xlim =

Re: [R] Unable to load rjags

2009-10-07 Thread Uwe Ligges
jlu...@ria.buffalo.edu wrote: I am trying to install rjags. Although I can install the library, I cannot load the package. See below. Here is my session sessionInfo() R version 2.9.2 (2009-08-24) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United

[R] princomp data input format

2009-10-07 Thread Jacob Kasper
I am trying do to a PCA analysis using princomp. I get a result, but I wonder if I have the data in the correct format. My data contains many stations where fish were sampled as well as environmental information for each station (lat, lon, depth, temp and year). the format is like this: species 1|

[R] sinusoidal relationship

2009-10-07 Thread HAKAN DEMIRTAS
Hi, Suppose x and y are vectors whose elements are known. I know that there is a sinusoidal relation between them. In other words, y=a*sin(bx) where b is probably a function of pi. How do I find a and b in R? Hakan [[alternative HTML version deleted]]

Re: [R] Parameters of Beta distribution

2009-10-07 Thread Albyn Jones
Are A and B known? That is, are there known upper and lower bounds for this credit loss data? If not, you need to think about how to estimate those bounds. Why do you believe the data have a beta distribution? albyn On Wed, Oct 07, 2009 at 09:03:31AM -0400, jlu...@ria.buffalo.edu wrote:

Re: [R] sinusoidal relationship

2009-10-07 Thread Ravi Varadhan
I assume that you are trying to fit the sinusoidal model, with an error term, to data: y = a * sin(b*x) + error Here you can use the `nls' function for non-linear least-squares. ?nls Here is an example: a - 0.5 b - 0.2 x - seq(0, 10, length=100) eps - rnorm(length(x), sd=0.1) y

Re: [R] [ESS] Emacs + ESS + R installer

2009-10-07 Thread Vincent Goulet
Le mer. 7 oct. à 09:41, Stephen Eglen a écrit : Frank Liu frankcs...@gmail.com wrote: I and some students built an Emacs + ESS + R installer, which allows users to download and install the newest version of Emacs, ESS, and R with little pain.The size of the installer is about 8Mb.

[R] Plotting 1 covariate, 3 factors

2009-10-07 Thread Paul Chatfield
I'm interested in plotting a y with an x factor as the combination of 2 factors and colour with respect to a third, which the code below does with interaction.plot(). However, this is because I redefine the x to be 1 factor. Is there a way of getting it to plot without redefining it, and

Re: [R] plot an arrow / add arrow to a line

2009-10-07 Thread David Winsemius
RSearch is your friend! (Do we need an LMRSTFY.org?) Had the OP used the RSearch facilities restricting the search to only functions, he would have found an astonishingly large number of functions (219) that mention arrows:

[R] MCMClogit: normal intercept priors don't work

2009-10-07 Thread AlexanderDueDo
Dear R users, I think that the question I posted yesterday was not specific enough. Apologies for this. The question should have been: why does MCMClogit stop working if I a) set a normal prior for the intercept and b) remove all variables except for the intercept as explanatory? Example code:

[R] 2 questions about mle() /optim() function in stats4

2009-10-07 Thread Muhtar Osman
Dear All, There are two things about mle() that I wasn't so sure. 1) can mle() handle vector based parameter? say ll-function(theta=rep(1,20)){..} I tried such function, it worked for optim but not for mle. 2) is there a general suggestion for the maximum number of parameters

[R] Power for Multiple regression?

2009-10-07 Thread SNN
Hi All, I came across this problem which is more a statistical question, I am hoping that some one can clarify this for me Is there a rule of thumb to determine how large your sample size should be before you perform multiple regression. I have search the web and I found some online tools where

Re: [R] power?

2009-10-07 Thread SNN
Thanks Simon for the help. Simon Blomberg-4 wrote: The short answer is Yes. If you reject the null hypothesis based on that p-value, then by definition you had enough power to do that. This is because there is a precise inverse relationship between the p-value and the observed power,

[R] Simulate negative skewed, fat-tailed distribution

2009-10-07 Thread inquil
Hi guys Is there a way in R to simulate/generate random numbers from a negative skewed and fat tailed distribution ? I would like to simulate a set of (discrete) data. Regards, Carlos Carlos http://www.nabble.com/file/p25783889/graph.png graph.png -- View this message in context:

[R] Help with pchisq function

2009-10-07 Thread RwithC
I have some data in my C code, I want to execute chi-square test on those data. I tried implementing pchisq() function making use of header files R.h, Rhead.H and Rinternals.h, but it neither gave me the result nor threw any errors. It just returned 0 or 1. Could you please help me how can I

[R] cforest regressions - mean of squared residuals

2009-10-07 Thread AnnieE
Hi there, I haven't been able to locate a way to get at this information in the manual or tutorial. Does anybody know how to retrieve it? Or amount of variance explained? Thanks, Annie -- View this message in context:

[R] choose.files limit?

2009-10-07 Thread Gunnar W. Schade
Howdy, When I use the choose.files command to read files a large number of file names to a character vector inside a function, used to access these files one after the other, there appears to be a limit. I do not know whether it is arbitrary, but in this case the limit was 991 files. The file

Re: [R] 2 questions about mle() /optim() function in stats4

2009-10-07 Thread Ben Bolker
Muhtar Osman wrote: Dear All, There are two things about mle() that I wasn't so sure. 1) can mle() handle vector based parameter? say ll-function(theta=rep(1,20)){..} I tried such function, it worked for optim but not for mle. No. mle2, in the bbmle package,

[R] Which JAGS interface to use?

2009-10-07 Thread Kevin Wright
Frank (or anyone else), can you offer any comments comparing runjags, R2jags, rjags ? I couldn't find any vignettes, nothing except a brief mention on Task Views. Kevin On Wed, Oct 7, 2009 at 7:48 AM, Frank E Harrell Jr f.harr...@vanderbilt.edu wrote: Have you tried the rjags package which

Re: [R] Plotting 1 covariate, 3 factors

2009-10-07 Thread Richard M. Heiberger
## Paul ## I think you are looking for interaction2wt y - rnorm(36) f1 - rep(c(after, before), 18) f2 - rep(1:3, 12) f3 - rep(1:2, each=18) ## your definition of ff was faulty. It gave a constant. f3.f1 - interaction(f3, f1) interaction.plot(f3.f1, f2, y) f2 - factor(f2) f3 - factor(f3) ##

Re: [R] Simulate negative skewed, fat-tailed distribution

2009-10-07 Thread Ravi Varadhan
Take a look at the `rstable' function in the stable package to simulate random deviates from a stable distribution. Ravi. --- Ravi Varadhan, Ph.D. Assistant Professor, The Center on Aging and Health Division of

Re: [R] Plotting 1 covariate, 3 factors

2009-10-07 Thread Douglas Bates
I'm not sure if this is exactly what you are looking for but I would generally create an interaction plot using the lattice 'dotplot' with type = c(p,a) so I get both the original data and the lines joining the averages for the different factor levels. I also prefer the horizontal orientation to

Re: [R] power? -- Wait a minute!

2009-10-07 Thread Bert Gunter
Whoa -- wait a minute here! The poster said that one of the regressors had a P-value of .01, and asked if this was believable. One of how many? -- 3? 300? What about multiplicity? How was the regression model selected -- P Values are essentially meaningless when computed **after** model selection.

Re: [R] Problem using with panel.average in Lattice package

2009-10-07 Thread Deepayan Sarkar
On Sun, Oct 4, 2009 at 3:20 PM, Peter Ehlers ehl...@ucalgary.ca wrote: Deepayan, Is something similar needed in the last example in ?xyplot? I don't see panel.linejoin producing any lines. You are right (I never noticed because that example doesn't get run). I'll hard-code the type=l in

[R] error using predict() / fRegression-package

2009-10-07 Thread Gero Schwenk
Hello! I'm puzzled by the following problem. It occurs while trying to predict responses in a test-dataset using a linear model fitted with regFit from the rMetrics fRegression-package. All goes well when I call predict using the training dataset. However, a call using the test-dataset

Re: [R] Which JAGS interface to use?

2009-10-07 Thread Frank E Harrell Jr
We use it on Linux - here's our how-to: http://biostat.mc.vanderbilt.edu/JAGSInstallExample Frank Kevin Wright wrote: Frank (or anyone else), can you offer any comments comparing runjags, R2jags, rjags ? I couldn't find any vignettes, nothing except a brief mention on Task Views. Kevin

[R] Need a vectorized way to avoid two nested FOR loops

2009-10-07 Thread Rama Ramakrishnan
Hi Friends, I have a data frame d. Let vars be the column indices for a subset of the columns in d (e.g., vars - c(1,3,4,8)) For each row r in d, I want to collect all the other rows in d that match the values in row r for just the columns in vars. The naive way to do this is to have a

[R] graphics

2009-10-07 Thread McDonald, Grant
Dear Sir, I am using the following cos which creates a 3 panel figure on one image. However the legend function i am using only allows the legend to be placed within the axes of one of the graphs. The plots however do not allow for a logend to be places within the axes do to the location

Re: [R] is that possible to graph 4 dimention plot

2009-10-07 Thread Ryan
Suppose there are 4 variables d is a function of a , b and c I want to know how a, b and c change will make d change It will be straightforward to see it if we can graph the d surface if d is only a function of a and b, I can use 'persp' to see the surface of d. I can easily see at what

Re: [R] graphics

2009-10-07 Thread David Winsemius
On Oct 7, 2009, at 2:01 PM, McDonald, Grant wrote: Dear Sir, I am using the following cos which creates a 3 panel figure on one image. However the legend function i am using only allows the legend to be placed within the axes of one of the graphs. The plots however do not allow for a

Re: [R] graphics

2009-10-07 Thread Sarah Goslee
Hello, On Wed, Oct 7, 2009 at 2:01 PM, McDonald, Grant grant.mcdonal...@imperial.ac.uk wrote: Dear Sir, Well, I'm not a sir but perhaps I can help anyway. Is it possible to place the legend out side of figure axes on the white area around all three panels? Any help would be greatly

Re: [R] graphics

2009-10-07 Thread jim holtman
Here is another way of creating the legend using layout layout(cbind(1,2), width=c(7,1)) plot(1:10,1:10) # now create legend old.par - par(mar=c(3, 0, 3, 0)) plot.new() legend('left', legend=c('line 1', 'line 2')) par(old.par) On Wed, Oct 7, 2009 at 2:01 PM, McDonald, Grant

[R] Make a blank dataframe with given dimensions

2009-10-07 Thread Mark Na
Hi R-helpers, I would like to make a blank dataframe, i.e. a dataframe without any rows. I would like the blank dataframe (which is to be called merged) to have 0 rows and 32 columns. Once I've made the dataframe, I'll specify the column names using:

Re: [R] Make a blank dataframe with given dimensions

2009-10-07 Thread Richard M. Heiberger
tmp - data.frame(matrix(nrow=0, ncol=32)) tmp [1] X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19 [20] X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30 X31 X32 0 rows (or 0-length row.names) names(tmp) - c(letters, LETTERS[1:6]) tmp [1] a b c d e f g h i j k l m n o p

[R] Why do I have the following error message?

2009-10-07 Thread LinZhongjun
Dear R-help lists: Hello! I ran WinBUGS under R using the function bugs. But I kept having the following error message: Error in FUN(X[[3L]], ...) : .C(..): 'type' must be real for this format Why did I have the error message?What's the problem?How to get rid of the error message? Thank

[R] Installing R on Suse 11.1 , cannot figure it out

2009-10-07 Thread Robert Wilkins
Can't figure out how the install works, it is certainly not automatic. Also , the Install option on the R web site for Suse 11.1 does not work. And the install software native to Suse, cannot figure out. Does Suse have more problems installing software than Fedora or Ubuntu? Or is this a hassle

[R] Evaluating/comparing dynamic linear model

2009-10-07 Thread R_help Help
Hi, I have two DLM model specifications (x[t] and y[t] are univariate): MODEL1: y[t] = b[t]x[t]+e[t], e[t] ~ N(0,v1^2) b[t] = b[t-1]+eta[t], eta[t] ~ N(0,w1^2) MODEL2: y[t] = a[t]+e[t], e[t] ~ N(0,v2^2) a[t] = a[t-1]+eta[t], eta[t] ~ N(0,w2^2) I run the filter through data recursively to

Re: [R] Installing R on Suse 11.1 , cannot figure it out

2009-10-07 Thread Cedrick W. Johnson
see below: Robert Wilkins wrote: Can't figure out how the install works, it is certainly not automatic. Also , the Install option on the R web site for Suse 11.1 does not work. And the install software native to Suse, cannot figure out. Does Suse have more problems installing software than

[R] To hell with OpenSuse, ditch it and go to Ubuntu

2009-10-07 Thread Robert Wilkins
this blog entry http://www.viggie.com/blog/software/opensuse-ubuntu-usage-experience , if credible , would seem to suggest that there is no good reason to choose Suse. I really don't have time for such nonsense, maybe I'll just reinstall as Ubuntu. Also, noticed that GCC was not installed when

Re: [R] Installing R on Suse 11.1 , cannot figure it out

2009-10-07 Thread Robert Wilkins
I believe i did last night: a cran site in Pittsburgh, with a Install link that I believe you are referring to, it just didnt work, unless you are referring to a different web site. The r site, eventually leads to a list of install choices ( download from different locations , such as michigan,

Re: [R] Simulate negative skewed, fat-tailed distribution

2009-10-07 Thread Kjetil Halvorsen
another possibility is to use skew-t distributions, from package: fGarch, for instance. Kjetil On Wed, Oct 7, 2009 at 1:13 PM, Ravi Varadhan rvarad...@jhmi.edu wrote: Take a look at the `rstable' function in the stable package to simulate random deviates from a stable distribution. Ravi.

  1   2   >