Re: [R] clustering

2006-02-28 Thread Petr Pikal
Did you try to use help.search() on your topics? Help files with alias or concept or title matching 'SOM' using regular expression matching: any(base) Are Some Values True? SOM(class) Self-Organizing Maps: Online Algorithm

Re: [R] about clustering method

2006-02-28 Thread Friedrich . Leisch
On Mon, 27 Feb 2006 11:09:24 -0800, Linda Lei (LL) wrote: Hi there, I'm doing some clustering analysis and try to find all the algorithms related to clustering in R. Here is the list of the algorithms I found. But I'm not sure if It's the complete list. Could you please check

Re: [R] Question about Sweave

2006-02-28 Thread Friedrich . Leisch
On Mon, 27 Feb 2006 11:34:00 -0800, Elizabeth Purdom (EP) wrote: Hi, I'm not sure if Sweave questions should go to the general list, but it seems to be part of the core R package without a separate maintainer. I am writing a tutorial for R in a latex file. I'd like to use Sweave,

Re: [R] question about Principal Component Analysis in R?

2006-02-28 Thread Bjørn-Helge Mevik
Michael wrote: pca=prcomp(training_data, center=TRUE, scale=FALSE, retx=TRUE); Then I want to rotate the test data set using the d1=scale(test_data, center=TRUE, scale=FALSE) %*% pca$rotation; d2=predict(pca, test_data, center=TRUE, scale=FALSE); these two values are different

[R] does svm have a CV to obtain the best cost parameter?

2006-02-28 Thread Michael
Hi all, I am using the svm command in the e1071 package. Does it have an automatic way of setting the cost parameter? I changed a few values for the cost parameter but I hope there is a systematic way of obtaining the best cost value. I noticed that there is a cross (Cross validation)

Re: [R] how to use the basis matrix of ns in R? really confused by multi-dim spline filtering?

2006-02-28 Thread Michael
Thanks a lot! I happened to have read Professor Harrell's book before I post. It did not have any detailed examples/guides about using splines in R, esp. multiple dimensions... I am in need of hands on examples of putting theories into reality in R... On 2/27/06, Liaw, Andy [EMAIL PROTECTED]

[R] LaTeX in R graph

2006-02-28 Thread depire
Hello, I would like to know if it is possible to insert LaTeX typesetting in R output. I want to obtain a graph with LaTeX label in order to incorporate it as postscript or pdf, x-seq(0,1,length=100) y-x*x plot(x,y,xlab=$X$,ylab=$X^2$) __

[R] lines() and recycled colours

2006-02-28 Thread Robin Hankin
Hi ?lines says For 'type = h', 'col' can be a vector and will be recycled as needed. Why doesn't lines() recycle colours for other types? If I type plot(0:1,0:1,type=n) lines(runif(11),runif(11),col=c(red,green)) then all ten lines are red, with no warning given. Is

Re: [R] elements in each row of a matrix to the left.

2006-02-28 Thread john.gavin
Hi Patrick/Jeff, Does t(apply(z, 1, sort, na.last=TRUE)) do what you want? Not quite. t(apply(z, 1, sort, na.last=TRUE)) [,1] [,2] [,3] [1,]11 NA [2,]11 NA [3,]11 NA [4,]1 NA NA [5,]1 NA NA [6,] NA NA NA Row 2 is the problem. I

Re: [R] LaTeX in R graph

2006-02-28 Thread Dietrich Trenkler
[EMAIL PROTECTED] schrieb: Hello, I would like to know if it is possible to insert LaTeX typesetting in R output. I want to obtain a graph with LaTeX label in order to incorporate it as postscript or pdf, x-seq(0,1,length=100) y-x*x plot(x,y,xlab=$X$,ylab=$X^2$)

Re: [R] lines() and recycled colours

2006-02-28 Thread michael watson \(IAH-C\)
Hi Lines behaves as the help() says it does: plot(0:1,0:1,type=n) lines(runif(11),runif(11),col=c(red,green), type=h) Mick -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robin Hankin Sent: 28 February 2006 09:31 To: RHelp Subject: [R] lines() and

Re: [R] LaTeX in R graph

