[R] R newbie question

2004-03-04 Thread Michael
ough blue, green, red, orange, yellow & white. Many thanks & please feel free to reply directly to my email ([EMAIL PROTECTED]) Michael Hopkins _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

Re: [R] how to clear screen in R-console?

2006-02-16 Thread Michael
Screen <- function(...) cat("\033[2J") > > Some links: > http://www.fh-jena.de/~gmueller/Kurs_halle/esc_vt100.html > http://en.wikipedia.org/wiki/VT100 > > Note, this is not guaranteed to work everywhere. To the best of my > knowledge, you will not be able to do an

[R] How to change the number of bins in "hist" function?

2006-02-16 Thread Michael
Hi all, I am doing histogram using the "hist" function. For some reason, the histogram does not look good... is there a way I can change the number of bins, and/or change the way that data gets binned... so that I can obtain a better looking histogram? Thanks a lot! [[alternative HTML ve

[R] how to directly print plots to printer?

2006-02-16 Thread Michael
Hi all, How do I directly send plots to printer, instead of showing them on the screen device? That's to say, with my current code for ploting on screen device, how to modify a few lines to send automatically the plots to the printer? If that's not doable in R, could it be possible to automatica

Re: [R] how to directly print plots to printer?

2006-02-16 Thread Michael
the.other.thing) dev.off() On 2/16/06, Michael <[EMAIL PROTECTED]> wrote: > > Hi all, > > How do I directly send plots to printer, instead of showing them on the > screen device? > > That's to say, with my current code for ploting on screen device, how to > modify

[R] need a R-code formatter?

2006-02-20 Thread Michael
locks with different layers, this editor does not help me beautify the code... I am looking for some editor with better debugging support and with a R-code formatter? Thanks a lot! Michael. [[alternative HTML version deleted]] __ R

[R] how to close all windows?

2006-02-20 Thread Michael
Hi all, I have 10+ graphic windows and 10+ R help window opening now... How do I close them all at once? Thanks a lot! [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] question about Principal Component Analysis in R?

2006-02-27 Thread Michael
Hi all, I am wondering in R, suppose I did the principal component analysis on training data set and obtain the rotation matrix, via: > 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=FALS

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

2006-02-27 Thread Michael
Hi all, Could anybody recommend some easy-to-understand and example based notes/tutorials on how to use cubic splines to do filtering on multi-dimension data? I am confused by the 1-dimensional case, and more confused by multi-dimensional case. I found all the books suddenly become very abstract

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

2006-02-27 Thread Michael
, last but not least: Probably you need some statistical > backaground on spline fitting.. > Please, read some statistical papers/books on such topic (for instance > see references in packages splines, mgcv) > > best, > vito > > Michael wrote: > > Hi all, > > > &g

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

2006-02-27 Thread Michael
you have a hard time understanding what you read in books, it's > unrealistic to expect a mailing list about a software to teach you. > > Andy > > From: Michael > > > > Have you seen an example on how to do it in R? I found no practical > > examp

[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
Get a copy of > Prof. Harrell's Regression Modeling Strategies, and read it over and > over until you can memorize it backward. > > Andy > > -Original Message- > *From:* Michael [mailto:[EMAIL PROTECTED] > *Sent:* Monday, February 27, 2006 5:31 PM > *To:* Liaw, A

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

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

2006-03-01 Thread Michael
e: > > You might find > http://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf<http://www.csie.ntu.edu.tw/%7Ecjlin/papers/guide/guide.pdf> > helpful. > > > Parameter tuning is essential for avoiding overfitting. > > Andy > > -Original Message- >

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

2006-03-01 Thread Michael
ndy > > -Original Message- > *From:* Michael [mailto:[EMAIL PROTECTED] > *Sent:* Wednesday, March 01, 2006 3:59 AM > *To:* Liaw, Andy > *Cc:* R-help@stat.math.ethz.ch > *Subject:* Re: [R] does svm have a CV to obtain the best "cost" parameter? > > Thanks

[R] is there a way to let R do smart matrix-vector operation?

2006-03-06 Thread Michael
Hi all, I want to substract vector B from A's each column... how can R do that smartly without a loop? > A=matrix(c(2:7), 2, 3) > A [,1] [,2] [,3] [1,]246 [2,]357 > B=matrix(c(1, 2), 2, 1) > B [,1] [1,]1 [2,]2 > A-B Error in A - B : non-conformable arrays

Re: [R] is there a way to let R do smart matrix-vector operation?

2006-03-06 Thread Michael
hendieck <[EMAIL PROTECTED]> wrote: > > The following are nearly identical to what others have already > written but just in case: > > A - c(B) > > or > > A - B[,1] > > or if B were already a vector, b, in the first place, rather than a > matrix: >

[R] returning the largest element in an array/matrix?

2006-03-06 Thread Michael
Hi all, I want to use "which.max" to identify the maximum in a 2D array/matrix and I want "argmin" and return the row and column indices. But "which.max" only works for vector... Is there any convinient way to solve this problem? Thanks a lot! [[alternative HTML version deleted]]

Re: [R] returning the largest element in an array/matrix?

2006-03-06 Thread Michael
l <- which(apply(mat==max(mat),2,sum)!=0) > > > Michael a écrit : > > >Hi all, > > > >I want to use "which.max" to identify the maximum in a 2D array/matrix > and I > >want "argmin" and return the row and column indices. > &

Re: [R] returning the largest element in an array/matrix?

2006-03-07 Thread Michael
I think this is the best solution! Thank you! On 3/7/06, Petr Pikal <[EMAIL PROTECTED]> wrote: > > Hi > > If you do not insist on which.max() you can use > > which(mat==max(mat), arr.ind=T) > > HTH > Petr > > > > > On 6 Mar 2006 at 20:55, Michael wr

[R] how to use the rpart function?

2006-03-07 Thread Michael
Hi all, What parameter do I normally change in the rpart function? How do I set the "cp" option? Is there a way to read off error rate directly from the "rpart" function for training data; I imagine for testing data I have to apply a "predict", but for training data I guess the error count wo

[R] how to use the randomForest and rpart function?

2006-03-07 Thread Michael
Hi all, I am trying to play around with the randomForest function for classification. I know its performance is great. I am currently using the default options. It has many options. How do I further tweak the options so that I can make its performance even better? What are the options that are

Re: [R] how to use the randomForest and rpart function?

2006-03-07 Thread Michael
When I plot the randomForest object, it shows a graph with 3 lines, green, red and black, what's the meaning of these three lines? On 3/7/06, Michael <[EMAIL PROTECTED]> wrote: > > Hi all, > > I am trying to play around with the randomForest function for > classificati

Re: [R] how to use the randomForest and rpart function?

2006-03-07 Thread Michael
help page. > > Andy > > From: Michael > > > > When I plot the randomForest object, it shows a graph with 3 > > lines, green, red and black, what's the meaning of these three lines? > > > > On 3/7/06, Michael <[EMAIL PROTECTED]> wrote: > > &

Re: [R] how to use the randomForest and rpart function?

2006-03-08 Thread Michael
Wow, I didn't know that. That's great! He the man! On 3/8/06, Carlos Ortega <[EMAIL PROTECTED]> wrote: > > Hello Michael, > > Just a few words about you phrase "Do you know?"... > > Andy Liaw, is the creator and maintainer of the randomForest package.

Re: [R] how to use the randomForest and rpart function?

2006-03-08 Thread Michael
Thanks a lot Joe! I will take a further look at the article... On 3/8/06, Joseph Retzer <[EMAIL PROTECTED]> wrote: > > Hi Michael, > I've looked into this a bit and the only parameter that seems to be > suggested (by Brieman and a Salford Systems white paper) as one whi

Re: [R] how to use the randomForest and rpart function?

2006-03-08 Thread Michael
Hi Andy, Does the randomForest have a Cross Validation built-in to decide what is the best number of trees or I have to find the best number manually by myself? Thanks a lot! Michael. On 3/7/06, Liaw, Andy <[EMAIL PROTECTED]> wrote: > > Yes, I do know. That's why I p

Re: [R] how to use the rpart function?

2006-03-08 Thread Michael
I see! So you mean I have to collect error counts myself manually... By the way, what parameters do I normally change to improve the default rpart performance? Thanks a lot! On 3/8/06, Carlos Ortega <[EMAIL PROTECTED]> wrote: > > Hello Michael, > > In some of the examples in

[R] what's wrong with my "cov"?

2006-03-09 Thread Michael
Hi all, Why cov(y, y) only gives one value, and cov(t(y), t(y)) gives 3x3 NA matrix? Here my y is listed below and it is a 3x1 matrix. I am expecting that if I have a random vector y=[y1 y2 y3]', here " ' " denotes a transposition so that y is a column vector, where y1, y2, y3 are independent r

Re: [R] what's wrong with my "cov"?

2006-03-10 Thread Michael
Hi Pete, Thanks for your help! But I don't understand your answer... could you please elaborate more? thanks, M On 10 Mar 2006 09:32:12 +0100, Peter Dalgaard <[EMAIL PROTECTED]> wrote: > > Michael <[EMAIL PROTECTED]> writes: > > > Hi all, > > > > Why

[R] what is the function in R for MARS and PRIM?

2006-03-10 Thread Michael
thanks a lot! [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] is there a formatted output in R?

2006-03-10 Thread Michael
something like "sprintf" in C? so I can do: print(sprintf("the correct result is %3.4f\n", myresult)); --- Also, I am desperately looking for a "clear console screen" function in R... thanks a lot! [[alternative HTML version deleted]]

Re: [R] is there a formatted output in R?

2006-03-10 Thread Michael
Oh yeah, it worked... I got it typed wrong in R console... that's why... but why is cat() preferred? On 3/10/06, Thomas Lumley <[EMAIL PROTECTED]> wrote: > > On Fri, 10 Mar 2006, Michael wrote: > > > something like "sprintf" in C? > > > > so I c

Re: [R] how to use the randomForest and rpart function?

2006-03-10 Thread Michael
Thanks a lot Andy, Do I need to have centering and scaling before sending data into rpart and randomForest? I knew for LDA and QDA, it does not matter... And for ridge, it matters; Thanks a lot! Michael. On 3/8/06, Liaw, Andy <[EMAIL PROTECTED]> wrote: > > The algorithm h

Re: [R] is there a formatted output in R?

2006-03-10 Thread Michael
4") > invisible(wsh) > } > cls() # test > > On 2/17/06, Gabor Grothendieck wrote: > *> Here is a translation of Norm Olsen's vbscript code into pure R. * > *> This is intended for use with the Windows Rgui interface. * > > > > > On 3/10/06,

[R] weird! QDA does not depend on priors?

2006-03-10 Thread Michael
Hi all, If I run LDA on the same data (2-class classification) with default(no priors specified in the lda function) vs. "prior=c(0.5, 0.5)", the results are different. The (0.5, 0.5) priors give better 1-classify-to-1 rate, and the proportional priors(default, no priors specified in the lda func

Re: [R] weird! QDA does not depend on priors?

2006-03-11 Thread Michael
1 0 0.72286541 0.27713459 1 0.05119826 0.94880174 On 3/11/06, Uwe Ligges <[EMAIL PROTECTED]> wrote: > > Michael wrote: > > > Hi all, > > > > If I run LDA on the same data (2-class classification) with default(no > > priors specified in the lda function)

Re: [R] is there a formatted output in R?

2006-03-11 Thread Michael
gement that I can call "clearscreen" function from anywhere as long as its in path? On 3/11/06, Gavin Simpson <[EMAIL PROTECTED]> wrote: > > On Fri, 2006-03-10 at 22:50 -0800, Michael wrote: > > Great! It worked! Thank you so much! > > > > Now since it worked gr

Re: [R] is there a formatted output in R?

2006-03-11 Thread Michael
y, I just put the functions in a file called '.Rprofile' in put > startup directory to have it loaded at the beginning. > > > On 3/11/06, Michael <[EMAIL PROTECTED]> wrote: > > > > Thank you for your reminder! > > > > I think you don't

Re: [R] how to use the rpart function?

2006-03-11 Thread Michael
Yes, rpart.control() has a bunch of parameters... I don't know which one can mostly improve the classification performance. On 3/9/06, Carlos Ortega <[EMAIL PROTECTED]> wrote: > > Hello, > > Yes, check rpart.control() for details. > > Regards, > Carlos. &

Re: [R] weird! QDA does not depend on priors?

2006-03-11 Thread Michael
This is very weird. Is this a bug in MASS QDA? On 3/11/06, Michael <[EMAIL PROTECTED]> wrote: > > Yes, I am using the MASS qda... How do I know which version is my MASS? I > should be using the latest one, since I constantly update my packages from > mirror site USA C

Re: [R] how to use the rpart function?

2006-03-11 Thread Michael
by rpart.control(). On 3/11/06, Michael <[EMAIL PROTECTED]> wrote: > > Yes, rpart.control() has a bunch of parameters... > I don't know which one can mostly improve the classification performance. > > > On 3/9/06, Carlos Ortega <[EMAIL PROTECTED]> wrote: &g

[R] GAM using R tutorials?

2006-03-14 Thread Michael
titled: GAM: an introduction using R. Unfornately our local library does not have it... so that's not an option given time constraint. Thanks a lot for your pointers! Michael. [[alternative HTML version deleted]] __ R-help@stat.math.et

[R] click on graph and select data points?

2006-03-15 Thread Michael
me, but is there any most convinient method for this?) thanks a lot! Michael. [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http

[R] how to use the result of hclust?

2006-03-15 Thread Michael
Hi all, Does hclust provide concrete clustered results? I could not see how to use it to make 6 clusters... and it does not give the 6 cluster labels... How to use the result of hclust? thanks a lot, Michael. [[alternative HTML version deleted

Re: [R] GAM using R tutorials?

2006-03-16 Thread Michael
o show off that you are an experienced user and for newbie your first response is always something like scolding: "why didn't you search?" I strongly believe that your answer is inappropriate!!! On 3/15/06, Gavin Simpson <[EMAIL PROTECTED]> wrote: > > On Tue, 2006-03-1

Re: [R] GAM using R tutorials?

2006-03-16 Thread Michael
Hi Templ, That's very helpful! Indeed I've printed out the gam portion and I am digesting now... Thank you so much! I really appreicate your constructive and helpful advice! Best, Michael. On 3/15/06, TEMPL Matthias <[EMAIL PROTECTED]> wrote: > > Have you looked at: &

[R] Did I use "step" function correctly? (Is R's step() function reliable?)

2006-03-16 Thread Michael
a cross validation. Is there an automatic Cross Validation inside "step" or "gam"? Is "step" function result reliable? Or perhaps I used it incorrectly? Thanks a lot, Michael. -- > > mygam1=gam(col1 ~ col2 + col3 + col4 + s(col2, 3)

Re: [R] Did I use "step" function correctly? (Is R's step() functionreliable?)

2006-03-16 Thread Michael
racy due to penalization > of outliers. Following that, > I would disregard RSS and go according to what AIC tells me. > > I don't think you have used step.gam incorrectly, but I think you have > been > observant enough to > realize not all statistical tools agree all th

Re: [R] Did I use "step" function correctly? (Is R's step() functionreliable?)

2006-03-16 Thread Michael
) + s(col2, 3) + s(col3, 3) Step: AIC= 153.49 col1 ~ col2 + col3 + col4 + s(col2, 2) + s(col3, 2) + s(col4, 2) + s(col2, 3) Step: AIC= 154.31 col1 ~ col2 + col3 + col4 + s(col2, 2) + s(col3, 2) + s(col4, 2) On 3/16/06, Michael <[EMAIL PROTECTED]> wrote: > > Hi L.

Re: [R] Did I use "step" function correctly? (Is R's step() functionreliable?)

2006-03-17 Thread Michael
gible and > workable suggestion. > > > > > - Original Message - > *From:* Michael <[EMAIL PROTECTED]> > *To:* Dr L. Y Hin <[EMAIL PROTECTED]> > *Cc:* R-help@stat.math.ethz.ch > *Sent:* Friday, March 17, 2006 3:17 PM > *Subject:* Re: [R] Did I use &quo

[R] Explore regression models using R?

2006-04-19 Thread Michael
Hi all, Looking at my data, I decided to try exploring regression models. Is there a function in R that allows me to automatically explore the universe of (almost all) the possible regression models? Do general additive models belong to the category of regression models? Is there a function in R

[R] there is no "xls" reader in R?

2006-04-19 Thread Michael
Currently I have to convert all my "xls" into "csv" before I can read it in and process the excel data in R... Is there a way to directly read in "xls" data? Thanks a lot! [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailin

[R] Bootstrap error message: Error in statistic(data, original, ...) : unused argument(s) ( ...)

2006-04-20 Thread Michael
Dear colleagues, I've been swamped and fighting with error for a few hours but still desperately having absolutely no clue: What's wrong with my bootstraping code? Thanks a lot! Error Message: > bootResults=boot(X, myFun, R=1); Error in statistic(data, original, ..

Re: [R] Bootstrap error message: Error in statistic(data, origina l, ...) : unused argument(s) ( ...)

2006-04-20 Thread Michael
btw, if you change "myFun" to any R internal function, such as "cov", or "corr", it can run successfully... On 4/20/06, Michael <[EMAIL PROTECTED]> wrote: > > Andy, > > I've noticed there should be a "weight" or "frequency&q

[R] where is the fitted value of autoregressive AR function in R?

2006-04-21 Thread Michael
> myAR3=ar(mytimeseries, FALSE, 3); > print(myAR3); Call: ar(x = mytimeseries, aic = FALSE, order.max = 3) Coefficients: 123 0.9220 0.0039 -0.1314 names(myAR) [1] "order""ar" "var.pred" "x.mean" "aic" [6] "n.used" "order.max""partiala

[R] question in fitting AR model in time series?

2006-04-21 Thread Michael
How to force some AR coefficients to be ZERO and only allow the function "ar" in R to change the other coefficients? Thanks a lot! [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listin

[R] What are the differences between ACF and PACF in time series analysis?

2006-04-26 Thread Michael
Hi all, I am desperately looking for answer to my previous question: what are the differences between ACF and PACF in time series and their applications? I got confused a lot by these two functions in R... Already having ACF, why do people decide to create PACF? Thanks a lot [[alternativ

[R] reducing learning curves?

2006-01-25 Thread Michael
you please recommend some good addon/plugins that have the above features? Could you please also suggest some tips/tools/tricks that can help me reduce the learning curve? Thank you very much! Michael. [[alternative HTML version deleted]] __

[R] What's wrong with JGR?

2006-01-26 Thread Michael
home())) : RcallStaticMethod: cannot find specified class Error in library(pkg, character.only = TRUE) : .First.lib failed for 'JGR' What's wrong? Thanks a lot! Michael. [[alternative HTML version deleted]] ___

[R] What's wrong with Rcmdr?

2006-01-26 Thread Michael
ole, every first time I load "Rcmdr", it starts! But not second, third time... What's wrong with it? Thanks a lot! Michael. [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailma

Re: [R] What's wrong with Rcmdr?

2006-01-26 Thread Michael
> Commander() Error: couldn't find function "Commander" On 1/26/06, Stefano Calza <[EMAIL PROTECTED]> wrote: > > Try using > > Commander() > > but, obviously, the first time. > > HIH, > Ste > > On Thu, Jan 26, 2006 at 01:11:23AM -0800, Mic

[R] Re: reducing learning curves?

2006-01-26 Thread Michael
btain help. But this is troublesome, does any editor offer online-help for commands, so I just need to hover my mouse on "abline" and then press F1 key then a help window will open automatically? Thanks a lot! On 1/25/06, Michael <[EMAIL PROTECTED]> wrote: > > Hi all, > >

Re: [R] What's wrong with Rcmdr?

2006-01-26 Thread Michael
thanks everyone, another problem is I cannot load Rcmdr at all in SCIView... what might be the problem? On 1/26/06, John Fox <[EMAIL PROTECTED]> wrote: > > Dear Michael, > > To elaborate slightly: You can't load the same package twice in an R > session. As mentioned, u

Re: [R] What's wrong with JGR?

2006-01-26 Thread Michael
th [1] "12" $day [1] "20" $"svn rev" [1] "36812" $language [1] "R" On 1/26/06, Michael <[EMAIL PROTECTED]> wrote: > > Here is mine. What might be wrong? > > > R.Version() > $platform > [1] "i386-pc-mingw32&quo

[R] why did not data.table work?

2006-01-26 Thread Michael
Hi all, I am wondering what's wrong with my following code? x=read.table('c:\\.txt'); Error in file(file, "r") : unable to open connection In addition: Warning message: cannot open file 'c:\.txt', reason 'No such file or directory' what's wrong? Thanks [[alternative HTML vers

Re: [R] why did not data.table work?

2006-01-27 Thread Michael
this instead: > > x <- read.table(file.choose()) > > and then use the resulting GUI to locate the file. > > > On 1/27/06, Michael <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > I am wondering what's wrong with my following code? > > >

[R] What does this command "~" mean?

2006-01-28 Thread Michael
Hi all, I am reading books and tutorials about R. I don't understand the following: plot(salary~rank, data=salary) plot(Ozone~date, data=airquality) I don't understand what does "~" here, and how can plot() have a input argument called "data"... I have looked it up in "plot"'s help but I could

[R] SoS! How to predict new values using linear regression models?

2006-01-29 Thread Michael
Hi all, After trial and error by myself for a few hours, I decide to ask for your help. I have a training set which is a matrix of size 200 x 2, where the two columns denote each independent variable. I have 200 observations. - ss=data.frame(trainingSet); result=lm(trainingClass~

[R] How to add two different axis to one plot?

2006-01-29 Thread Michael
Hi all, I need to put two different axis to one plot. On the top of the plot, I need to put one axis, with increments from left side to the right side; then at the bottom of the same plot, I need to put another axis, with increments from right side to the left side and showing a different unit. Ho

[R] Help! What does this R command mean?

2006-01-29 Thread Michael
Hi all, R is so difficult. I am so desperate. What does the ":" mean in the following statement? What does the "[, -1]" mean? > > # Leaps takes a design matrix as argument: throw away the intercept > # column or leaps will complain > > X <- model.matrix(lm(V ~ I + D + W +G:I + P + N, election.t

Re: [R] How to add two different axis to one plot?

2006-01-29 Thread Michael
; > between the plot statements, thus: > > plot(x1, y1, etc ...) > par(new=TRUE) > plot(x2, y2, etc ...) > > > > Andrew > > On Mon, January 30, 2006 2:49 pm, Michael said: > > Hi all, > > > > I need to put two different axis to one plot. On the top

Re: [R] Help! What does this R command mean?

2006-01-29 Thread Michael
olumn. > 2. go to: >http://cran.r-project.org/other-docs.html > and read your choice of documents. > 3. print out this reference card and keep it handy: > http://www.rpad.org/Rpad/R-refcard.pdf > > On 1/29/06, Michael <[EMAIL PROTECTED]> wrote: > > Hi all, &g

[R] matlab-like constant matrix initialization?

2006-01-30 Thread Michael
Hi all, Suppose I have the following matrix which is a constant matrix I've copied from some other document: 1.2 3.4 1.4 ... 2.3 3.7 2.6 ... ... How do I make it into a matrix or array in R? What is the fastest way of initializing a constant matrix with this copy/pasted values? Thanks a lot!

Re: [R] matlab-like constant matrix initialization?

2006-01-30 Thread Michael
you mean they are in the clipboard in the format shown? > If that is the case then do this: > > as.matrix(read.table("clipboard")) > > > On 1/30/06, Michael <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > Suppose I have the following matrix

Re: [R] matlab-like constant matrix initialization?

2006-01-30 Thread Michael
No I don't want to adapt them manually by adding "," and format them by hand... that's tedious and daunting... you cannot just paste it, you have to adapt it either like this > > x <- matrix( c( 1.2, 3.4, 1.4, > 2.3, 3.7, 2.6 ), > nrow = 2, byrow = TRUE) >

[R] Sos! "Lines" doesn't add plots to an existing plot...

2006-01-30 Thread Michael
I am lost: > plot(testError, col="red") > lines(testVar, col="black") Only one plot (the red one) appear on the Window, the black line did not appear...what's wrong? Thanks a lot! [[alternative HTML version deleted]] __ R-help@stat.math.ethz.

[R] How to force a vector to be column or row vector?

2006-02-01 Thread Michael
Hi all, I tended to use rbind, or cbind to force a vector be be deemed as a column or row vector. This is very important if I want to do things like u' * A * u, where u' is a row vector and u is a column vector, regardless of what originall format the "u" is... I want to recast it to column vecto

[R] is there a way to visualize 3D normal distributions?

2006-02-02 Thread Michael
Hi all, How do I visualize a contour of a tri-variate normal distribution? I just like to see the ellipsoid very much. I hope there is a easy way or existing method in R. Thank you a lot! Michael. [[alternative HTML version deleted]] __ R

Re: [R] is there a way to visualize 3D normal distributions?

2006-02-02 Thread Michael
shape3d only gives rigid sphere... not the free form ellipsoid that I want... On 2/2/06, Ben Bolker <[EMAIL PROTECTED]> wrote: > > Duncan Murdoch stats.uwo.ca> writes: > > > > > On 2/2/2006 3:39 AM, Michael wrote: > > > Hi all, > > > > >

Re: [R] is there a way to visualize 3D normal distributions?

2006-02-02 Thread Michael
Thanks a lot John. Thanks a lot everybody! I guess that I just need an ellipsoid, not contour... in 3D, ... How do I do that most conviniently and efficiently given that I have the covarance matrix for the gaussian density... On 2/2/06, John Fox <[EMAIL PROTECTED]> wrote: > >

[R] R command line: need intelligent command history recall?

2006-02-04 Thread Michael
Hi all, I am not sure if this feature exists in the R-console command line prompt: In Matlab, if I want to enter a command which is similar to what I have entered before, I can enter a few prefix, then press "->", the previous command that matches with this prefix will then appear on this comman

[R] a basic question about standardization?

2006-02-15 Thread Michael
Hi all, I have a question about standardization. Suppose I have training data which is a X matrix, of size N x p, where N is the number of samples, p is the number of variables in the data set. Y is a response vector of size N x 1, each element correspoding to each row of the X matrix. I do stan

[R] How to plot on new windows?

2006-02-16 Thread Michael
Hi all, I am using R-console. However when I do plot(xx, yy), it always overwrites the existing plot window. How can I make it open a new plot window and plot onto the new window? Thanks a lot! [[alternative HTML version deleted]] __ R-help@s

[R] MANOVA: how do I read off within and between Sum-of-Squares info from the manova result?

2006-02-16 Thread Michael
Hi all, I am experimenting the function "manova" in R. I tried it on a few data sets, but I did not understand the result: I used "summary(manova_result)" and "summary(manova_result, test='Wilks')" and they gave a bunch of numbers... But I need the Sum-of-Squares of BETWEEN and WITHIN matrice

[R] how to clear screen in R-console?

2006-02-16 Thread Michael
HI all, How to clear the screen in R-console? Thanks a [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-

Re: [R] how to clear screen in R-console?

2006-02-16 Thread Michael
Any funcation that is callable from my program, instead of pressing keys? Thanks a lot! On 2/16/06, Christian Schulz <[EMAIL PROTECTED]> wrote: > > ctrl - e & l > > >HI all, > > > >How to clear the screen in R-console? > > > >Thanks a [EMAIL PROTECTED] > > > > [[alternative HTML version de

[R] where can I find Durbin-Waston test tables for Confidence Level 2.5% or 0.5%?

2007-03-07 Thread Michael
Hi all, I am doing a two-sided DW test: H0: rho = 0 H1: rho =/= 0 My understanding is that most test statistics tables are one-sided. It's the way they created the table. So from online, by doing Googling, I found a bunch of DW tables for Confidence Level 5%. Those tables can answer my two-sid

[R] good procedure to estimate ARMA(p, q)?

2007-03-07 Thread Michael
Hi all, I have some residuals from regression, and i suspect they have correlations in them... I am willing to cast the correlation into a ARMA(p, q) framework, what's the best way to identify the most suitable p, and q, and fit ARMA(p, q) model and then correct for the correlations in regressio

[R] what's wrong with my "gls"? it does not allocate memory... even for the simplest AR1 model...

2006-05-14 Thread Michael
> myfit1 <- gls(col1 ~ col2+col3+col4+col5+col6-1, data=data2, corr=corAR1( 0.3202), method='ML') Error: cannot allocate vector of size 199712 Kb if I get rid of the "corr=corAR1(0.3202)" option, it works okay... can anybody help me? thanks a lot! [[alternative HTML version deleted]] _

[R] is there a way to find the best ARIMA model automatically in R?

2006-05-15 Thread Michael
I tried to find a function called "bestARIMA" but it did not show up... even on google it does not show up often: I've only found the following link with "bestARIMA" in it: http://sirio.stat.unipd.it/files/ts02-03/tsR.pdf but where is the package and the function in R? [[alternative HTM

[R] everytime I download a new version of R, need I reinstall all packages?

2006-05-16 Thread Michael
Can the packages that I've installed in R 2.2.1 be automatically imported to R 2.3.0? Otherwise it is a hassle everytime I update a new version of R... [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.e

[R] stop current computation does not work?

2006-05-16 Thread Michael
Press "ESC" is supposed to be able to stop the current computation... but often times it does not really work... I had to kill the R process to stop and restart the session... What is a good way to stop/cancel the current computation? [[alternative HTML version deleted]]

Re: [R] everytime I download a new version of R, need I reinstall all packages?

2006-05-16 Thread Michael
uot; - George E. P. Box > > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of Michael > > Sent: Tuesday, May 16, 2006 2:41 PM > > To: R-help@stat.math.ethz.ch > > Subject: [R] everytime I download a new ve

Re: [R] stop current computation does not work?

2006-05-16 Thread Michael
think. > > > -- Bert > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of Michael > > Sent: Tuesday, May 16, 2006 4:04 PM > > To: R-help@stat.math.ethz.ch > > Subject: [R] stop current computation does n

[R] can Box test the Ljung Box test say which ARIMA model is better?

2006-05-16 Thread Michael
two ARIMA models, both have several bars signicant in ACF and PACF plots of their residuals, but when run Ljung Box tests, both don't show any significant correlations... however, one model has p-value that is larger than the other model, based on the p-values, can I say the model with larger p-va

[R] what does it mean when "lm.gls" says that the weight matrix has wrong dimension?

2006-05-16 Thread Michael
If first fit my data column V1 to column V2 using normal "lm" fitting, call it "fit1", then I used "acf(fit1$residuals, type='cov', 40) " function to obtain the autocovariance of the residuals, and then constructed a autocovariance matrix, I chose it to be 40x40. Call this autocovariance matrix

[R] how to multiply a constant to a matrix?

2006-05-23 Thread Michael
This is very strange: I want compute the following in R: g = B/D * solve(A) where B and D are quadratics so they are just a scalar number, e.g. B=t(a) %*% F %*% a; I want to multiply B/D to A^(-1), but R just does not allow me to do that and it keeps complaining that "nonconformable array, et

Re: [R] how to multiply a constant to a matrix?

2006-05-23 Thread Michael
tempt. What you are doing is not really > a matrix computation. > > > Patrick Burns > [EMAIL PROTECTED] > +44 (0)20 8525 0696 > http://www.burns-stat.com > (home of S Poetry and "A Guide for the Unwilling S User") > > Michael wrote: > > >This is very s

  1   2   3   4   5   6   7   8   9   10   >