Re: [R] Forming Portfolios for Fama / French Regression

2010-01-12 Thread jude.ryan
Kai, Your question is best addressed to "r-sig-fina...@stat.math.ethz.ch" as it is finance related question. Jude ___ Jude Ryan Director, Client Analytical Services Strategy & Business Development UBS Financial Services Inc. 1200 Harbor Boulevard,

Re: [R] Bhattacharyya distance metric

2009-11-09 Thread jude.ryan
The Bhattacharyya distance is different from the Mahalanobis distance. See: http://en.wikipedia.org/wiki/Bhattacharyya_distance There is also the Hellinger Distance and the Rao distance. For the Rao distance, see: http://www.scholarpedia.org/article/Fisher-Rao_metric Jude __

Re: [R] compute differences

2009-09-23 Thread jude.ryan
Thanks Petr! It is good to see multiple solutions to the same problem. Best, Jude -Original Message- From: Petr PIKAL [mailto:petr.pi...@precheza.cz] Sent: Wednesday, September 23, 2009 10:59 AM To: Ryan, Jude Cc: alxmil...@yahoo.it; r-help@r-project.org Subject: Re: [R] compute differe

Re: [R] compute differences

2009-09-23 Thread jude.ryan
Alessandro Carletti wrote: Hi, I have a problem. I have a data frame looking like: ID val A? .3 B? 1.2 C? 3.4 D? 2.2 E? 2.0 I need to CREATE the following TABLE: CASE?? DIFF A-A??? 0 A-B??? -0.9 A-C??? -3.1 A-D??? -1.9 A-E??? -1.7 B-A??? ... B-B??? ... B-C B-D

Re: [R] Recursive partitioning algorithms in R vs. alia

2009-06-23 Thread jude.ryan
Thanks for your point of view Terry! It is always fascinating to follow the history of the field, especially as told by someone involved with it. Jude Ryan -Original Message- From: Terry Therneau [mailto:thern...@mayo.edu] Sent: Tuesday, June 23, 2009 9:22 AM To: Ryan, Jude; c...@datanal

Re: [R] Recursive partitioning algorithms in R vs. alia

2009-06-22 Thread jude.ryan
I have used all 3 packages for decision trees (SAS/EM, CART and R). As another user on the list commented, the algorithms CART uses are proprietary. I also know that since the algorithms are proprietary, the decision tree that you get from SAS is based on a "slightly different" algorithm so as to n

Re: [R] Problem in 'Apply' function: does anybody have other solution

2009-06-18 Thread jude.ryan
Thanks! I did not look at the output of str(df) closely. Since y is defined as a character variable when df is created (but stored as a factor), it looks like str(df) is sorting the factors, at least when it is displayed to the screen. Jude -Original Message- From: David Winsemius [mailto

Re: [R] Problem in 'Apply' function: does anybody have other solution

2009-06-18 Thread jude.ryan
David Winsemius' solution: > apply(data.matrix(df), 1, I) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] x12345678910 y13456789 10 2 For y and [,2] above the value is 3. Why is the value not 2? It look

Re: [R] Inf in nnet final value for validation data

2009-06-11 Thread jude.ryan
Andrea, You can calculate predictions for your validation data based on nnet objects using the predict function (the predict function can also be used for regressions, quantile regressions, etc.) If you create a neural net with the following code: library(nnet) # 3 hidden neurons, for

[R] Comparing R and SAs

2009-06-10 Thread jude.ryan
Satish, For a comparison of SAS and S, see the document "An Introduction to S and the Hmisc and Design Libraries" by Carlos Alzola and Frank E. Harrell. Frank Harrell is an expert in both SAS and R. You can download this document from http://www.r-project.org/, then click on manuals, and then c

Re: [R] warning message when running quantile regression

2009-06-02 Thread jude.ryan
Thanks Rongui! I wasn't aware of this FAQ page. I will look at that page. Jude -Original Message- From: Ronggui Huang [mailto:ronggui.hu...@gmail.com] Sent: Monday, June 01, 2009 10:11 PM To: Ryan, Jude Cc: r-help@r-project.org Subject: Re: [R] warning message when running quantile regre

[R] warning message when running quantile regression

2009-05-31 Thread jude.ryan
Hi All, I am running quantile regression in a "for loop" starting with 1 variable and adding a variable at a time reaching a maximum of 20 variables. I get the following warning messages after my "for" loop runs. Should I be concerned about these messages? I am building predictive models and a

Re: [R] Backpropagation to adjust weights in a neural net when receiving new training examples

2009-05-29 Thread jude.ryan
Not that I know of. If you do come across any, let me know, or better still, email r-help. Good luck with what you are trying to do. Jude Ryan From: Filipe Rocha [mailto:filipemaro...@gmail.com] Sent: Friday, May 29, 2009 1:17 PM To: Ryan, Jude Cc: r-hel

Re: [R] Backpropagation to adjust weights in a neural net when receiving new training examples

2009-05-29 Thread jude.ryan
You can figure out which weights go with which connections with the function summary(nnet.object) and nnet.object$wts. Sample code from Venables and Ripley is below: # Neural Network model in Modern Applied Statistics with S, Venables and Ripley, pages 246 and 247 > library(nnet) > attach(roc

Re: [R] Neural Network resource

2009-05-28 Thread jude.ryan
The package AMORE appears to be more flexible, but I got very poor results using it when I tried to improve the predictive accuracy of a regression model. I don't understand all the options well enough to be able to fine tune it to get better predictions. However, using the nnet() function in packa

[R] mathematical model/equations for neural network in library(nnet)

2009-05-14 Thread jude.ryan
Hi All, I am trying to manually extract the scoring equations for a neural network so that I can score clients on a system that does not have R (mainframe using COBOL). Using the example in Modern Applied Statistics with S (MASS), by Venables and Ripley (VR), pages 246 and 247, I ran the follo

[R] How do I extract the scoring equations for neural networks and support vector machines?

2009-05-12 Thread jude.ryan
Sorry for these multiple postings. I solved the problem using na.omit() to drop records with missing values for the time being. I will worry about imputation, etc. later. I calculated the sum of squared errors for 3 models, linear regression, neural networks, and support vector machines. This

[R] FW: neural network not using all observations

2009-05-12 Thread jude.ryan
As a follow-up to my email below: The input data frame to nnet() has dimensions: > dim(coreaff.trn.nn) [1] 50888 And the predictions from the neural network (35 records are dropped - see email below for more details) has dimensions: > pred <- predict(coreaff.nn1) > dim(pred)

[R] neural network not using all observations

2009-05-12 Thread jude.ryan
I am exploring neural networks (adding non-linearities) to see if I can get more predictive power than a linear regression model I built. I am using the function nnet and following the example of Venables and Ripley, in Modern Applied Statistics with S, on pages 246 to 249. I have standardized vari

[R] reading version 9 SAS datasets in R

2008-12-03 Thread jude.ryan
Hi, I am trying to read a SAS version 9.1.3 SAS dataset into R (to preserve the SAS labels), but am unable to do so (I have read in a CSV version). I first created a transport file using the SAS code: libname ces2 'D:\CES Analysis\Data'; filename transp 'D:\CES Analysis\Data\fadata.xpt';