Re: [R] plot region too large

2006-09-15 Thread Prof Brian Ripley
On Fri, 15 Sep 2006, Kiermeier, Andreas (PIRSA - SARDI) wrote: The figure margins come from what is set in par(mar), eg layout(matrix(c(1:10),5,2),heights=c(1,rep(2,4))) par(mar) [1] 5.1 4.1 4.1 2.1 There is not enough space left to plot anything with those margins. You will need to

[R] ccf versus acf

2006-09-15 Thread Werner,Arelia [PYR]
I am trying to run a cross-correlation using the ccf() function. When I select plot = TRUE in the ccf() I get a graph which has ACF on the y-axis, which would suggest that these y-values are the auto-correlation values. How should I adjust the code to produce a plot that provides the

[R] Kernel Smoothing with more than 2 predictors

2006-09-15 Thread Louisell, Paul
Hi, I'm wondering if anyone is aware of any R packages that do kernel smoothing with at least 4 predictors. The dataset I'm working with now has 4 predictors, and I can fit a loess smooth, but loess has the disadvantage that it can produce fitted values outside the range of the response-something

[R] Help

2006-09-15 Thread Ben Salah Mohamed Selim
Hello, I am a new user of R statistical project. So, I have a matrix (4 columns and 330 rows) and I would like to have PCA (Principal Component Analysis). Besides, I would like to draw every 30 rows from 330 with a different colour but I don’t know how. Could you help me by showing how can

[R] execution of source() command

2006-09-15 Thread Rainer M Krug
Hi Linux SuSE 10 platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 2 minor 3.1 year 2006 month 06 day01 svn rev38247 language R version.string Version 2.3.1

Re: [R] Help

2006-09-15 Thread David Barron
Do you mean something like this? mat - cbind(rnorm(330),rnorm(330),rnorm(330),rnorm(330)) head(mat) [,1][,2][,3] [,4] [1,] -0.4668818 0.03015618 -0.72568113 0.6053179 [2,] -0.2625691 -2.20022333 -0.93728544 0.5455864 [3,] -3.4599164 0.71049089 -0.91545599

[R] predict with logistic regression

2006-09-15 Thread Jan Sabee
I am learning about using logistic regression with glm. Suppose I have dataset: duration - c(45,15,40,83,90,25,35,65,95,35,75,45,50,75,30,25,20,60,70,30,60,61,65,15,20,45,15,25,15,30,40,15,135,20,40) type - c(0,0,0,1,1,1,rep(0,5),1,1,1,0,0,1,1,1,rep(0,4),1,1,0,1,0,1,0,0,rep(1,4)) sore -

Re: [R] ccf versus acf

2006-09-15 Thread Prof Brian Ripley
On Thu, 14 Sep 2006, Werner,Arelia [PYR] wrote: I am trying to run a cross-correlation using the ccf() function. When I select plot = TRUE in the ccf() I get a graph which has ACF on the y-axis, which would suggest that these y-values are the auto-correlation values. But cross-correlations

Re: [R] execution of source() command

2006-09-15 Thread Prof Brian Ripley
On Fri, 15 Sep 2006, Rainer M Krug wrote: Hi Linux SuSE 10 platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 2 minor 3.1 year 2006 month 06 day01 svn rev

Re: [R] execution of source() command

2006-09-15 Thread Rainer M Krug
Prof Brian Ripley wrote: On Fri, 15 Sep 2006, Rainer M Krug wrote: Hi I have two questions concerning the source(test.R) command. 1) Is there any command which I can put into the test.R script file which aborts the execution of the script? At the moment I use CodeToBeExecutedInScript if

Re: [R] Beta stochastic simulation

2006-09-15 Thread Duncan Murdoch
On 9/15/2006 6:43 AM, Mark Pinkerton wrote: Hi Duncan, Thanks for having a look at this. Find attached a zip with all the relevant files to run the simulation. I am running this on Windows XP, R version 2.3.1. Does the error still occur in a recent alpha build? It's downloadable from CRAN,

Re: [R] Beta stochastic simulation

2006-09-15 Thread Mark Pinkerton
I have just installed 2.4.0 alpha and the problem persists. Here is the output of the run: # Summary stats summary(totals.losses1) Min. 1st Qu.Median Mean 3rd Qu. Max. 0 0 1284 1617000685100 21920 mean(totals.losses1) [1] 1617219

Re: [R] Beta stochastic simulation

