Re: [R] re peat(?) measurement ANOVA or (general? mixed?) linear model?

2009-10-07 Thread Dieter Menne
Wolfgang Waser wrote: > > I subjected each of about 50 critters (about 10 each in 5 distinct > populations) to 4 consecutive treatments (exposure to increasing > concentrations), with one measurement per treatment and individual. > > ... > Since I'm dealing with 'paired' data, and also with

[R] predict.lm() out-of-sample predictions - problem with data classes

2009-10-07 Thread Gero Schwenk
Hello! I'm still working on my problem, which also occurs with the predict.lm() function. - Providing newdata, which is a data.frame with all variables being "numeric", as str() shows, R tells me the following: ar1.xpred.test.pred <- predict(ar1.xpred.fitted, regdata.test, se.fit = FALSE) Feh

Re: [R] [R-SIG-Finance] Evaluating/comparing dynamic linear model

2009-10-07 Thread Erb Philipp (erbp)
What kind of filter are you using? Since your models are expressed in state space form I suggest that you fit your models by maximizing the log likelihood function of the Kalman filter output (see e.g. FKF-package). Using the obtained log likelihood values you might perform a likelihood ratio te

Re: [R] Colouring a grid segment

2009-10-07 Thread Jim Lemon
On 10/08/2009 01:15 PM, darrenh65 wrote: Hi, I am attempting to create a polar chart (using plotrix polar.plt) and I need to colour a segment of the grid to indicate an area of interest, say from 90-120 degrees, for arguments sake. Is this possible? I can colour the whole grid by passing the grid

Re: [R] how do I name data frames and files according to the index of a for loop?

