Re: [R] OT: algorithm for generating all possible combinations withreplacement

2005-11-25 Thread Ales Ziberna
Does this do what you want? n-10 k-5 expand.grid(rep(list(1:n),k)) However be carful, even this small example prouces matrix with10 rows. Best, Ales Ziberna - Original Message - From: Globe Trotter [EMAIL PROTECTED] To: [EMAIL PROTECTED]; r-help@stat.math.ethz.ch Sent: Friday,

Re: [R] Survreg Weibull lambda and p

2005-11-25 Thread Ales Ziberna
Re: [R] Survreg Weibull lambda and pYes, that is correct! Best, Ales Ziberna - Original Message - From: Stephen To: Ales Ziberna ; r-help@stat.math.ethz.ch Sent: Thursday, November 24, 2005 4:17 PM Subject: RE: [R] Survreg Weibull lambda and p Hi Ales, Sorry Mis-read

Re: [R] OT: algorithm for generating all possible combinations withreplacement

2005-11-25 Thread Peter Dalgaard
Ales Ziberna [EMAIL PROTECTED] writes: Does this do what you want? n-10 k-5 expand.grid(rep(list(1:n),k)) However be carful, even this small example prouces matrix with10 rows. I'm not sure this is what was wanted, since it is generating the same samples multiple times. Consider m -

[R] Tiger Mac stalls running Rcmdr program

2005-11-25 Thread Maha Golestaneh
I am a Macintosh computer (MAC OS X Version 10.4.3) user. I would like to run R for structural equation modeling and meta-analysis but am having difficulty using the Rcmdr interface. According to the R commander installation notes for Tiger Macs ­ I need to 1) Install X11.app from Apple Install

[R] Problems compiling R under AIX 4.3

2005-11-25 Thread hacker-24
Hi, I have problems compiling R 2.2.0 under AIX 4.3 with GCC and xlf95 (FORTRAN) Compilers. here the error message I got: make[1]: Entering directory `/home/mau/sy/R-2.2.0/src/modules/X11' make[1]: `Makedeps' is up to date. make[1]: Leaving directory `/home/mau/sy/R-2.2.0/src/modules/X11'

[R] multiple imputation of anova tables

2005-11-25 Thread Leo Gürtler
Dear list members, how can multiple imputation realized for anova tables in R? Concretely, how to combine F-values and R^2, R^2_adjusted from multiple imputations in R? Of course, the point estimates can be averaged, but how to get standarderrors for F-values/R^2 etc. in R? For linear models,

Re: [R] Chi-squared test

2005-11-25 Thread Ted Harding
On 25-Nov-05 Marc Schwartz wrote: On Thu, 2005-11-24 at 21:55 +, Ted Harding wrote: I'm rather with Peter on this question! I've tried to infer what you're really trying to do. My a-priori plausible hypothesis was that you have k-12 independent observations which have equal

[R] Generating all possible partitions

2005-11-25 Thread Ales Ziberna
Hellp! I would like to generate all possible partitions of length n with k clusters. It should be noted that the labels of the classes are irrelevant. Thanks for any suggestions! Best regards, Ales Ziberna __ R-help@stat.math.ethz.ch mailing

Re: [R] Chi-squared test

2005-11-25 Thread Bianca Vieru-Dimulescu
P Ehlers wrote: Marc Schwartz wrote: On Thu, 2005-11-24 at 21:55 +, Ted Harding wrote: On 24-Nov-05 P Ehlers wrote: Bianca Vieru- Dimulescu wrote: Hello, I'm trying to calculate a chi-squared test to see if my data are different from the theoretical distribution or not:

Re: [R] covariance analysis by using R

2005-11-25 Thread a . menicacci
Hi, Is anyone has solved MR Xin Meng problem (see below) ? We have the same analysis configuration : 10 groups (including control one) with 2 mesures for each (ref at t0 and response at t1). We expect to compare each group response with control response (group 1) using a multiple comparison

[R] Ordering problem

2005-11-25 Thread John Logsdon
I have an ordering and factor problem to which there must be a simple solution! The version is R 2.0.1 (2004-11-15) on A Linux platform. A data frame H is read in from a .csv file using read.csv with as.is=TRUE. Another data frame HN is constructed from data and I want to compare two columns

Re: [R] Ordering problem

2005-11-25 Thread Florence Combes
John, at ?factor, you can see : Be careful only to compare factors with the same set of levels (in the same order). In particular, 'as.numeric' applied to a factor is meaningless, and may happen by implicit coercion. To revert a factor 'f' to its original numeric values,

Re: [R] Ordering problem