2006-09-15 Thread Duncan Murdoch
On 9/15/2006 7:51 AM, Mark Pinkerton wrote: I have just installed 2.4.0 alpha and the problem persists. Here is the output of the run: Thanks. I'll try your script and see if I can track down what's going on. Duncan Murdoch # Summary stats summary(totals.losses1) Min. 1st Qu.

Re: [R] Beta stochastic simulation

2006-09-15 Thread Duncan Murdoch
On 9/15/2006 7:51 AM, Mark Pinkerton wrote: I have just installed 2.4.0 alpha and the problem persists. Here is the output of the run: When I run it, I get a series of warning messages from qbeta. Do you get those? Duncan Murdoch # Summary stats summary(totals.losses1) Min. 1st

[R] missing data codes

2006-09-15 Thread Qiong Wang
Dear all, I am new to R. I wish to use R's multiple imputation to deal with missing data. I have a data set with the size around 300 observations and 150 variables. I checked the help function in R and could not locate how to write the codes for this. can anyone give a hand? Do appreciate your

Re: [R] Beta stochastic simulation

2006-09-15 Thread Mark Pinkerton
Yes, indeed I do. Is there any way I can dig into these a bit more? I have also just tried using the OO inverse beta from the distr package and this seems to work. Mark Pinkerton Risk Management Solutions Peninsular House 30 Monument Street London EC3R 8HB UK www.RMS.com Tel: +44 20 7444

Re: [R] Beta stochastic simulation

2006-09-15 Thread Duncan Murdoch
On 9/15/2006 9:06 AM, Mark Pinkerton wrote: Yes, indeed I do. Is there any way I can dig into these a bit more? I have also just tried using the OO inverse beta from the distr package and this seems to work. This is pretty irritating. You were getting warnings from R that the calculations

[R] graphics and 'layout' question

2006-09-15 Thread Arne.Muller
Hello, I got stuck with a graphics question: I've 3 figures that I present on a single page (window) via 'layout'. The layout is layout(matrix(c(1,1,2,3), 2, 2, byrow=TRUE)); so that the frst plot spans the both columns in row one. Now I'd like to magnify the fist figure so that it takes 20%

Re: [R] missing data codes

2006-09-15 Thread David Barron
You've not given us much information to go on! Have you tried help(aregImpute,package=Hmisc) On 15/09/06, Qiong Wang [EMAIL PROTECTED] wrote: Dear all, I am new to R. I wish to use R's multiple imputation to deal with missing data. I have a data set with the size around 300 observations

Re: [R] graphics and 'layout' question

2006-09-15 Thread Chuck Cleland
[EMAIL PROTECTED] wrote: Hello, I got stuck with a graphics question: I've 3 figures that I present on a single page (window) via 'layout'. The layout is layout(matrix(c(1,1,2,3), 2, 2, byrow=TRUE)); so that the frst plot spans the both columns in row one. Now I'd like to magnify

Re: [R] graphics and 'layout' question

2006-09-15 Thread David Barron
Use the heights parameter in the layout function, as shown in ?layout. For example, to get the first figure to be twice as tall as the other two, use: layout(matrix(c(1,1,2,3),2,2,byrow=TRUE),heights=c(2,1)) layout.show(3) On 15/09/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, I

Re: [R] missing data codes

2006-09-15 Thread Ana Patricia Martins
See MICE http://www.multiple-imputation.com/ -Original Message- From: David Barron [mailto:[EMAIL PROTECTED] Sent: sexta-feira, 15 de Setembro de 2006 14:38 To: Qiong Wang; r-help Subject: Re: [R] missing data codes You've not given us much information to go on! Have you tried

Re: [R] graphics and 'layout' question

2006-09-15 Thread James W. MacDonald
[EMAIL PROTECTED] wrote: Hello, I got stuck with a graphics question: I've 3 figures that I present on a single page (window) via 'layout'. The layout is layout(matrix(c(1,1,2,3), 2, 2, byrow=TRUE)); so that the frst plot spans the both columns in row one. Now I'd like to magnify the

Re: [R] group bunch of lines in a data.frame, an additional requirement

2006-09-15 Thread Emmanuel Levy
(re)-Hello I actually thought about another possibility with a 1 column, a sum (instead of a mean), and a division of the columns for which I want the mean: DF = data.frame( V1=c(A,A,A,B,B,C) , V2=c(1,3,2,0.5,0.9,5.0), V3=c(200,800,200,20,50,70), V4=c(ID1,ID1,ID1,ID2,ID2,ID3)) DF2 =

[R] Histogram of data with categorical varialbe

