Re: [R] R help

2003-03-12 Thread Petr Pikal
Hi On 12 Mar 2003 at 15:45, Shutnik wrote: > Dear friends, > I work with Matlab and now a bit in trouble with getting used to R. > Could you give me some help with the following questions: > > 1. how to generate the random matrix mxn with constant mean and > variance, say N(0,1)? > > 2. h

Re: [R] [OT] Appropriate test?

2003-03-12 Thread ripley
On Wed, 12 Mar 2003, Spencer Graves wrote: > If you want to use nlme, am I correct is asserting that the best > reference is > > Pinhiero and Bates (2000) Mixed Effects Models in S and S-Plus (NY: > Springer) ? Yes. There are several other ways to do this though, and I don't think I would st

Re: [R] [OT] Appropriate test?

2003-03-12 Thread Spencer Graves
If you want to use nlme, am I correct is asserting that the best reference is Pinhiero and Bates (2000) Mixed Effects Models in S and S-Plus (NY: Springer) ? Spencer Graves kjetil brinchmann halvorsen wrote: On 12 Mar 2003 at 2:37, Blaise TRAMIER wrote: You should have a look at the package n

Re: [R] quasipoisson, glm.nb and AIC values

2003-03-12 Thread ripley
On Wed, 12 Mar 2003, kjetil brinchmann halvorsen wrote: > On 12 Mar 2003 at 19:50, Uwe Ligges wrote: > > I would vote against comparing different model classes using AIC. > > Why? I thought one of the advantages with AIC is that it can be used > to compare different model classes, although in p

Re: [R] simulating 'non-standard' survival data

2003-03-12 Thread Frank E Harrell Jr
On Wed, 12 Mar 2003 13:01:12 +0100 vito muggeo <[EMAIL PROTECTED]> wrote: > Dear all, > I'm looking for someone that help me to write an R function to simulate > survival data under complex situations, namely time-varying hazard ratio, > marginal distribution of survival times and covariates. The

Re: [R] apply() and unary operators

2003-03-12 Thread Thomas Lumley
On Thu, 13 Mar 2003, Robin Hankin wrote: > Hi everyone. > > What's going on here? > > > > a <- matrix(1:4,2,2) > > a > [,1] [,2] > [1,]13 > [2,]24 > > apply(a,2,sum) > [1] 3 7 > > apply(a,2,"+") > [,1] [,2] > [1,]13 > [2,]24 > > apply(a,1,"+") > [,1]

[R] apply() and unary operators

2003-03-12 Thread Robin Hankin
Hi everyone. What's going on here? > a <- matrix(1:4,2,2) > a [,1] [,2] [1,]13 [2,]24 > apply(a,2,sum) [1] 3 7 > apply(a,2,"+") [,1] [,2] [1,]13 [2,]24 > apply(a,1,"+") [,1] [,2] [1,]12 [2,]34 > help(apply) says that "+" should be

[R] Offtopic --- book references

2003-03-12 Thread kjetil brinchmann halvorsen
Hola! I am about to do this years buying for our library, and could need help with some references. Some people here will start to work with IRT and Rasch models. >From the book descriptions on Amazon it is difficult to decide what books to buy. I want one introductory book on IRT/Rasch, and

Re: [R] [OT] Appropriate test?

2003-03-12 Thread kjetil brinchmann halvorsen
On 12 Mar 2003 at 2:37, Blaise TRAMIER wrote: You should have a look at the package nlme, installed with your distribution of R. Look at the help for the function lme (linear mixed models). You have not described your data sufficiently to say much more, but you have biological measurements chan

Re: [R] quasipoisson, glm.nb and AIC values

2003-03-12 Thread kjetil brinchmann halvorsen
On 12 Mar 2003 at 19:50, Uwe Ligges wrote: . . . . > I would vote against comparing different model classes using AIC. Why? I thought one of the advantages with AIC is that it can be used to compare different model classes, although in practice it might be difficult because programs delete con

Re: [R] problem applying .C function in outer product

