[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] orderar var.pred x.mean aic [6] n.used order.maxpartialacf resid

[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

[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

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

2006-05-15 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 HTML

[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

[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
: [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 version of R,need I reinstall all packages? Can the packages that I've installed in R 2.2.1 be automatically

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

2006-05-16 Thread Michael
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 not work? Press ESC is supposed to be able to stop the current computation... but often

[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

[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 B,

[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,

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

2006-05-24 Thread Michael
. 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 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

[R] Does R have EGARCH modeling function?

2006-05-24 Thread Michael
I've downloaded fSeries, but looks like it just has an interface to OX(TM) Garch Modeling Software,and that OX(TM) software package is not free. So where can I find an EGARCH function that is truely usable? Thanks a lot! [[alternative HTML version deleted]]

[R] Is there a way to draw 3d plot?

2006-05-26 Thread Michael
Hi all, I have a 2D matrix, which has 100 rows, and 100 columns, I have a 2D matrix, with 100 rows and 100 columns, I want to display it using 3D plot, much like plot3d and mesh/surf functions in matlab. Specifically, in matlab, I just need to do the following: [X,

Re: [R] Is there a way to draw 3d plot?

2006-05-26 Thread Michael
On 5/26/06, Uwe Ligges [EMAIL PROTECTED] wrote: Michael wrote: Hi all, I have a 2D matrix, which has 100 rows, and 100 columns, I have a 2D matrix, with 100 rows and 100 columns, I want to display it using 3D plot, much like plot3d and mesh/surf functions in matlab

[R] why does arima returns NAN standard error?

2006-06-01 Thread Michael
Hi everyone, - Coefficients: ar1 ar2 ma1 ma2sar1 intercept drift 1.5283 -0.7189 -1.9971 0. 0.3982 0.0288 -9e-04 s.e. 0.0869 0.0835 0.0627 0.0627 0.1305NaN NaN sigma^2 estimated as 0.04383: log

[R] predict function does not provide SE estimates for multivariate timeseries VAR models?

2006-06-01 Thread Michael
What can I do? 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] How to request AIC information from lm object?

2006-06-09 Thread Michael
Can lm return AIC information? 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!

[R] What's wrong with JGR?

2006-01-26 Thread Michael
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-help@stat.math.ethz.ch mailing list https://stat.ethz.ch

[R] What's wrong with Rcmdr?

2006-01-26 Thread Michael
, 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/mailman/listinfo/r-help PLEASE do read the posting guide! http

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, Michael wrote: MichaelHi all, Michael MichaelI successfully installed

[R] Re: reducing learning curves?

2006-01-26 Thread Michael
. 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, I am really new to the R language. I am a long time Matlab

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, used Commander() to restart

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

2006-01-26 Thread Michael
Mine. What might be wrong? R.Version() $platform [1] i386-pc-mingw32 $arch [1] i386 $os [1] mingw32 $system [1] i386, mingw32 $status [1] $major [1] 2 $minor [1] 2.1 $year [1] 2005 $month [1] 12 $day [1] 20 $svn rev [1] 36812 $language [1] R On 1/26/06, Michael [EMAIL PROTECTED

[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

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

2006-01-27 Thread Michael
- 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? x=read.table('c:\\.txt'); Error in file(file, r) : unable to open connection In addition: Warning

[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 not

[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);

[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.

[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,

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

2006-01-29 Thread Michael
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, 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

[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

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

2006-01-30 Thread Michael
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 which is a constant matrix I've copied from some other document: 1.2 3.4 1.4 ... 2.3

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) or

[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.ch

[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 vector

[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 murdoch at stats.uwo.ca writes: On 2/2/2006 3:39 AM, Michael wrote: Hi all, How do I visualize a contour of a tri-variate normal distribution

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: Dear Michael, Some

[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 command

[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

[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

[R] need a R-code formatter?

2006-02-20 Thread Michael
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-help

[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,

[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

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

2006-02-27 Thread Michael
statistical papers/books on such topic (for instance see references in packages splines, mgcv) best, vito Michael wrote: 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

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

2006-02-27 Thread Michael
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 examples... On 2/27/06, vito muggeo [EMAIL PROTECTED] wrote: Dear Micheal, the output of the ns function in R

[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
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, Andy *Cc:* vito muggeo; R-help@stat.math.ethz.ch *Subject:* Re: [R] how to use the basis

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] does svm have a CV to obtain the best cost parameter?

2006-03-01 Thread Michael
helpful. Parameter tuning is essential for avoiding overfitting. Andy -Original Message- *From:* Michael [mailto:[EMAIL PROTECTED] *Sent:* Tuesday, February 28, 2006 3:30 PM *To:* Liaw, Andy *Cc:* R-help@stat.math.ethz.ch *Subject:* Re: [R] does svm have a CV to obtain the best cost

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

2006-03-01 Thread Michael
different answers, let alone changing parameters each time. Hoping to narrow the optimal parameters down to that fine a resolution is generally not realistic. Also, there may well be multiple optima in the CV error `surface'. Take your pick. Andy -Original Message- *From:* Michael

[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
[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: b - 1:2 A - b On 3/6/06, Michael [EMAIL PROTECTED] wrote: Hi all

[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
) 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. But which.max only works for vector... Is there any convinient way to solve this problem? Thanks a lot! [[alternative HTML

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 wrote: Date sent: Mon, 6 Mar 2006 20:55:20 -0800

[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 would

[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

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 classification. I know its performance is great

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

2006-03-07 Thread Michael
[EMAIL PROTECTED] wrote: As ?plot.randomForest says, it plots error rates. In addition to overall error rates, it also plots error rates for each class. As to the options in randomForest, read about the options in the help page and the reference linked from the help page. Andy From: Michael

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. He ported the original library of Briemman to R

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 which may have an impact

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 pointed you to the reference

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 the rpart function you

[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

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 cov(y, y) only gives one value, and cov(t(y), t(y

[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 can do: print(sprintf(the correct result is %3.4f\n

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 has something slicker

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

2006-03-10 Thread Michael
Olsen's vbscript code into pure R. * * This is intended for use with the Windows Rgui interface. * On 3/10/06, Michael [EMAIL PROTECTED] wrote: something like sprintf in C? so I can do: print(sprintf(the correct result is %3.4f\n, myresult)); --- Also, I am desperately looking

[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

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

2006-03-11 Thread Michael
0 1 0 0.75248933 0.24751067 1 0.04581006 0.95418994 [1] Proportional Priors QDA: Testing ... 0 1 0 999 383 1 47 871 0 1 0 0.72286541 0.27713459 1 0.05119826 0.94880174 On 3/11/06, Uwe Ligges [EMAIL PROTECTED] wrote: Michael wrote

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

2006-03-11 Thread Michael
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 greatly, how can I put this function into my own library or package, so later on I can call this function from

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

2006-03-11 Thread Michael
'.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 have to tell me to read the document. I have done that many times already. My feeling after reading the creating

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. On 3/9/06, Michael [EMAIL PROTECTED] wrote

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 CA1. Very weird

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

2006-03-11 Thread Michael
/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: Hello, Yes, check rpart.control() for details. Regards, Carlos

[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.ethz.ch

[R] click on graph and select data points?

2006-03-15 Thread Michael
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://www.R-project.org/posting

[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
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-14 at 23:52 -0800, Michael wrote: Hi all, I am trying to use GAM to work on some data... Are there any

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: An Introduction to R

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

2006-03-16 Thread Michael
function result reliable? Or perhaps I used it incorrectly? Thanks a lot, Michael. -- mygam1=gam(col1 ~ col2 + col3 + col4 + s(col2, 3) + s(col3, 3) + s(col4, 3), data=X); mygam2=gam(col1 ~ col2 + col3 + col4 , data=X); mygam3=gam(col1 ~ s(col2, 6) + s(col3, 6) + s

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

2006-03-16 Thread Michael
to realize not all statistical tools agree all the times :) Lin - Original Message - From: Michael [EMAIL PROTECTED] To: R-help@stat.math.ethz.ch Sent: Thursday, March 16, 2006 5:30 PM Subject: [R] Did I use step function correctly? (Is R's step() functionreliable?) Hi all, I put

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.Y, Thank you

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

2006-03-17 Thread Michael
:* 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 step function correctly? (Is R's step() functionreliable?) Hi L.Y, Thank you for your advice. Are you talking about Trevor Hastie's

[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 mailing

[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 somewhere... but my function does not need it. I have tried to cheat it by declareing

[R] R newbie question

2004-03-04 Thread Michael
thanks please feel free to reply directly to my email ([EMAIL PROTECTED]) Michael Hopkins _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/_/ _/_/_/ Hopkins Research Ltd _/_/ _/_/ _/_/_/_/ _/_/_/Virtual

[R] reducing learning curves?

2006-01-25 Thread Michael
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-help@stat.math.ethz.ch mailing

[R] looking for functions that can test/estimate CAMPM, APT, Fama's factor model, etc.

2006-11-12 Thread Michael
Hi all, I am also looking for interesting statistical experiments about testing and estimating CAPM, APT, Fama models, etc. using R using financial series data... please give me some pointers... I have been searching the R archives for the past a few hours and I vaguely got to know that there are

Re: [R] [R-SIG-Finance] looking for functions that can test/estimate CAPM, APT, Fama's factor model, etc.

2006-11-13 Thread Michael
are not very complete I guess.) Thanks a lot Brian and thanks everybody... On 11/13/06, Brian G. Peterson [EMAIL PROTECTED] wrote: On Sunday 12 November 2006 22:41, Michael wrote: I am also looking for interesting statistical experiments about testing and estimating CAPM, APT, Fama

[R] how to compute p-value?

2006-11-14 Thread Michael
Hi all, I just want to understand how R computes p-value in a simple linear regression model? The reason is that in Matlab in the function which evaluate standard errors for multivariate normal regression, it just provide estimates and standard errors, without giving out p-value, It computes

[R] how to create this design matrix?

2006-11-14 Thread Michael
Hi all, I have a multiple-linear regression problem. There are 13 columns of data, the whole data matrix is: n x 13, where n is the number of samples. Now I want to regress EACH of the first 12 columns onto the 13th column, with 2-parameter linear model y_i = b0 + b1 * x_i, where i goes from

  1   2   3   4   5   6   7   8   9   10   >