2006-09-15 Thread Alexandre Depire
Hello, I have the following data: Km Sex 250 1 300 2 290 2 600 1 450 2 650 1 . I would like to obtain one histogram where the data (or the part) of each sex is visible, it is like cumulative histogram or spinogram. To be more comprehensible, i would like to know if the following graph is

Re: [R] group bunch of lines in a data.frame, an additional requirement

2006-09-15 Thread Gabor Grothendieck
Good idea. You could write it compactly like this: transform(aggregate(cbind(DF[2:3], o = 1), DF[c(1,4)], sum, na.rm = TRUE), + V2 = V2/o, V3 = V3/o) V1 V4 V2 V3 o 1 A ID1 2.0 400 3 2 B ID2 0.7 35 2 3 C ID3 5.0 70 1 On 9/15/06, Emmanuel Levy [EMAIL PROTECTED] wrote: (re)-Hello I

Re: [R] missing data codes

2006-09-15 Thread Frank E Harrell Jr
David Barron wrote: You've not given us much information to go on! Have you tried help(aregImpute,package=Hmisc) And for that sample size you'll have to tell aregImpute to force all continuous variables to act linearly Frank On 15/09/06, Qiong Wang [EMAIL PROTECTED] wrote: Dear all,

Re: [R] Dear FE Harrell How can I get rreport ?

2006-09-15 Thread Frank E Harrell Jr
Anupam Tyagi wrote: justin bem justin_bem at yahoo.fr writes: Mr Harrell, After reading discussion about R output and SAS output , I will like to use rreport package. I a windows XP user Sincerly See: http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/Rreport Anupam.

Re: [R] Histogram of data with categorical varialbe

2006-09-15 Thread Romain Francois
Alexandre Depire wrote: Hello, I have the following data: Km Sex 250 1 300 2 290 2 600 1 450 2 650 1 . I would like to obtain one histogram where the data (or the part) of each sex is visible, it is like cumulative histogram or spinogram. To be more comprehensible, i would

[R] FW: R Reference Card and other help (especially useful for Newbies)

2006-09-15 Thread Berton Gunter
Hi all: Newbies (and others!) may find useful the R Reference Card made available by Tom Short of EPRI Solutions 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

Re: [R] Histogram of data with categorical varialbe

2006-09-15 Thread Achim Zeileis
On Fri, 15 Sep 2006 16:45:31 +0200 Alexandre Depire wrote: Hello, I have the following data: Km Sex 250 1 300 2 290 2 600 1 450 2 650 1 . I would like to obtain one histogram where the data (or the part) of each sex is visible, it is like cumulative histogram or spinogram.

[R] Formula aruguments with NLS and model.frame()

2006-09-15 Thread Joe W. Byers
I could use some help understanding how nls parses the formula argument to a model.frame and estimates the model. I am trying to utilize the functionality of the nls formula argument to modify garchFit() to handle other variables in the mean equation besides just an arma(u,v) specification. My

[R] Grouping columns in a data frame based on the values of a column

2006-09-15 Thread e . rapsomaniki
Dear R users, This is a trivial question, there might even be an R function for it, but I have to do it many times and wonder if there is an efficient for it. Suppose we have a data frame like this: d - data.frame(x=sample(seq(0.1:1, by=0.01), size=100, replace=TRUE), y=rnorm(100, 0.2, 0.6))

[R] R: Grouping columns in a data frame based on the values of a column

2006-09-15 Thread Guazzetti Stefano
Perhaps using 'ave' and 'cut': df - data.frame(x=runif(100, 0.1, 1), y=rnorm(100, 0.2, 0.6)) df$xcut-cut(df$x, seq(0, 1, 0.1)) df$z-ave(df$y, df$xcut) df[order(df$x),] Stefano -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] conto di [EMAIL PROTECTED] Inviato:

[R] question about pairs observations

2006-09-15 Thread Bruno Grimaldo Martinho Churatae
Hi, I would like to paired ID_ with Cod for analysis in spdep. Any ideas? head(bai$att.data) ID_ NAME1_ NAME2_ PARTS_ POINTS_ LENGTH_ AREA_ 1 410690205001 410690205001 NA 1 158 5.243338 1.2668820 2 410690205009 410690205009 NA 1 159 6.071286

[R] prediction interval for new value