2003-03-12 Thread Allin Cottrell
On Wed, 12 Mar 2003, Jim McLoughlin wrote: > /* > * Wrapper for use in R - requires that return value by passed via > argument > */ > void blackScholesR( double *S, double *K, double *r, double *T, double > *volatility, double *price) > { > *price = blackScholes(*S, *K, *r, *T, *volatilit

[R] problem applying .C function in outer product

2003-03-12 Thread Jim McLoughlin
Hi folks I'm relatively new to R, and am having some problems using a c function I'm calling. The function is loaded, and it works for when given specific (scalar) arguments, but does not work when passed Vector arguments, and therefore fails in the outer product I need. Here are the details:

[R] avoiding excel's odbc limit on number of columns

2003-03-12 Thread Alejandro Munoz del Rio
Dear R-Helpers, I would like to read an Excel .xls file via RODBC. I have successfully run the example in p. 18 of "R Data Import/Export". The problem I am facing is that Excel's ODBC driver seems to have a limit on the number of fields/columns (output below). I haven't found any documentation on

Re: [R] png plots

2003-03-12 Thread Ross Ihaka
Allin Cottrell wrote: Sorry, here's one: library(tseries) data(EuStockMarkets) dax <- diff(log(EuStockMarkets))[,"DAX"] dax.garch <- garch(dax) png() plot(dax.garch) dev.off() I can confirm that the problem exists in the latest development sources under RedHat 7.3. I'm teaching in bit, but I'll

[R] apply with two matrixes

2003-03-12 Thread Katalin Csillery
Hi, I have a function which does a certain task with two vectors, f1 <- function(a,b){body} I also have a list of matrixes (all with the same dim's), and for each column of each matrix in the list I want to use "f1", in such way that it gives the vector "a" in the first argument of "f1". The se

RE: [R] png plots

2003-03-12 Thread Wilkinson, Mark
<> <> <> <> Indeed, the problem persists. My code was using a for() loop: ## png() for (i in seq(1, 16, 4)) { par(mfrow=c(2, 2)) for (gt in i:(i+3)) { mysep <- paste(rep(' ', i), collapse='') plot(density(rnorm(1000)), main=paste(i, gt, sep=mysep)) for (j in 1:5) {

Re: [R] png plots

2003-03-12 Thread ripley
png() and bitmap(), the latter using ghostscript. On Wed, 12 Mar 2003, Allin Cottrell wrote: > On Wed, 12 Mar 2003 [EMAIL PROTECTED] wrote: > > > And your platform is? There are two different png devices in R. > > > > On Wed, 12 Mar 2003, Allin Cottrell wrote: > > > > > I saw in the archive a p

Re: [R] png plots

2003-03-12 Thread Allin Cottrell
On Wed, 12 Mar 2003, Peter Dalgaard BSA wrote: > Allin Cottrell <[EMAIL PROTECTED]> writes: > > > I am seeing the same thing (with R 1.6.2 on Linux i686). My input > > file generated 4 plot files. The first two were fine, but the last 2 > > featured a weird overlay of the remaining graphs. The

Re: [R] png plots

2003-03-12 Thread Allin Cottrell
On Wed, 12 Mar 2003 [EMAIL PROTECTED] wrote: > And your platform is? There are two different png devices in R. > > On Wed, 12 Mar 2003, Allin Cottrell wrote: > > > I saw in the archive a post from Mark Wilkinson (Feb 1, 2003), saying > > that some of his R-generated png plots came out overlapping

Re: [R] png plots

2003-03-12 Thread Peter Dalgaard BSA
Allin Cottrell <[EMAIL PROTECTED]> writes: > I am seeing the same thing (with R 1.6.2 on Linux i686). My input > file generated 4 plot files. The first two were fine, but the last 2 > featured a weird overlay of the remaining graphs. The problem is not > seen with postscript of pdf output. Ple

Re: [R] png plots

2003-03-12 Thread ripley
And your platform is? There are two different png devices in R. On Wed, 12 Mar 2003, Allin Cottrell wrote: > I saw in the archive a post from Mark Wilkinson (Feb 1, 2003), saying > that some of his R-generated png plots came out overlapping. > > I am seeing the same thing (with R 1.6.2 on Linux

[R] png plots

2003-03-12 Thread Allin Cottrell
I saw in the archive a post from Mark Wilkinson (Feb 1, 2003), saying that some of his R-generated png plots came out overlapping. I am seeing the same thing (with R 1.6.2 on Linux i686). My input file generated 4 plot files. The first two were fine, but the last 2 featured a weird overlay of th

Re: [R] Rcmd BATCH

2003-03-12 Thread ripley
On Wed, 12 Mar 2003, Paolo Tenconi wrote: > Hello, > I've a question: I invoke R from a text editor in a Win2000 operating system using > > Rcmd.exe BATCH inFile outFile > > I've two problems: > a) If I use windows() as graphics device, all windows close immediately after script > execution, >

[R] Rcmd BATCH

2003-03-12 Thread Paolo Tenconi
Hello, I've a question: I invoke R from a text editor in a Win2000 operating system using Rcmd.exe BATCH inFile outFile I've two problems: a) If I use windows() as graphics device, all windows close immediately after script execution, how can I let them not to die? b) Is it possible to redi

Re: [R] quasipoisson, glm.nb and AIC values

2003-03-12 Thread ripley
1) A quasi- mode does not have a likelihood and so does not have an AIC, by definition. 2) There is nothing wrong with a negative AIC, but you don't have one. The value of AIC in your problem is 211.079 + 2*16 + 2. It is summary.glm that is giving you misleading results. Try the following log