2006-02-28 Thread Romain Francois
Le 28.02.2006 10:27, [EMAIL PROTECTED] a écrit : Hello, I would like to know if it is possible to insert LaTeX typesetting in R output. I want to obtain a graph with LaTeX label in order to incorporate it as postscript or pdf, x-seq(0,1,length=100) y-x*x plot(x,y,xlab=$X$,ylab=$X^2$)

Re: [R] lines() and recycled colours

2006-02-28 Thread Petr Pikal
Hi not sure as I do not know actual syntax, but seems to me that in type=h there segments are drawn from x axis to x,y values, hence the recycling behaviour has some sense. In other types I wonder if it was really useful to have each segment of a line painted by different colour. If this is a

[R] creating dendrogram from cluster hierarchy

2006-02-28 Thread Timo Becker
Dear R users, I have created data for hierarchical agglomerative cluster analysis which consist of the merging pairs and the agglomeration heights, e.g. something like my.merge - matrix(c(-1,-2,-3,1), ncol=2, byrow=TRUE) my.height - c(0.5, 1) I'd like to plot a corresponding dendrogram but I

Re: [R] 4D stacked column chart, Excel - R

2006-02-28 Thread waeltlmi
Hi, thanks for your help. that is the task though, I don't have the choice and I think for our purpose it is very good. I don't want to have a look at the exact numbers, I just want to find and see bigger columns in higher km regions immediately. Then the date of this cases is interesting.

[R] ex-Gaussian survival distribution

2006-02-28 Thread Jonathan Williams
Dear R-Helpers, I am hoping to perform survival analyses using the ex-Gaussian distribution. I understand that the ex-Gaussian is a convolution of exponential and Gaussian distributions for survival data. I checked the survreg.distributions help and saw that it is possible to mix pre-defined

Re: [R] creating dendrogram from cluster hierarchy

2006-02-28 Thread Martin Maechler
Timo == Timo Becker [EMAIL PROTECTED] on Tue, 28 Feb 2006 11:01:26 +0100 writes: Timo Dear R users, I have created data for hierarchical Timo agglomerative cluster analysis which consist of the Timo merging pairs and the agglomeration heights, e.g. Timo something like

Re: [R] elements in each row of a matrix to the left.

2006-02-28 Thread Petr Pikal
Hi not a complete solution but z.f-matrix(z%in%1, ncol=3) gives you a matrix of logicals and apply(apply(z.f*1, 1,cumsum),2,function(x) sum(x==0)) [1] 0 0 1 2 1 3 shall give you number of values to drop from each row. Then you maybe could use it to manipulate your z matrix. HTH Petr On

Re: [R] elements in each row of a matrix to the left.

2006-02-28 Thread Patrick Burns
Okay, I think this does the requested operation: single.shift function (x) { r - rle(is.na(x)) if(!r$values[1]) return(x) num - r$length[1] c(x[-1:-num], rep(NA, num)) } t(apply(z, 1, single.shift)) [EMAIL PROTECTED] wrote: Hi Patrick/Jeff, Does

[R] Illegal Instruction