2009-10-07 Thread Dieter Menne
Ken Ervin wrote: > > > for (i in 1:2858) { > ... > write.table(Data_frame_name,file="~/file/goes/here.csv", append > = FALSE, sep = "\t",row.names = FALSE, col.names = c("Calc_1", "Calc_2", > "Calc_3"),qmethod = "double") > > } > > > use something like filename = paste("~/fi

Re: [R] Parameters of Beta distribution

2009-10-07 Thread Maithili Shiva
Dear Albyn,   Thanks for your reply.   Yes "A" and "B" are unknown. I was just thinking to assign -   A = min(amounts) and B = max(amounts).   The actual loss data I am dealing with is large. I am trying to fit some statistical distributions to this data. I already have done with R code pertaini

[R] how do I name data frames and files according to the index of a for loop?

2009-10-07 Thread Ken Ervin
Thanks in advance for reading my question. This is my first time working with R, though I have some intro-level experience with other languages. I am writing a program that performs a certain set of calculations on each row of a list of data, and here's what I have so far: for (i in 1:2858) {

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

2009-10-07 Thread gcheer3
sorry for y y=rnorm(20,mean= rep(th[1:2],10),sd=th[3]) th=c(0, 0.5, 1) gcheer3 wrote: > > Thanks for your reply. > > But I don't think it will really help. My problem is as follows: > > I have 20 observations > y <- rnorm(N,mean= rep(th[1:2],N/2),sd=th[3]) > > I have a loglikelihood functi

[R] foreach loop - rejection method

2009-10-07 Thread dunno87
Hi Everybody, Thanks in advance for your help. This is my first time using the foreach statement and I cant get it to work properly so here is what i have test<-function(){ repeat { cand2[l-1]<-rinvgamma(1,phi,lambda[l-1]) q2<-dinvgamma(cand2[l-1],phi,lambda[l-1]) p2<-cand2[l-1]^-1.5*exp(-y[l]^2

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

2009-10-07 Thread gcheer3
Thanks for your reply. But I don't think it will really help. My problem is as follows: I have 20 observations y <- rnorm(N,mean= rep(th[1:2],N/2),sd=th[3]) I have a loglikelihood function for 3 variables mu<-(mu1,mu2) and sig loglike <- function(mu,sig){ temp<-rep(0,length(y))

Re: [R] R user defined language file for NotePad++

2009-10-07 Thread Gabor Grothendieck
Check out: http://sourceforge.net/projects/npptor/ On Wed, Oct 7, 2009 at 11:04 PM, Jason Rupert wrote: > I am a big fan of NotePad++ > (http://notepad-plus.sourceforge.net/uk/site.htm), which allows users to > develop an XML schema that allows NotePad++ to be more Language aware.  Thus, > I'm

[R] R user defined language file for NotePad++

2009-10-07 Thread Jason Rupert
I am a big fan of NotePad++ (http://notepad-plus.sourceforge.net/uk/site.htm), which allows users to develop an XML schema that allows NotePad++ to be more Language aware. Thus, I'm curious if there are any R users out there that may have developed the XML user defined language for NotePad++.

[R] Robust estimation references

2009-10-07 Thread Peng Yu
Hi, Can somebody help recommend some good introductory textbooks on robust estimation (graduate school level)? I found this one, but the reviews on this are quite diverse. http://www.amazon.com/Introduction-Estimation-Hypothesis-Statistical-Modeling/dp/0127515429/ref=sr_1_1?ie=UTF8&s=books&qid=1

[R] Colouring a grid segment

2009-10-07 Thread darrenh65
Hi, I am attempting to create a polar chart (using plotrix polar.plt) and I need to colour a segment of the grid to indicate an area of interest, say from 90-120 degrees, for arguments sake. Is this possible? I can colour the whole grid by passing the grid.bg parameter through to radial.plot but I

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 wrote: > Take a look at the `rstable' function in the "stable" package to simulate > random deviates from a stable distribution. > > Ravi. > >

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, p

[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 S

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 Fe

[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 obtain

[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] 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? Th

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

[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: > names(merged)<-c("GRIDCODE",paste("VALUE",0

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 wrote: > > > > Dea

Re: [R] graphics

2009-10-07 Thread Sarah Goslee
Hello, On Wed, Oct 7, 2009 at 2:01 PM, McDonald, Grant 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 appreciated. Like this: p

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 log

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 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

[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

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 O

[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

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 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 panel.average/line

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 selectio

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

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 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 <- facto

[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 wrote: > Have you tried the rjags package which uses the jags system? It

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 bbml

[R] help with ncdf package

2009-10-07 Thread advaitgodbole
Hello, I have been trying to read in a variable from a netCDF file. It has - as a "missing value". When I read in the file using open.ncdf, the missing values are set to 1e+30 (probably the default in R). I tried different approaches; using the syntax from the ncdf documentation and from a UC

[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

[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: http://www.nabble.com/cforest-regressions---mean-of-squared-residuals-tp25

[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 imp

[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: http://ww

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" pow

[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

[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 parame

[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:

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: http://search.r-project.org/cgi-bin/namazu.cgi?query=arrows&max=100

[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 ideally

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 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/pr

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)

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: > Res

[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]] _

[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] repeat(?) measurement ANOVA or (general? mixed?) linear model?

2009-10-07 Thread Wolfgang Waser
Hi all, after browsing the archives for hours I'm still not sure about the proper analysis for my dataset. I subjected each of about 50 critters (about 10 each in 5 distinct populations) to 4 consecutive treatments (exposure to increasing concentrations), with one measurement per treatment and

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 State

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

[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 m

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. >

[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

[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.*.

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 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 data comin

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

2009-10-07 Thread Stephen Eglen
Frank Liu 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 feel free t

[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 region

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 R2Wi

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 sess

[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.7

[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 s

[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 suggest

Re: [R] Parameters of Beta distribution

2009-10-07 Thread JLucke
Rescale your data x to (x-A)/(B-A). Maithili Shiva 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 <- c(46839.50,31177.12,35696.69,21192.57,

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 cod

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 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 with

[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 polsplin

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(a>b, a==b, b>a) 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

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] 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] 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 firs

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 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 processing. There > are th

[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 wrote: > Hi > > Rainer M Krug napsal dne 07.10.2009 12:40:39: > > > > > > On Wed, Oct 7, 2009 at 12:26 PM, Petr PIKAL > wrote: > > Hi > > > > Rainer M Krug napsal dne 07.10.2009 12:09:21: > > > > > > > > > > > > In the meantime, what about > > > > x

[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 th

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

2009-10-07 Thread Petr PIKAL
Hi Rainer M Krug napsal dne 07.10.2009 12:40:39: > > On Wed, Oct 7, 2009 at 12:26 PM, Petr PIKAL wrote: > Hi > > Rainer M Krug napsal dne 07.10.2009 12:09:21: > > > > > In the meantime, what about > > x <- rnorm(200) > hist(x, col = "blue", freq = TRUE) > ddd<-density(x) > lines(ddd$

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 Rainer M Krug
On Wed, Oct 7, 2009 at 12:26 PM, Petr PIKAL wrote: > Hi > > Rainer M Krug napsal dne 07.10.2009 12:09:21: > > > > > > On Wed, Oct 7, 2009 at 11:53 AM, Petr PIKAL > 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 > >

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 a>b, b>a and a=b to show just the number of occurances? at the moment when I type a>b I get a nice long lis

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

2009-10-07 Thread Petr PIKAL
Hi Rainer M Krug napsal dne 07.10.2009 12:09:21: > > On Wed, Oct 7, 2009 at 11:53 AM, Petr PIKAL 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 > wrote: > > > > > Hi > > > > > > Try ?twoord.plot from plotrix package.

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",

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 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 > wrote: > > > > > Hi > > > > > > Try ?twoord.plot from plotrix package. > > > > > > > > Thanks Petr - I was not aeware of this comm

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 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

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 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 estimate (easier to di

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] 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: https://stat.ethz.ch/mailman/listinfo/

[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

[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] 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 t

[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 yo

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

[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 :

[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 n

  1   2   >