2005-11-25 Thread Florence Combes
have also a look at ?is.ordered, it may be more useful than my previous mail. florence. On 11/25/05, John Logsdon [EMAIL PROTECTED] wrote: I have an ordering and factor problem to which there must be a simple solution! The version is R 2.0.1 (2004-11-15) on A Linux platform. A data frame

Re: [R] model selection with step function

2005-11-25 Thread Antonio Olinto
Dear Ehlers, thanks for your message. Following the example on stepAIC and Venebles Ripley’s book, it seems that update rearranges the terms. I didn’t understand how to indicate the formula in the function. I have the initial model U ~ var1+var2+var3+var4 (family Gaussian). I want first to

Re: [R] Survreg Weibull lambda and p

2005-11-25 Thread Stephen
Thanks Ales, Best wishes Stephen. From: Ales Ziberna [mailto:[EMAIL PROTECTED] Sent: Fri 25/11/2005 10:05 To: Stephen; r-help@stat.math.ethz.ch Subject: Re: [R] Survreg Weibull lambda and p Yes, that is correct! Best, Ales Ziberna - Original

[R] wavethresh addon package LS2W

2005-11-25 Thread Koen Hufkens
Hi list, I've been trying to install the LS2W package in R. It's originally a S+plus package so things don't work out as planned. Has anyone succesfully installed this package in R (2.2.0)? Cheers, Koen __ R-help@stat.math.ethz.ch mailing list

Re: [R] Ordering problem

2005-11-25 Thread John Logsdon
Thanks to Florence but it needs a little modification. However as I have now discovered the str() command, things are looking up.:)) I have a character matrix so I() just leaves it as characters whereas I want the various columns to be integers or whatever they contain. To take Florence's

Re: [R] Tiger Mac stalls running Rcmdr program

2005-11-25 Thread John Fox
Dear Maha, I'm not a Mac user, so can't offer much help, since you appear to have followed the Mac installation notes. (Rick: I'm copying this reply to you in case you didn't see Maha's message on r-help.) I'm writing primarily to make sure that you know that the Rcmdr doesn't support either

Re: [R] Ordering problem

2005-11-25 Thread Dimitris Rizopoulos
another posibility would be to use something like: v1 - c(1, 2, 3); v2 - c(a, b, c); v3 - c(1, 2, 3) dat - data.frame(v1, v2, v3) 3 dat - lapply(dat, as.character) dat - as.data.frame(lapply(dat, type.convert)) dat sapply(dat, data.class) I hope it helps. Best, Dimitris

[R] optim

2005-11-25 Thread Adrienne Gret-Regamey
Hello: I am trying to use optim() to estimate the maximum likelihood of a function a*x^b = y. Unfortunately, I always get the error, that there is no default value for b. Could you give me an example, on how to correctly optimize this function with input data x-c(1,3,11,14). Thanks a lot,

Re: [R] Problems compiling R under AIX 4.3

2005-11-25 Thread Prof Brian Ripley
On Fri, 25 Nov 2005 [EMAIL PROTECTED] wrote: Hi, I have problems compiling R 2.2.0 under AIX 4.3 with GCC and xlf95 (FORTRAN) Compilers. Did you check out the R-admin manual? That suggests you need SHLIB_LDFLAGS=-Wl,-G which you do not seem to have. Note also the report there that you

Re: [R] optim

2005-11-25 Thread Sundar Dorai-Raj
Adrienne Gret-Regamey wrote: Hello: I am trying to use optim() to estimate the maximum likelihood of a function a*x^b = y. Unfortunately, I always get the error, that there is no default value for b. Could you give me an example, on how to correctly optimize this function with input

[R] Use of nesting in lmer- error in numerical expression

2005-11-25 Thread Arild Husby
Dear R users, I am trying to fit a GLMM using lmer to a dataset where the brood identity (LNRREIR) is nested within mothers identity. The reason for this is that each mother can have several nests within each year and also between years. I am running the following script (actually I

Re: [R] model selection with step function

2005-11-25 Thread P Ehlers
Antonio, Antonio Olinto wrote: Dear Ehlers, thanks for your message. Following the example on stepAIC and Venebles Ripley’s book, it seems that update rearranges the terms. I didn’t understand how to indicate the formula in the function. I have the initial model U ~

Re: [R] residuals in logistic regression model

2005-11-25 Thread P Ehlers
Urania, I'm not very fond of putting additive residuals on the righthand side. This practice tends to obscure the fact that we're fitting a conditional mean function: E(Y|x) = function(x; parameters) We then need to assess the model fit and uncertainties of parameter estimates. We may want to

Re: [R] Tiger Mac stalls running Rcmdr program

2005-11-25 Thread Rob J Goedman
Hi Maha, Can you provide me with a bit more info? No need to copy the R Help Mailing List for now. Can you let me know: 1) When you start X11, does the X11 window popup (which I usually close immediately)? 2) Can you load library(car) from the R console? 3) Does the Rcmdr window pops up? 4)