2006-02-28 Thread David Pleydell
I am running Debian Etch on a dual Xeon 64 bit Dell Precision with the latest versions of R and RandomFields. I am unable to run the first example in ?GaussRF (in RandomFields). The bug occurs when GaussRF runs the line error - InitSimulateRF(x = x, y = y, z = z, T = T, grid = grid, model =

[R] Re Illegal Instrunction

2006-02-28 Thread David Pleydell
OK I found the problem. locate libblas.so.3 showed there were two such files, one in /usr/lib/, the other in /usr/lib/atlas/ removing the atlas installation cured the bug. Not sure what I should do if I later find that I need atlas for some reason. cheers David

[R] obtaining means/SD after fitting a mixed model

2006-02-28 Thread Pablo Inchausti
Hello, I am dealing (non-balanced) mixed models (using libraries lme4 and MASS) such as : model1-glmmPQL(Y~grouping variable+ covariate, random=~1|yr/month, data=dat, family= gaussian or poisson) Besides the usual output in terms of the statistical significance of the fitted coefficients, I'd

Re: [R] elements in each row of a matrix to the left.

2006-02-28 Thread john.gavin
Hi Patrick, Yes, that works. Thanks for your time. Regards, John. -Original Message- From: Patrick Burns [mailto:[EMAIL PROTECTED] Sent: 28 February 2006 10:28 To: Gavin, John Cc: [EMAIL PROTECTED]; r-help@stat.math.ethz.ch Subject: Re: [R] elements in each row of a matrix to the

Re: [R] does svm have a CV to obtain the best cost parameter?

2006-02-28 Thread Liaw, Andy
From: Michael Hi all, I am using the svm command in the e1071 package. Does it have an automatic way of setting the cost parameter? See ?best.svm in that package. I changed a few values for the cost parameter but I hope there is a systematic way of obtaining the best cost value. I

Re: [R] prepared query with RODBC ?

2006-02-28 Thread Uwe Ligges
On Mon, 27 Feb 2006, Laurent Gautier wrote: Dear List, Would anyone know how to perform prepared queries with ROBC ? I had a shot with some of the internal (non-exported) functions of the package but ended up with a segfault, so I prefer asking around before experimenting further...

Re: [R] relative referencing for filenames etc

2006-02-28 Thread Uwe Ligges
On Mon, 27 Feb 2006, Greg Tarpinian wrote: BACKGROUND: I use SAS on a daily basis and one of its most powerful features in a production environment is the use of LIBNAME and FILEREF statements, e.g.: PROC PRINTTO LOG = LOGDIR.\data processing.log NEW; RUN; PROC IMPORT

[R] How to do it without for loops?

2006-02-28 Thread ronggui
This is the code: x-matrix(rnorm(20),5) y-list() for (i in seq(nrow(x))) y[[i]]-t(x[i,,drop=F])%*%x[i,,drop=F] y[[1]]+y[[2]]+y[[3]]+y[[4]]+y[[5]] How can I do it without using for loops? Thank you in advance! -- ronggui Deparment of Sociology Fudan University

Re: [R] creating dendrogram from cluster hierarchy

2006-02-28 Thread Timo Becker
Martin Maechler schrieb: Timo == Timo Becker [EMAIL PROTECTED] on Tue, 28 Feb 2006 11:01:26 +0100 writes: Timo Dear R users, I have created data for hierarchical Timo agglomerative cluster analysis which consist of the Timo merging pairs and the agglomeration

Re: [R] Re Illegal Instrunction

2006-02-28 Thread Prof Brian Ripley
This is a Debian issue, not an R issue. Almost certainly you are running an ATLAS tuned on a machine other than your own. ATLAS is designed to be tuned on the target machine, which is easy to do if you install it from the sources. Debian provides pre-built versions, but these need to be

Re: [R] relative referencing for filenames etc

2006-02-28 Thread Prof Brian Ripley
On Tue, 28 Feb 2006, Uwe Ligges wrote: On Mon, 27 Feb 2006, Greg Tarpinian wrote: BACKGROUND: I use SAS on a daily basis and one of its most powerful features in a production environment is the use of LIBNAME and FILEREF statements, e.g.: PROC PRINTTO LOG = LOGDIR.\data processing.log

Re: [R] How to do it without for loops?

2006-02-28 Thread TEMPL Matthias
Hello, One solution is: lapply(1:nrow(x), function(i){ t(x[i,,drop=FALSE]) %*% x[i,,drop=FALSE] }) Best, Matthias This is the code: x-matrix(rnorm(20),5) y-list() for (i in seq(nrow(x))) y[[i]]-t(x[i,,drop=F])%*%x[i,,drop=F] y[[1]]+y[[2]]+y[[3]]+y[[4]]+y[[5]] How can I do it

Re: [R] How to do it without for loops?

2006-02-28 Thread Uwe Ligges
On Tue, 28 Feb 2006, ronggui wrote: This is the code: x-matrix(rnorm(20),5) y-list() for (i in seq(nrow(x))) y[[i]]-t(x[i,,drop=F])%*%x[i,,drop=F] y[[1]]+y[[2]]+y[[3]]+y[[4]]+y[[5]] How can I do it without using for loops? crossprod(x) Uwe Ligges Thank you in advance! --

Re: [R] Different deviance residuals in a (similar?!?) glm example

2006-02-28 Thread Prof Brian Ripley
This is a Poisson regression. You cannot just multiply counts by 10 and have a valid sample from a Poisson distribution with 10x the mean. So the example (and the calculations below) make zero statistical sense. For a poisson() family, $dev.resids function (y, mu, wt) 2 * wt * (y *

Re: [R] How to do it without for loops?

2006-02-28 Thread Gabor Grothendieck
Try: crossprod(x) or t(x) %*% x On 2/28/06, ronggui [EMAIL PROTECTED] wrote: This is the code: x-matrix(rnorm(20),5) y-list() for (i in seq(nrow(x))) y[[i]]-t(x[i,,drop=F])%*%x[i,,drop=F] y[[1]]+y[[2]]+y[[3]]+y[[4]]+y[[5]] How can I do it without using for loops? Thank you in advance!

[R] Binary Package RMySQL Windows available ?

2006-02-28 Thread Hansruedi Baetschmann
Is there a precompiled version of the package RMySQL for Windows available anywhere ? Best thanks for help ! Hansruedi _ Hansruedi Baetschmann dipl.math.ETH et lic.oec.HSG Functional Genomics Center Zurich Winterthurerstrasse 190 / Y32H06 CH-8057 Zürich Tel :

Re: [R] Binary Package RMySQL Windows available ?

2006-02-28 Thread Prof Brian Ripley
Yes. See http://cran.r-project.org/bin/windows/contrib/2.2/ReadMe However, we have found that it is often necessary to have almost exactly the same version of MySQL as used to build the binary, so you may e.g. only be able to use the binary there with R 2.2.1 and MySQL 5.0.x and not e.g.

[R] Spearman correlation confidence interval

2006-02-28 Thread McGehee, Robert
R-help(ers), Does anyone know of an R function available for calculating a confidence interval for a Spearman correlation? If no such resource is available, is using the confidence interval from a Pearson correlation a reasonable proxy if the vectors come from normal distributions (i.e. likely

Re: [R] Spearman correlation confidence interval

2006-02-28 Thread Gabor Grothendieck
You could use a bootstrapped confidence interval. You can find R code examples of using bootstrapped confidence intervals for correlation coefficients (and also an example of the alternative Fisher Transform) in the proto vignette: library(proto) vignette(proto) # see 3.2 On 2/28/06, McGehee,

[R] Stepwise with AICc

2006-02-28 Thread flavio . zanini
Hi, I would like to uses AIC.c criterion in stepwise selection. I found some comments about this issue in R help archives, and it seems that no standard scripts are available. Except from www.prodsyse.com (stepAIC.c), but, unfortunately, demanding adaptations for R. Suggestions on this will be

[R] vector math: calculating a rolling 12 row product?

2006-02-28 Thread r user
I have a dataframe of numeric values with 30 “rows” and 7 “columns”. For each column, beginning at “row” 12 and down to “row” 30, I wish to calculate the “rolling 12 row product”. I.e., within each column, I wish to multiply all the values in row 1:12, 2:13,…19:30. I wish to save the results as

Re: [R] vector math: calculating a rolling 12 row product?

2006-02-28 Thread Chuck Cleland
How about applying cumprod to the columns and then subsetting the result? apply(mydata, 2, cumprod)[12:30,] ?cumprod r user wrote: I have a dataframe of numeric values with 30 “rows” and 7 “columns”. For each column, beginning at “row” 12 and down to “row” 30, I wish to calculate the

Re: [R] vector math: calculating a rolling 12 row product?

2006-02-28 Thread Gabor Grothendieck
Use as.matrix to convert your data frame to a matrix and suppose we have this test data as a matrix: mat - matrix(seq(30*7), 30, 7) Then try this: library(zoo) mat2 - coredata(rapply(zoo(mat), 12, prod)) See: library(zoo) vignette(zoo) and the various zoo help files for more

Re: [R] vector math: calculating a rolling 12 row product?

2006-02-28 Thread Chuck Cleland
Sorry, I don't think I gave what you asked for, but cumprod() may still help. Chuck Cleland wrote: How about applying cumprod to the columns and then subsetting the result? apply(mydata, 2, cumprod)[12:30,] ?cumprod r user wrote: I have a dataframe of numeric values with 30 “rows”

Re: [R] Stepwise with AICc

2006-02-28 Thread Prof Brian Ripley
stepAIC uses extractAIC to calculate AIC. So all that is in principle necessary is to modify extractAIC to return AICc. On Tue, 28 Feb 2006, [EMAIL PROTECTED] wrote: Hi, I would like to uses AIC.c criterion in stepwise selection. I found some comments about this issue in R help archives,

Re: [R] creating dendrogram from cluster hierarchy

2006-02-28 Thread Timo Becker
Timo Becker schrieb: Martin Maechler schrieb: Timo == Timo Becker [EMAIL PROTECTED] on Tue, 28 Feb 2006 11:01:26 +0100 writes: Timo Dear R users, I have created data for hierarchical Timo agglomerative cluster analysis which consist of the Timo merging pairs and

[R] kmeans

2006-02-28 Thread David Bitner
Is there any way that I can assure that kmeans always returns the same result for the same data by locking down the random number generator or anything else? David __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] kmeans

2006-02-28 Thread Sundar Dorai-Raj
David Bitner wrote: Is there any way that I can assure that kmeans always returns the same result for the same data by locking down the random number generator or anything else? David Try ?set.seed before your call to kmeans: # from ?kmeans # a 2-dimensional example x -

[R] any more direct-search optimization method in R

2006-02-28 Thread Weijie Cai
Hello list, I am dealing with a noisy function (gradient,hessian not available) with simple boundary constraints (x_i0). I've tried constrOptim() using nelder mead to minimize it but it is way too slow and the returned results are not satisfying. simulated annealing is so hard to tune and it

Re: [R] any more direct-search optimization method in R

2006-02-28 Thread Ingmar Visser
If you have only boundary constraints on parameters you can use method L-BFGS in optim. Hth, ingmar From: Weijie Cai [EMAIL PROTECTED] Date: Tue, 28 Feb 2006 11:48:32 -0500 To: r-help@stat.math.ethz.ch Subject: [R] any more direct-search optimization method in R Hello list, I am

Re: [R] kmeans

2006-02-28 Thread Roger Bivand
On Tue, 28 Feb 2006, David Bitner wrote: Is there any way that I can assure that kmeans always returns the same result for the same data by locking down the random number generator or anything else? ?set.seed David __

Re: [R] repeated measures ANOVA

2006-02-28 Thread John Vokey
Christian, You need, first to factor() your factors in the data frame P.PA, and then denote the error-terms in aov correctly, as follows: group - rep(rep(1:2, c(5,5)), 3) time - rep(1:3, rep(10,3)) subject - rep(1:10, 3) p.pa - c(92, 44, 49, 52, 41, 34, 32, 65, 47, 58, 94, 82, 48,

[R] subsetting a list of matrices

2006-02-28 Thread Federico Calboli
Hi All, I have a list of matrices: x [,1] [,2] [1,]14 [2,]25 [3,]36 y [,1] [,2] [,3] [,4] [,5] [,6] [1,] 18 21 24 27 30 33 [2,] 19 22 25 28 31 34 [3,] 20 23 26 29 32 35 z =list(x,y) I want to create a second list that is

Re: [R] prepared query with RODBC ?

2006-02-28 Thread McGehee, Robert
I may be misunderstanding you, but why can't you execute a prepared query the same in RODBC as you would directly on your SQL server? In Microsoft SQL server, for instance, I would just set up an ADO application and set the Prepared and CommandText properties before running the query. Here is an

Re: [R] any more direct-search optimization method in R

2006-02-28 Thread Ben Bolker
Ingmar Visser I.Visser at uva.nl writes: If you have only boundary constraints on parameters you can use method L-BFGS in optim. Hth, ingmar From: Weijie Cai wcai11 at hotmail.com I am dealing with a noisy function (gradient,hessian not available) with simple boundary constraints

[R] [Q] specifying weights for robust regression with rlm

2006-02-28 Thread Young-Jin Lee
Hello, R-listers I am relatively new to R and looking for some help on the rlm command. Instead of using provided weight functions such as huber or hampel, I want to specify weights to be applied to each data point. After reading rlm help files, I found a weight option. According to the help

Re: [R] subsetting a list of matrices

2006-02-28 Thread Gabor Grothendieck
Try this: lapply(z, [, 2:3, TRUE) On 2/28/06, Federico Calboli [EMAIL PROTECTED] wrote: Hi All, I have a list of matrices: x [,1] [,2] [1,]14 [2,]25 [3,]36 y [,1] [,2] [,3] [,4] [,5] [,6] [1,] 18 21 24 27 30 33 [2,] 19 22 25 28

Re: [R] subsetting a list of matrices

2006-02-28 Thread Sundar Dorai-Raj
Federico Calboli wrote: Hi All, I have a list of matrices: x [,1] [,2] [1,]14 [2,]25 [3,]36 y [,1] [,2] [,3] [,4] [,5] [,6] [1,] 18 21 24 27 30 33 [2,] 19 22 25 28 31 34 [3,] 20 23 26 29 32 35 z

Re: [R] any more direct-search optimization method in R

2006-02-28 Thread Spencer Graves
WC: What do you mean by noisy in this context? 1. You say, gradient, hessian not available. Is it continuous with perhaps discontinuities in the first derivative? 2. Or is it something you can compute only to, say, 5 significant digits, and some numerical

Re: [R] subsetting a list of matrices

2006-02-28 Thread Marc Schwartz (via MN)
On Tue, 2006-02-28 at 17:14 +, Federico Calboli wrote: Hi All, I have a list of matrices: x [,1] [,2] [1,]14 [2,]25 [3,]36 y [,1] [,2] [,3] [,4] [,5] [,6] [1,] 18 21 24 27 30 33 [2,] 19 22 25 28 31 34 [3,] 20 23

Re: [R] relative referencing for filenames etc

2006-02-28 Thread Greg Tarpinian
Thank you both for your helpful suggestions. My ignorance of R prevents me from understanding exactly how to ...run from a shortcut, appending DATADIR=J:/foo/bar to the command line but I assume that Appendix C of S Programming will help me there -- I was unaware of this material when I

Re: [R] relative referencing for filenames etc

2006-02-28 Thread Prof Brian Ripley
On Tue, 28 Feb 2006, Greg Tarpinian wrote: Thank you both for your helpful suggestions. My ignorance of R prevents me from understanding exactly how to ...run from a shortcut, appending DATADIR=J:/foo/bar to the command line See the rw-FAQ for more details. but I assume that

Re: [R] [Q] specifying weights for robust regression with rlm

2006-02-28 Thread Prof Brian Ripley
On Tue, 28 Feb 2006, Young-Jin Lee wrote: Hello, R-listers I am relatively new to R and looking for some help on the rlm command. Instead of using provided weight functions such as huber or hampel, I want to specify weights to be applied to each data point. After reading rlm help files, I

Re: [R] any more direct-search optimization method in R

2006-02-28 Thread Ben Bolker
Mathematica may well have good optimization routines; I know MATLAB does (e.g. the optimization toolbox, http://www.mathworks.com/products/optimization/?BB=1 , has a general-constraints nonlinear optimizer) -- I also think more people develop optimization code in MATLAB because of its use

Re: [R] relative referencing for filenames etc

2006-02-28 Thread Gabor Grothendieck
I think the idea of the prior respondents was that R_DATADIR would be set outside R and the application and just fetched from an environment variable inside the application so that the application is independent of it. If, in fact, your R code knows the data directory anyways, you could just do

Re: [R] subsetting a list of matrices

2006-02-28 Thread Marco Geraci
Hi. Have you tried 'help.search('list')' ? See ?lapply lapply(z, function(s) s[2:3,,drop=F]) [[1]] [,1] [,2] [1,]25 [2,]36 [[2]] [,1] [,2] [,3] [,4] [,5] [,6] [1,] 19 22 25 28 31 34 [2,] 20 23 26 29 32 35 Marco Geraci --- Federico Calboli

[R] Canonical Values and Centroids for MANOVA plots

2006-02-28 Thread Jarrett Byrnes
Hey, all, I'm trying to construct a centroid plot using canonical values from a MANOVA. I know that from the summary.manova object you can get Eigenvalues, and the H and E matrices (from SS$Treatment and SS$Residuals), but I am at a loss to get the loadings for the canonical values, nor

[R] burst argument in as.ltraj()

2006-02-28 Thread tina leonard
Hi. I am running the as.ltraj () function in adehabitat (v 1.4 under R 2.2.1) but can't seem to correctly specify the burst argument. i.e., the ltraj object returned consists of only one component, when in fact my data consist of more than one burst of reloctions per animal. i've set up the data

Re: [R] repeated measures ANOVA

2006-02-28 Thread Gabor Grothendieck
Or use gl which directly forms a factor: group - gl(2, 5, 30) time - gl(3, 10) subject - gl(10, 1, 30) On 2/28/06, John Vokey [EMAIL PROTECTED] wrote: Christian, You need, first to factor() your factors in the data frame P.PA, and then denote the error-terms in aov correctly, as follows:

Re: [R] does svm have a CV to obtain the best cost parameter?

2006-02-28 Thread Michael
Hi Andy, Thanks a lot for your answer! So what do I do if the model overfits? Thanks a lot! On 2/28/06, Liaw, Andy [EMAIL PROTECTED] wrote: From: Michael Hi all, I am using the svm command in the e1071 package. Does it have an automatic way of setting the cost parameter? See

Re: [R] any more direct-search optimization method in R

2006-02-28 Thread Weijie Cai
Hi All, Thanks for all your replies especially for Graves suggestions. You are right I should give more information about my function. So my responds to your questions are: 1. 2. the function itself is not continuous/smooth. The evaluation at each point is a random number with a non-constant

Re: [R] any more direct-search optimization method in R

2006-02-28 Thread Patrick Burns
Given that information, I think a genetic algorithm should probably do well with your problem. Standard derivative-based optimizers are going to get frustrated and give up. I can believe that Nelder-Mead could get confused as well, though I'm not sure that it will. 'genopt' from S Poetry does

Re: [R] LaTeX in R graph

2006-02-28 Thread David Scott
On Tue, 28 Feb 2006, Dietrich Trenkler wrote: [EMAIL PROTECTED] schrieb: Hello, I would like to know if it is possible to insert LaTeX typesetting in R output. I want to obtain a graph with LaTeX label in order to incorporate it as postscript or pdf, x-seq(0,1,length=100) y-x*x

Re: [R] does svm have a CV to obtain the best cost parameter?

2006-02-28 Thread Liaw, Andy
You might find http://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf http://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf helpful. Parameter tuning is essential for avoiding overfitting. Andy -Original Message- From: Michael [mailto:[EMAIL PROTECTED] Sent: Tuesday, February

[R] jpeg and pixels

2006-02-28 Thread Erin Hodgess
Dear R People: When using the jpeg function for plotting, is there a way to set the size in inches, please? There is an option for width and height in pixels, but not inches. Any suggestions would be welcome! R Version 2.2.1 Windows Thanks in advance! Sincerely, Erin Hodgess Associate

Re: [R] jpeg and pixels

2006-02-28 Thread Marc Schwartz (via MN)
On Tue, 2006-02-28 at 16:10 -0600, Erin Hodgess wrote: Dear R People: When using the jpeg function for plotting, is there a way to set the size in inches, please? There is an option for width and height in pixels, but not inches. Any suggestions would be welcome! The problem is

Re: [R] Compiling R on aix getting error

2006-02-28 Thread Tiong Lim
Prof Brian Ripley wrote: On Tue, 28 Feb 2006, Tiong Lim wrote: I am trying to compile R 2.2.1 on aix 5.3 with xlc/xlC 7.0 , but i am getting the error below. I did a search on the archive and someone had a similar error as me but I can't seem to find a fix for the error below. Are you

[R] R Reference Card (especially useful for Newbies)

2006-02-28 Thread Berton Gunter
Newbies (and others!) may find useful the R Reference Card made available by Tom Short and Rpad at http://www.rpad.org/Rpad/Rpad-refcard.pdf or through the Contributed link on CRAN (where some other reference cards are also linked). It categorizes and organizes a bunch of R's basic, most used

[R] Help - lm, glm, aov results inconsistent with other statistical package

2006-02-28 Thread Ben Ridenhour
Hello, I 'm sure there must a be a simple explanation for what I'm doing wrong but I am stumped. I am a novice R user and this has shaken my confidence in what I'm doing! I am trying to run a simple ANCOVA using the model y~A*x, where y and x are continuous and A has two levels. Everything

Re: [R] Help - lm, glm, aov results inconsistent with other stati stical package

2006-02-28 Thread Liaw, Andy
1. You have levels(A) as 2 and 4, yet you showed equations for A=0 and A=1? 2. y = A + X + A*X means you're allowing the different groups of A to have different slopes. Probably not what you intended. 3. It's probably best to provide a small sample of the data (and R code) so we know how you

[R] Specification decisions in glm and lmer

2006-02-28 Thread Paul Johnson
I have been reviewing GLM and LMER to sharpen up some course notes and would like to ask for your advice. 1. Is there a test that would be used to check whether a particular functional form--say Gaussian, Gamma, or Inverse Gaussian, is more appropriate in a Generalized Linear Model? A

[R] mice library / survival analysis

2006-02-28 Thread Brian Perron
Hello folks, I am a relatively new user of R and created multiply imputed data sets with the 'mice' library. This library provides two functions for complete-data analysis on multiply imputed data set objects (lm.mids and glm.mids). I am trying to estimate a series of Cox PH regression

Re: [R] Query on multivariate time series

2006-02-28 Thread Spencer Graves
As I read the model you described, it is NOT a multivariate autoregression but a univariate autoregression with explanatory variables and some parameters fixed. The arima command should be able to fit this. Try the following: set.seed(1) X - rnorm(99) X2 - cbind(x=X[-1], x1=X[-99])

Re: [R] repeated measures ANOVA

2006-02-28 Thread John Maindonald
There seem to several issues here: 1) In the analysis that has a (1|Subject) error term, there is a large negative correlation between the parameter estimates for time and time:group. Overall, the effect of time is significant, as can be seen from time.lme - lme ( p.pa ~ time * group, random = ~

[R] Maximally independent variables

2006-02-28 Thread Gabor Grothendieck
Are there any R packages that relate to the following data reduction problem fo finding maximally independent variables? Currently what I am doing is solving the following minimax problem: Suppose we want to find the three maximally independent variables. From the full n by n correlation

Re: [R] repeated measures ANOVA

2006-02-28 Thread John Maindonald
There was a mistake in my earlier note, that I should correct: (Or you can estimate the interaction, and no degrees of freedom are left for either the time or time:group random effect). All you can talk ^^^ about is the average and the difference of the

Re: [R] Maximally independent variables

2006-02-28 Thread Jacques VESLOT
library(gtools) z - combinations(ncol(DF), 3) maxcor - function(x) max(as.vector(as.dist(cor(DF[,x] names(DF)[z[which.min(apply(z, 1, maxcor)),]] Gabor Grothendieck a écrit : Are there any R packages that relate to the following data reduction problem fo finding maximally independent

Re: [R] Maximally independent variables

2006-02-28 Thread Gabor Grothendieck
That's basically what I already do but what I was wondering was if there were any other approaches such as connections with clustering, PCA, that have already been developed in R that might be applicable. On 3/1/06, Jacques VESLOT [EMAIL PROTECTED] wrote: library(gtools) z -

Re: [R] Help - lm, glm, aov results inconsistent with other stati stical package

2006-02-28 Thread Ben Ridenhour
Alright, I'll try to give some sample code. # create A with 2 levels - 2 and 4 A-c(rep(2,times=30),rep(4,times=42)) # make A a factor A-as.factor(A) #generate 72 random x points x-rnorm(72)

Re: [R] Compiling R on aix getting error

2006-02-28 Thread Prof Brian Ripley
You have not apparently followed the advice in the R-admin manual: On AIX 4.3.3 and AIX 5.1/2, it was found that the use of ``run time linking'' (as opposed to normal AIX style linking) was required. For this, the @R{} main program must be linked to the runtime linker with the

[R] Update R 2.1.1-1 - 2.2.1 on UBUNTU

2006-02-28 Thread Florence Débarre
I've installed Ubuntu 5.10 Breezy on my Mac. When using MacOSX, I used to work with R 2.2.1, but now, with Ubuntu, I can't download it with synaptic. I can only download R 2.1.1-1, and I really need 2.2.1. I've tried to edit the sources.list file, typing deb

Re: [R] Help - lm, glm, aov results inconsistent with other stati stical package

2006-02-28 Thread Ben Ridenhour
Okay, I took the data to SAS and it gives me the same answer that R does. I don't why JMP is giving me an incorrect answer, but it seems to be. (Either that or I have made the same mistake in SAS and R.) Any ideas what JMP might be doing? Ben --- Benjamin

Re: [R] Help - lm, glm, aov results inconsistent with other stati stical package

2006-02-28 Thread Prof Brian Ripley
I think we should clarify your subject line. One other statistical package (JMP) is giving in your hands results inconsistent with R. I have to say I am puzzled by this. Why ask the volunteers here why you get a different result in JMP from the answer given by R? You could ask your support