2006-09-15 Thread Sachin J
Hi, 1. How do I construct 95% prediction interval for new x values, for example - x = 3? 2. How do I construct 95% confidence interval? my dataframe is as follows : dt structure(list(y = c(2610, 6050, 1620, 3070, 7010, 5770, 4670,

[R] dotplot, dropping unused levels of 'y'

2006-09-15 Thread Benjamin Tyner
In dotplot, what's the best way to suppress the unused levels of 'y' on a per-panel basis? This is useful for the case that 'y' is a factor taking perhaps thousands of levels, but for a given panel, only a handfull of these levels ever present. Thanks, Ben

Re: [R] prediction interval for new value

2006-09-15 Thread David Barron
predict(s.lm,data.frame(x=3),interval=prediction) fit lwr upr [1,] 16073985 -9981352 42129323 predict(s.lm,data.frame(x=3),interval=confidence) fit lwr upr [1,] 16073985 5978125 26169846 On 15/09/06, Sachin J [EMAIL PROTECTED] wrote: Hi, 1.

Re: [R] dotplot, dropping unused levels of 'y'

2006-09-15 Thread Sundar Dorai-Raj
Benjamin Tyner said the following on 9/15/2006 2:36 PM: In dotplot, what's the best way to suppress the unused levels of 'y' on a per-panel basis? This is useful for the case that 'y' is a factor taking perhaps thousands of levels, but for a given panel, only a handfull of these levels

[R] Question about span in Loess function

2006-09-15 Thread Zhou, Yijie
Hi, I want to do 2-dimentional loess smoothing in gam through the command gam(Y~lo(X1,X2,span=span,degree=1) ) in library gam. The span is the percentage of data points to define the neighborhood and used for the smoothing. Does this command do one 2-dimentional smoothing with

Re: [R] prediction interval for new value

2006-09-15 Thread Sachin J
David, Thanks for the quick reply. Just confirming, does predict(s.lm,data.frame(x=3),interval=prediction) gives prediction interval or tolerance interval? Thanks Sachin David Barron [EMAIL PROTECTED] wrote: predict(s.lm,data.frame(x=3),interval=prediction)

Re: [R] dotplot, dropping unused levels of 'y'

2006-09-15 Thread Deepayan Sarkar
On 9/15/06, Benjamin Tyner [EMAIL PROTECTED] wrote: In dotplot, what's the best way to suppress the unused levels of 'y' on a per-panel basis? This is useful for the case that 'y' is a factor taking perhaps thousands of levels, but for a given panel, only a handfull of these levels ever

Re: [R] About truncated distribution

2006-09-15 Thread Jenny Stadt
I resend this to expect more responses. Thanks! Inspired by the responses, I tried to do this analytically. The idea is that truncated mean and standard deviation could be expressed as integral forms. So if given truncated mean, sd and truncated point (mut, sdt, thre), an optim( ) function

[R] Trouble installing modified package

2006-09-15 Thread John Tillinghast
I am updating the CRAN package LMGene, and I'm having trouble installing the new version. I changed the working package name to WLMG so I could use the new version without removing the old version from the R directory. I set up R_LIBS to allow installation in a different directory. When I did R

Re: [R] Rpart, custom penalty for an error

2006-09-15 Thread Maciej Bliziński
On Sun, 2006-09-10 at 20:36 +0100, Prof Brian Ripley wrote: I am however interested in areas where the probability of success is noticeably higher than 5%, for example 20%. I've tried rpart and the weights option, increasing the weights of the success-observations. You are 'misleading'

[R] Periodogram of Schuster

2006-09-15 Thread Guillaume Blanchet
Dear All, Is there a function in R which can do a periodogram of Schuster ? Thanks in advance ! Guillaume Blanchet __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] LARS for generalized linear models

2006-09-15 Thread Ravi Varadhan
Hi, Is there an R implementation of least angle regression for binary response modeling? I know that this question has been asked before, and I am also aware of the lasso2 package, but that only implements an L1 penalty, i.e. the Lasso approach. Madigan and Ridgeway in their discussion

Re: [R] LARS for generalized linear models

2006-09-15 Thread Marc Schwartz
On Fri, 2006-09-15 at 18:49 -0400, Ravi Varadhan wrote: Hi, Is there an R implementation of least angle regression for binary response modeling? I know that this question has been asked before, and I am also aware of the lasso2 package, but that only implements an L1 penalty, i.e. the Lasso

[R] regarding chaos

2006-09-15 Thread gyadav
hi all, I have a simple question that does power spectral analysis related to capacity dimension, information dimension, lyapunov exponent, hurst exponent. If yes then please show me the way. I am newbie in the world of chaos. Sayonara With Smile With Warm Regards :-) G a u r a v Y