Re: [R] quasipoisson, glm.nb and AIC values

2003-03-12 Thread Uwe Ligges
Vicente Piorno wrote: > > Dear R users, > I am having problems trying to fit quasipoisson and negative binomials glm. > My data set > contains abundance (counts) of a species under different management regimens. > First, I tried to fit a poisson glm: > > > summary(model.p<-glm(abund~mgmtcat,po

Re: [R] Independent Components Analysis

2003-03-12 Thread Uwe Ligges
"Barker, Chris" wrote: > > A colleague suggested that some R software was available for estimating > "Independent Components Analysis" (ICA) (... signal separation). > > If so, I'd appreciate any pointers . > > Chris Barker >Director of Statistical Research > MEDTAP Interna

Re: [R] Independent Components Analysis

2003-03-12 Thread ripley
On CRAN there is package fastICA and an ica function in package e1071 On Wed, 12 Mar 2003, Barker, Chris wrote: > A colleague suggested that some R software was available for estimating > "Independent Components Analysis" (ICA) (... signal separation). > > If so, I'd appreciate any pointers .

[R] quasipoisson, glm.nb and AIC values

2003-03-12 Thread Vicente Piorno
Dear R users, I am having problems trying to fit quasipoisson and negative binomials glm. My data set contains abundance (counts) of a species under different management regimens. First, I tried to fit a poisson glm: > summary(model.p<-glm(abund~mgmtcat,poisson)) Call: glm(formula =

[R] Independent Components Analysis

2003-03-12 Thread Barker, Chris
A colleague suggested that some R software was available for estimating "Independent Components Analysis" (ICA) (... signal separation). If so, I'd appreciate any pointers . Chris Barker Director of Statistical Research MEDTAP International, Inc. Redwood City, Ca

RE: [R] R help

2003-03-12 Thread Pfaff, Bernhard
Dear friends, I work with Matlab and now a bit in trouble with getting used to R. Could you give me some help with the following questions: 1. how to generate the random matrix mxn with constant mean and variance, say N(0,1)? 2. how to create a code (function), say "myfunction", and make it

Re: [R] variables in a correlation matrix

2003-03-12 Thread Sundar Dorai-Raj
juli g. pausas wrote: Hi, Given a correlation matrix, how can I know which variables have certain correlation values? aa <- matrix( rnorm(25, 1,1), 5,5) colnames(aa) <- c("v1", "v2", "v3", "v4", "v5") aacor <- cor(aa) For instance, which variables are negatively correlated? aacor[aacor<0]

Re: [R] R help

2003-03-12 Thread M.Kondrin
Spencer Graves wrote: Regarding 1 and 2: myfunction <- function(m=2, n=3) array(rnorm(m*n), dim=c(m, n)) myfunction() I'll let someone else answer 3. Spencer Graves Shutnik wrote: Dear friends, I work with Matlab and now a bit in trouble with getting used to R. Could you give me some help

Re: [R] variables in a correlation matrix

2003-03-12 Thread ripley
On Wed, 12 Mar 2003, juli g. pausas wrote: > Hi, > Given a correlation matrix, how can I know which variables have certain > correlation values? > > aa <- matrix( rnorm(25, 1,1), 5,5) > colnames(aa) <- c("v1", "v2", "v3", "v4", "v5") > aacor <- cor(aa) > > For instance, which variables are nega

Re: [R] R help

2003-03-12 Thread Spencer Graves
Regarding 1 and 2: myfunction <- function(m=2, n=3) array(rnorm(m*n), dim=c(m, n)) myfunction() I'll let someone else answer 3. Spencer Graves Shutnik wrote: Dear friends, I work with Matlab and now a bit in trouble with getting used to R. Could you give me some help with the following q

[R] variables in a correlation matrix

2003-03-12 Thread juli g. pausas
Hi, Given a correlation matrix, how can I know which variables have certain correlation values? aa <- matrix( rnorm(25, 1,1), 5,5) colnames(aa) <- c("v1", "v2", "v3", "v4", "v5") aacor <- cor(aa) For instance, which variables are negatively correlated? aacor[aacor<0] # provide the r values,

Re: [R] Simple question about export

2003-03-12 Thread Ott Toomet
Dear Michael, If your dataset is large, you may consider my package savetable at www.obs.ee/~siim/savetable_0.2.1.tar.gz This is more memory-efficient than write.table. Unfortunately, I have not a window binary. Best wishes, Ott | Date: Wed, 12 Mar 2003 05:13:04 -0800 (PST) | From: Michael

Re: [R] problems with numerical optimisation

2003-03-12 Thread Spencer Graves
Do you compute the singular value decomponsition of your gradients? Unless you compute a marginal likelihood using Monte Carlo integration, I would expect convergence problems to be evident in the range of the absolute values of the singular values of the gradients: If the smallest is less tha

[R] R help

2003-03-12 Thread Shutnik
Dear friends, I work with Matlab and now a bit in trouble with getting used to R. Could you give me some help with the following questions: 1. how to generate the random matrix mxn with constant mean and variance, say N(0,1)? 2. how to create a code (function), say “myfunction”, and make it

Re: [R] Filling graphic objects

2003-03-12 Thread p.b.pynsent
On Wednesday, March 12, 2003, at 12:13 pm, [EMAIL PROTECTED] wrote: On Wed, 12 Mar 2003, p.b.pynsent wrote: I have used polygon() to mark the confidence limits of a survival curve. In another project, I have used the col parameter to fill my boxplots. The poly() description refers to filling

Re: [R] Simple question about export

2003-03-12 Thread Marc Schwartz
Michael Miettinen wrote: Hi, Sorry about making this stupid question, but I did not find the answer from documentation. I managed to read my spss .sav file into the R, no problem. Next I would like to write this data to a file in ascii-format. I tried to use write.table and I got no error mess

[R] Thank you all!

2003-03-12 Thread Michael Miettinen
Wow, this is really active list. I got several friendly answers - many on them asking me to read documentation better. I found this software just today, and I may was more eager to try it out than I should have been. :-) I promise to use more time with documents before my next question. Than

Re: [R] Simple question about export

2003-03-12 Thread Mathieu Roelants
- Original Message - From: "Michael Miettinen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, 12 March, 2003 2:13 PM Subject: [R] Simple question about export > Hi, > > Sorry about making this stupid question, but I did not > find the answer from documentation. > > I managed

[R] job opportunity

2003-03-12 Thread W. C. Thacker
The University of Miami's Rosenstiel School of Marine and Atmospheric Sciences (RSMAS) is seeking a research associate to work with hydrographic data. The objective of the project is to develop statistical models for estimating salinity and density from observations of temperature together with kn

Re: [R] changing pen mode [or adjusting for overlapping points?]

2003-03-12 Thread Petr Pikal
Hi On 11 Mar 2003 at 16:28, Don Armstrong wrote: > On Tue, 11 Mar 2003, Marc Schwartz wrote: > > Finally, you might also consider using the 'cex' argument in both > > plot() and points(), which can reduce the size of the plotting > > symbols. The default for par(cex) is 1.0, so you might try smal

RE: [R] Simple question about export

2003-03-12 Thread Darryl
If that is what you tried, then you didn't supply the object to the write.table function. e.g. if your data.frame is called mydata in R you need write.table(mydata,"c:/foo/data.dat") The file is ascii. Note also that you either have to use forward slashes (as above) or double backslashes write.t

RE: [R] Simple question about export

2003-03-12 Thread Adaikalavan Ramasamy
Well, you did not specify the object to save in write.table(). Suppose you want to save the following: x <- matrix( c(1:25), nrow=5) write.table(x, file="c:/my.output.file.txt") If all goes well, you should see the prompt without any message. Also use "/" rather than "\" as it is reserved for e

Re: [R] Simple question about export

2003-03-12 Thread ripley
On Wed, 12 Mar 2003, Michael Miettinen wrote: > Sorry about making this stupid question, but I did not > find the answer from documentation. See the FAQ question 7.10 How do file names work in Windows? > I managed to read my spss .sav file into the R, no > problem. Next I would like to write

[R] temporal evolution and variance after rotation of eof

2003-03-12 Thread Flore MOUNIER
Dear R users, I have been doing some eof analysis using princomp function, then the eof results were rotated with varimax and promax functions. Those functions are working fine. However, after their uses, I cannot find how to obtain the temporal evolution and the variance of the obtain component

[R] Simple question about export

2003-03-12 Thread Michael Miettinen
Hi, Sorry about making this stupid question, but I did not find the answer from documentation. I managed to read my spss .sav file into the R, no problem. Next I would like to write this data to a file in ascii-format. I tried to use write.table and I got no error messages, but no file either.

Re: [R] Filling graphic objects

2003-03-12 Thread ripley
On Wed, 12 Mar 2003, p.b.pynsent wrote: > I have used polygon() to mark the confidence limits of a survival curve. > In another project, I have used the col parameter to fill my boxplots. > > The poly() description refers to filling but actually produces Did you mean polygon()? > hatching (i.

[R] simulating 'non-standard' survival data

2003-03-12 Thread vito muggeo
Dear all, I'm looking for someone that help me to write an R function to simulate survival data under complex situations, namely time-varying hazard ratio, marginal distribution of survival times and covariates. The algorithm is described in the reference below and it should be not very difficult t

[R] Filling graphic objects

2003-03-12 Thread p.b.pynsent
I have used polygon() to mark the confidence limits of a survival curve. In another project, I have used the col parameter to fill my boxplots. The poly() description refers to filling but actually produces hatching (i.e. lines ). boxplot() does truly fill the boxes with a colour or shades of gre

[R] Gstat: multivariable geostatistics for S (R and S-Plus)

2003-03-12 Thread Edzer J. Pebesma
The majority of the functionality present in the gstat stand-alone program (http://www.gstat.org/) is now available as a package/library for the S language (R, S-Plus), again called gstat. The package provides multivariable geostatistical modelling, prediction and simulation, as well as several vis

[R] MAPE

2003-03-12 Thread Luis Silva
Hi again With arima0 the problem was solved but what are the diferences between arima and arima0? I have another question. I fit the model to the data and I make some predictions. But I also want to calculate MAPE based in the last 3 observations available. Is it possible? Can I obtain the fitted

AW: Re: [R] R-Graphics: Scaling axis

2003-03-12 Thread Till Baumgaertel
Thank you! Adding asp=1 to the plot-command does exactly what I want! bye, till >-- Original Nachricht -- >From: [EMAIL PROTECTED] >Date: Wed, 12 Mar 2003 07:15:30 + (GMT) >To: Thomas W Blackwell <[EMAIL PROTECTED]> >cc: Till Baumgaertel <[EMAIL PROTECTED]>, >r-help <[EMAIL PROTECTED]

Re: [R] How to collect the Rtools to build packages

2003-03-12 Thread Ko-Kang Kevin Wang
- Original Message - From: "Eric ESPOSITO" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 12, 2003 8:46 PM Subject: [R] How to collect the Rtools to build packages > After reading the readme.packages file, I would like to install the R tools > in order to build my own

[R] problems with numerical optimisation

2003-03-12 Thread Ott Toomet
Dear list, this is not a particular R question but perhaps someone can help. I am running a maximum likelihood estimation (competing risk duration model with unobserved heterogeneity) on 30 different datasets. The problem is that on 2 datasets the model does not converge. I am interested if the

Re: [R] How to collect the Rtools to build packages

2003-03-12 Thread ripley
It _is_ working: I have just checked from outside Oxford. It was unavailable for a few hours on Saturday (the server was being upgraded) but has otherwise been up (and that file downloaded successfully several times a day) for all of the last ten days. ftp://ftp.stats.ox.ac.uk/pub/Rtools/tools.

[R] How to collect the Rtools to build packages

2003-03-12 Thread Eric ESPOSITO
After reading the readme.packages file, I would like to install the R tools in order to build my own packages, but the internet portal http://www.stats.ox.ac.uk/pub/Rtools/ hasn't been working since a few days. Where can I get the file tools.zip? Thank you! Eric Esposito __

Re: [R] R-Graphics: Scaling axis

2003-03-12 Thread Deepayan Sarkar
On Tuesday 11 March 2003 05:00 pm, Till Baumgaertel wrote: > Hi, > > how can I scale the x- and y-axis of a "plot" to the same scale? > > My problem: The following command sequence produces the plot in a square. > What I want is the x-axis to be 5 times as wide (measured e.g. in pixels) > as the y-

Re: [R] R-Graphics: Scaling axis

2003-03-12 Thread Roger Bivand
On Wed, 12 Mar 2003, Till Baumgaertel wrote: > Hi, > > how can I scale the x- and y-axis of a "plot" to the same scale? > > My problem: The following command sequence produces the plot in a square. > What I want is the x-axis to be 5 times as wide (measured e.g. in pixels) > as the y-axis is lon