[R] Generating all possible partitions

2005-11-25 Thread Ales Ziberna
I have posed this question earlier, however it has probably not been clear enough. My problem is such. I would like to find all possible partitions of a set of n objects into k groups. The ordering of the groups does not matter, only which objects are together matters. For example, there

[R] problems with dynamic objects on solaris

2005-11-25 Thread Ott Toomet
Dear R people, I am working on a solaris 9 workstation with very restrictive access policy. It means I have still to use R 1.7.1 and gcc 2.95. The problems is following: I have written a small function in c++ using boost library and I want to dyn.load the resulting .so file into R. Compilation

Re: [R] problems with dynamic objects on solaris

2005-11-25 Thread Prof Brian Ripley
On Fri, 25 Nov 2005, Ott Toomet wrote: Dear R people, I am working on a solaris 9 workstation with very restrictive access policy. It means I have still to use R 1.7.1 and gcc 2.95. Headers that long ago were not AFAIR written for C++, so ensure you used extern C {} when including them.

[R] vector memory exhausted (limit reached?) error message while loading saved workspace

2005-11-25 Thread t c
I am running R 2.2.0 in a Windows XP environment. During my previous r session, I saved my workspace as “20051123b.Rdata”. (On disk, it is ~1.25 gb.) I have launched R. (I have the following in my application shortcut --max-mem-size=4000M, and although it may not be necessary, I have also

Re: [R] Generating all possible partitions

2005-11-25 Thread Gabor Grothendieck
Probably not very fast but the number of partitions of a number, also known as the Bell number, grows pretty dramatically so you won't be able to use it for large numbers even with an efficient implementation (though you could use it for larger numbers than the solution here). The main attribute

[R] rescale x-axis

2005-11-25 Thread singyee ling
Dear all, I am trying to draw a survival curve with probability of surviving as the y-axis and days (0- 500 days )as the x-axis. however, i do not want the days to be equally spaced on the x-axis as i am more interested in looking at the behaviour of the curve in the first 50 days. I am reluctant

Re: [R] finding peaks in a simple dataset with R

2005-11-25 Thread Martin Maechler
Let me try to summarize my view on this: - I still it would make sense to have a *simple* peaks() function in R which provides the same (or more) functionality as the corresponding S-plus one.From For a proper data analysis situation, I think one would have to do something more

[R] read.table without sep

2005-11-25 Thread Vasundhara Akkineni
Hello all, I have a data file table.txt which i have attached. I am trying to pass the columns as arguments to a function totnorm where i am displaying a total normalization plot. The function is given below:

Re: [R] Generating all possible partitions

2005-11-25 Thread Gabor Grothendieck
Just some clarification. The answer I gave before is interpreted like this: 3 0 0 means the partition of 3 into 3+0+0, 2 1 0 means the partition of 3 into 2+1+0 and 1 1 1 means the partition of 3 into 1+1+1. As pointed out to me privately you asked for only those partitions that correspond to

Re: [R] Generating all possible partitions

2005-11-25 Thread Ravi Varadhan
Isn't Bell number different from the number of partitions, P_n, of a number, n? Bell number, B_n, is the number of subsets into which a set with n elements can be divided. So, B_3 = 5, and B_4 = 15, whereas P_3 = 3, and P_4 = 5. Bell numbers grow much more rapidly than the number of partitions.

Re: [R] Generating all possible partitions

2005-11-25 Thread Gabor Grothendieck
Yes, I just checked on Wikipedia and its as you say. On 11/25/05, Ravi Varadhan [EMAIL PROTECTED] wrote: Isn't Bell number different from the number of partitions, P_n, of a number, n? Bell number, B_n, is the number of subsets into which a set with n elements can be divided. So, B_3 = 5,

Re: [R] read.table without sep

2005-11-25 Thread P Ehlers
Vasu, You have a lot of problems here. 1. How was your file generated? Excel? You have trailing tabs on all but row 1 which is why your read.table call with sep=\t gives you columns that don't seem to agree with what you expect. See the argument row.names in ?read.table. 2. It's never a good

Re: [R] read.list()

2005-11-25 Thread Mike Prager
Your question is not quite clear. Do you mean write and read an R list object to a file? If so, one method is provided by dget() and dput() on 11/24/2005 12:16 PM Leaf Sun said the following: I need to write and read a list in R. I did r.site.search, found there is a package rmutil doing

[R] glmmPQL

2005-11-25 Thread jmgreyes
Hi, My name is José María Gómez, and I am pretty new in R. Thus, I apologize deeply if my questions are extremmely naïve.I have checked several available books and URL's, without finding any answer. I'm trying to fit Generalized Linear Mixed Models via PQL. Below I provide the structure of my

[R] Plotting the diff. between two curves

2005-11-25 Thread Prasanna
Dear Rs I have two vectors A and B where A is V1d 1 0.00010 1.123278 2 0.002186431 1.120448 3 0.004351214 1.106661 4 0.006515998 1.107713 5 0.008680781 1.107667 6 0.013010348 1.106353 7 0.019504698 1.104077 8 0.034658181 1.103202 9 0.051976447 1.103200 10

Re: [R] Plotting the diff. between two curves

2005-11-25 Thread Gabor Grothendieck
Using the zoo package you can merge the curves together and use na.approx to fill in the blanks. Assuming that the first column in each instance is the x variable: library(zoo) Az - zoo(A[,2], A[,1]) Bz - zoo(B[,2], B[,1]) Cz - na.approx(merge(Az, Bz)) plot(Cz[,1] - Cz[,2]) On 11/25/05,

Re: [R] Plotting the diff. between two curves

2005-11-25 Thread Prasanna
Thanks for your replies, Jim and Gabor: Jim: The x-axis is going to be in log scale. Basically I am comparing two algorithms. One is very quick and another one is slow. X axis denotes time and y axis is a normalized solution quality. I hope it is clear now if not then let me know Gabor: I am

Re: [R] Plotting the diff. between two curves

2005-11-25 Thread Gabor Grothendieck
In that case you will need to modify the last line to be: plot(time(Cz), coredata(Cz[,1] - Cz[,2]), log = x, type = l) On 11/25/05, Prasanna [EMAIL PROTECTED] wrote: Thanks for your replies, Jim and Gabor: Jim: The x-axis is going to be in log scale. Basically I am comparing two

Re: [R] Plotting the diff. between two curves

2005-11-25 Thread Prasanna
Gabor: The zoo lib. works perfectly for my problem. Thanks On 11/26/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: In that case you will need to modify the last line to be: plot(time(Cz), coredata(Cz[,1] - Cz[,2]), log = x, type = l) On 11/25/05, Prasanna [EMAIL PROTECTED] wrote: Thanks

[R] How can I get the difference seq directly?

2005-11-25 Thread 广星
Hi, R-help, let x-rnorm(1000), now I want to get a sequence y,which is satisfied with as follow: y[1]-x[2]-x[1] y[2]-x[3]-x[2] y[999]-x[1000]-x[999] Is there a function in R could achieve this requirement directly? Thank you in advance! 致 礼!

Re: [R] How can I get the difference seq directly?

2005-11-25 Thread Sundar Dorai-Raj
?diff y - diff(x) HTH, --sundar 广星 wrote: Hi, R-help, let x-rnorm(1000), now I want to get a sequence y,which is satisfied with as follow: y[1]-x[2]-x[1] y[2]-x[3]-x[2] y[999]-x[1000]-x[999] Is there a function in R could achieve this requirement directly? Thank you in

Re: [R] How can I get the difference seq directly?

2005-11-25 Thread 广星
Thank you very much. I have tried as follow: y-x[2:length[x]]-x[1:(length[x]-1)] apparently, it is not better than the diff. Thank you again. === 2005-11-26 12:19:32 您在来信中写道:=== ?diff y - diff(x) HTH, --sundar 广星 wrote: Hi, R-help, let x-rnorm(1000), now I want to get a sequence

[R] correspondence analysis and canonical correspondence analysis in R

2005-11-25 Thread Jan de Leeuw
http://www.cuddyvalley.org/psychoR/code now contains version 1.4 of ca.R There are already many versions of CA and CCA in various R packages, but this one has some unique features, so maybe it is useful. The function ca() can do simple CA, but it also allows for linear restrictions on the row

Re: [R] covariance analysis by using R

2005-11-25 Thread Charles Annis, P.E.
An informal assessment may be useful: PLOT THE DATA. x y experiment 0.1 0.5 A 0.2 0.6 A 0.3 0.6 A 0.4 0.7 A 0.5 0.9 A 1 3 B 2 4 B 3 6.5 B 4 7.5 B 5 11 B 10 18 C 20 35 C