Re: [R] Modified R Code

2009-12-28 Thread Maithili Shiva
Subject: Re: [R] Modified R Code To: "Maithili Shiva" Cc: r-help@r-project.org Date: Monday, 28 December, 2009, 1:11 PM For your problem A, why do you want to create so many variables?  Leave the data in the 'newrate' list and reference the information from there.  It will be

[R] Modified R Code

2009-12-27 Thread Maithili Shiva
Dear R helpers,   I have following input files. (Actually they are more than 10 rates but here i am considering only 2 rates to write my problem)   rate1.csv min1    max1    min2  max2  min3   max3 1.051.30   1.30  1.65 1

[R] Modified R Code

2009-12-27 Thread Maithili Shiva
Dear R helpers,   I have following input files. (Actually they are more than 10 rates but here i am considering only 2 rates to write my problem)   rate1.csv min1    max1    min2  max2  min3   max3 1.051.30   1.30  1.65 1

Re: [R] Reading Input file

2009-12-26 Thread Maithili Shiva
 Â  10.50   10.50    10.75     Please guide   With regards   Maithili     --- On Sat, 26/12/09, Johannes Signer wrote: From: Johannes Signer Subject: Re: [R] Reading Input file To: "Maithili Shiva" Cc: r-help@r-project.org Date: Saturday, 26 December, 2009, 9:42 AM On

[R] Reading Input file

2009-12-26 Thread Maithili Shiva
Dear R helpers   I have some files in my say 'WORK' directory and the file names are say rate1.csv, rate2.csv, rate3.csv, rate4.csv   Because of some other requirement, I need to run the following commands   n = 4    rates = NULL   for (i in 1:n) rates[i] = (paste(`rate', i, ‘.csv`, se

[R] An unprofessional message

2009-12-24 Thread Maithili Shiva
Dear R helpers,   I understand that this is absolutely unprofessional on my part and this group doesn't entertain such things. I have been associted with this group since last 1 and half years and have been immensely benefited by the noble service rendred by many R helpers.   So I take this oppo

[R] Reading multiple Input Files

2009-12-20 Thread Maithili Shiva
Dear R helpers,   Suppose I am dealing with no of interest rates at a time and the no of interest rates I am selecting for my analysis is random i.e. it can be 2, can be 10 or even higher. The R-code I had written (with the guidance of R helpers obviously and I am really grateful to all of you)

[R] CORRECTION - Generation of Random numbers in a loop

2009-12-16 Thread Maithili Shiva
Dear R helpers, please ignore my earlier mail. Here is the corrected mail. Please forgive me for the lapses on my part. Extremely sorry.   Here is the corrected mail.     Dear R helpers   I am having following data   Name   Numbers A11  12 A12  17  A13 

[R] Random Number Generation in a Loop

2009-12-16 Thread Maithili Shiva
Dear R helpers   I am having following data   Name   Numbers A  25 B   3  C  13 A   5  B   7 C   0 A   2 B 10 C   9   CONDITIONS   If Name is

[R] Random numbers for a group

2009-12-15 Thread Maithili Shiva
Dear R helpers I have following table Name no_of_instances    AAA                             12                                AA                               17                                A                                  0                              

Re: [R] writing 'output.csv' file

2009-12-04 Thread Maithili Shiva
out further calcualtions on this output file. Please guide.   Regards   Maithili --- On Fri, 4/12/09, Johannes Signer wrote: From: Johannes Signer Subject: Re: [R] writing 'output.csv' file To: "Maithili Shiva" Date: Friday, 4 December, 2009, 10:29 AM Hello, maybe th

[R] writing 'output.csv' file

2009-12-04 Thread Maithili Shiva
Dear R helpers   Suppose   M <- c(1:10)  #  length(M) = 10 N <- c(25:50) #  length(N) = 26    I wish to have an outut file giving M and N. So I have tried   write.csv(data.frame(M, N), 'output.csv', row.names = FALSE)   but I get the following error message   Error in data.frame(M, N) :

[R] Calculation of Central Moments

2009-11-30 Thread Maithili Shiva
Dear R helpers If for a given data, I need to calculate Mean, Standard Deviation, Mode, Median, Skewness, Kurtosis, is there any package in R, which will calculate these moments? Individually I can calculate these, but if there is any function which will calculate these at a stretch, please le

Re: [R] Parameters of Beta distribution

2009-10-07 Thread Maithili Shiva
ate A and B or can I assume A = min(amounts) and B = max(Amounts)   Regards   Maithili       --- On Wed, 7/10/09, Albyn Jones wrote: From: Albyn Jones Subject: Re: [R] Parameters of Beta distribution To: jlu...@ria.buffalo.edu Cc: "Maithili Shiva" , r-help@r-project.org, r-h

[R] Parameters of Beta distribution

2009-10-07 Thread Maithili Shiva
  Supose I have a data pertaining to credit loss as   amounts <- c(46839.50,31177.12,35696.69,21192.57,29200.91,42049.64,42422.19, 44976.18, 32135.36,47936.57,27322.91,37359.09,43179.60, 48381.02, 45872.38, 28057.30,44643.83,36156.33,16037.62, 45432.28)   I am trying to fit Beta distribution (two

Re: [R] Fw: PROBLEM - - COMPARING AND COMBINING two DATASETS

2009-08-27 Thread Maithili Shiva
Dear Sir,   Thanks a lot for your solution and guidance. It worked wonderfully.   Regards   Maithili --- On Thu, 27/8/09, Gabor Grothendieck wrote: From: Gabor Grothendieck Subject: Re: [R] Fw: PROBLEM - - COMPARING AND COMBINING two DATASETS To: "Maithili Shiva" Cc: r-help@r-p

Re: [R] Fw: PROBLEM - - COMPARING AND COMBINING two DATASETS

2009-08-27 Thread Maithili Shiva
y ahead.   With warm regards   Maithili --- On Thu, 27/8/09, David Winsemius wrote: From: David Winsemius Subject: Re: [R] Fw: PROBLEM - - COMPARING AND COMBINING two DATASETS To: "Henrique Dallazuanna" Cc: "Maithili Shiva" , r-help@r-project.org Date: Thursday, 27 August, 20

[R] Fw: PROBLEM - - COMPARING AND COMBINING two DATASETS

2009-08-27 Thread Maithili Shiva
Dear Sirs,   At the outset I sincerely apologize for reproducing my query to you. I also thank all of you for the solution you had provided. It has worked on the actual data I am working with.   However, there is this peculiar problem which I had realized only after I had obtained my

Re: [R] Comparing and adding two data series

2009-08-27 Thread Maithili Shiva
Dear Peter Konings   Thanks a lot for your kind advice. It worked wonderfully.   Thanks again   Regards   Maithili --- On Thu, 27/8/09, Peter Konings wrote: From: Peter Konings Subject: Re: [R] Comparing and adding two data series To: "Maithili Shiva" Date: Thursday, 27 August, 2

Re: [R] Comparing and adding two data series

2009-08-27 Thread Maithili Shiva
Subject: Re: [R] Comparing and adding two data series To: "Maithili Shiva" Date: Thursday, 27 August, 2009, 10:57 AM Try tapply( B, A, sum) On Thu, 27 Aug 2009, Maithili Shiva wrote: > Dear R helpers >   > I have two series A and B as given below - >   > A <- c(2

[R] Comparing and adding two data series

2009-08-27 Thread Maithili Shiva
Dear R helpers   I have two series A and B as given below -   A <- c(2, 2, 1, 3, 7, 3, 3, 1, 14, 7, 31) B <- c(0.0728,0.9538,4.0140,0.0020,2.5593,0.1620,2.513,0.3798, .0033,0.2282, 0.1614)   I need to calculate the total in dataset B corresponding to the numbers in dataset A i.e. for no 1 in A,

[R] Log logistic Distribution - Parameter estimation

2009-08-18 Thread Maithili Shiva
Dear R helpers, I have following data c(19679.50,5975.72,17555.52,20078.08,1956.97,8383.25,7899.27,4881.75,2719.29,11701.96,13104.25,10081.01,9417.72,14976.89,7119.62,8373.56,24580.52,8330..70,9110.07,7848.08,12910.46,10310.53,20390.34,15824.71,21703.33) How do I fit 3 parameter Log Logistic di

[R] lmom - Estimating Normal Distribution Parameters using lmom package

2009-07-21 Thread Maithili Shiva
Dear R helpers,   I have a data of 2102 observations (consisting of 0's also), to which I am trying to fit Normal distribution using "lmom" pacakage. If I use Excel, its easy to estimate the parameters of Normal distribution as simple mean and standard devaition. The results I get if I use teh e

[R] How to write a loop?

2009-05-27 Thread Maithili Shiva
Dear R helpers,   Following is a R script I am using to run the Fast Fourier Transform. The csv files has 10 columns with titles m1, m2, m3 .m10.     When I use the following commands, I am getting the required results. The probelm is if there are 100 columns, it is not wise to define 100 c

[R] (Interpretation) VGAM - FRECHET 3 parameters by maximum likelihood estimation for

2009-03-26 Thread Maithili Shiva
Dear R Helpers This is the R code (which I have slightly changed) I got in VGAM package for estimating the parameters of FRECHET. _ y = rfrechet(n <- 100, shape=exp(exp(0))) #(A) fit3 = vglm(y ~ 1, frechet3(ilocation=0

[R] Generalized Extreme Value Distribution (LMOM package) and Frechet Distribution

2009-03-19 Thread Maithili Shiva
Dear R helpers I have some data and through some other software, it is understood that I can fit the Frechet Distribution to it. However, I need to fit the distribution using R code only. I have searched many R packages and one R helper has suggested some sites too, but unfortunately paramete

[R] Fw: Estimating Parameters of Weibull and Pareto distribution using LMOM package

2009-03-18 Thread Maithili Shiva
Dear R helpers I have r file which estimate the parameters of 3 parameter Weibull - (A) - continuous shape parameter (alpha) - continuous scale parameter (beta) - continuous location parameter (gamma) (B) Also, I have a r file which calculates the parameters of Generaliz

[R] Estimating paramters of "3 Parameter Gamma Distribution"

2009-03-18 Thread Maithili Shiva
Dear R helpers How to estimate teh parameters of 3 Parameter Gamma Distribution. I tried LMOM package but it deals with two parameter GAMMA. Please guide Regards Maithili __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] Three Parameter FRECHET Distribution

2009-03-18 Thread Maithili Shiva
this: > > http://bm2.genes.nig.ac.jp/RGM2/R_current/library/evd/man/frechet.html > > HTH, > > Jorge > > > On Wed, Mar 18, 2009 at 11:14 AM, Maithili Shiva > wrote: > > > > > Dear R Helpers > > > > Which package is available for estimatine the >

[R] Three Parameter FRECHET Distribution

2009-03-18 Thread Maithili Shiva
Dear R Helpers Which package is available for estimatine the parameters of three parameter FRECHET distribution. Also, how to generate the random numbers for Frechet using these three estimated parameters. Thanking in advance Maithili __ R-help@r-p

[R] Estimating Parameters of Weibull and Pareto distribution using LMOM package

2009-03-18 Thread Maithili Shiva
Dear R helpers I have r file which estimate the parameters of 3 parameter Weibull - (A) - continuous shape parameter (alpha) - continuous scale parameter (beta) - continuous location parameter (gamma) (B) Also, I have a r file which calculates the parameters of Generalized Pareto

[R] Fw: Fitting GUMBEL Distribution - CDF function and P P Plot

2009-03-15 Thread Maithili Shiva
Dera R Helpers, I am re-posting my query. Please guide me. Maithili --- On Fri, 3/13/09, Maithili Shiva wrote: I am trying to fit the Gumbel distribution to a data. I am using lmom package. I am getting problem in Cumulative Distribution Function of Gumbel distribution as I am getting

[R] Fitting GUMBEL Distribution - CDF function ISSUE

2009-03-13 Thread Maithili Shiva
Dear R helpers I am trying to fit the Gumbel distribution to a data. I am using lmom package. I am getting problem in Cumulative Distribution Function of Gumbel distribution as I am getting it as a series of 0's and 1's thereby affecting the P P Plot. My R code is as follows. library(quantr

[R] Fast Fourier Transform w.r.t. CreditRisk+

2009-03-05 Thread Maithili Shiva
Dear R Helpers, Is there any literaure available (including R code) on Fast Fourier Transform being used in CreditRisk+? I need to learn how to apply the Fast Fourier Transform. I agree I am too vaue in my question and sincerely apologize for the same, but I am not able to understand as to whe

[R] Random number generation for Generalized Logistic distribution

2009-02-24 Thread Maithili Shiva
Dear R helpers How to generate random numbers for (a) Generalized logistic distribution (b) Generalized normal distribution (c) Pearson Type III distribution (d) Kappa Thanks in advance Maithili __ R-help@r-project.org mailing list https://st

Re: [R] Generating Correlation matrix

2009-02-11 Thread Maithili Shiva
: [R] Generating Correlation matrix > To: "Maithili Shiva" > Cc: r-help@r-project.org > Date: Wednesday, February 11, 2009, 11:37 AM > Assuming you want "ordinary" correlations - > Pearson or Spearman - and not > some financial thing I've never heard of, sear

[R] Generating Correlation matrix

2009-02-11 Thread Maithili Shiva
Dear R helpers, I have generated a portfolio of Equity, Dollar Rate and say zero coupon bond. I have calculated the daily returns based on the prices available for last two years. Now, I have three seperate csv files (Equity.csv, Dollar.csv and Bond.csv) containing the respective returns. I

[R] Matrix Multiplication

2009-02-06 Thread Maithili Shiva
Hi R helpers, I have two matrices A and B of the order (4 * 5) and (5 * 3) respectively. How to multiply these two matrices to obtain resultant matrix of the order (4 * 3). Thanks in advance With regards Maithili __ R-help@r-project.org mailing

[R] VaR-Monte carlo Simulation, Historic simulation, Variance-Covariance Simulation

2009-01-08 Thread Maithili Shiva
Dear R helpers Suppose I have a portfolio of securities with exposure to Equity, Bonds and Forex (say $ 100 each). Is there any fucntion in R that will help me calculate Value at Risk (VaR) using Monte carlo Simulation , Historic simulation and Variance - Covariance Simulation. With reg

[R] Random Number Generation using (Generalized) Extreme Value distribution and Pareto distribution

2008-12-18 Thread Maithili Shiva
Hi R helpers, Is there any function in R, which generates random numbers in case of (1) Generalized Extreme Value distribution and (2) Generalized PAreto distribution for the respective given set of parameters? Regards Maithili __ R-help@r-pro

[R] Parameter estimation - Generalized Extreme value Distribution

2008-12-16 Thread Maithili Shiva
Dear R help, I have an xls file with the name ONS.csv having 25 obseravations as given below. This is my data. (i.e. the first column of file ONS.csv) (5.55,4.56,17.82,5.03,5.3,40.28,8.05,27.8,5.85,5.42,14.75,46.13,18.5,4.58, 4.31,9.19,6.61,15.92,96.94,21.63,4.44,4.88,241.74,38592.1,5.24) I a

[R] Parameter Estimation - Generalized Extreme Value Distribution

2008-12-16 Thread Maithili Shiva
Dear R helpers, How do you estimate the (Location, Scale, Shape) parameters of Generalized Extreme Value distribution using R? I have tried VGAM but just not able to write the R script. Please advise. With regards Maithili __ R-help@r-project.org m

[R] Stepwise regression

2008-12-10 Thread Maithili Shiva
Hi, I have the response variable 'Y' and four predictors say X1, X2, X3 and X4. Assuming all the assmptions like Y follows normal distribution etc. hold and I want to run linear multiple regression. How do I run the stepwise regression (forward as well as the backward regression). >From other

[R] Likelihood ratio test using R

2008-11-04 Thread Maithili Shiva
who will also be immensely benefited by the replies, I may get pertaining to these questions. Thanking you all in advance, With warm regards Maithili Shiva __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PL

[R] Likelihood ratio test using R

2008-11-04 Thread Maithili Shiva
nguage, how do I get value of G and p value? _ I am sincerely sorry for raising these many questions? But I am sure there will be many like me who will also be immensely benefited by the replies, I may get pertaining to these questions. Thanking you all in

[R] Fw: Logistic regresion - Interpreting (SENS) and (SPEC)

2008-10-13 Thread Maithili Shiva
was how do I interpret these absolue values. How does these values help me to find out wheher my model is good. With regards Ms Maithili Shiva > Subject: [R] Logistic regresion - Interpreting (SENS) and (SPEC) >

[R] Logistic Regression - Interpreting SENS (Sensitivity) and SPEC (Specificity)

2008-10-12 Thread Maithili Shiva
Hi Hi I am working on credit scoring model using logistic regression. I havd main sample of 42500 clentes and based on their status as regards to defaulted / non - defaulted, I have genereted the probability of default. I have a hold out sample of 5000 clients. I have calculated (1) No of corre

[R] Credit Scoring Model - SPEC (specificity) and SENS (sensitivity)

2008-10-09 Thread Maithili Shiva
Dear R helpers, Hi I am working on credit scoring model using logistic regression. I have main sample of 42500 clentes and based on their status as regards to defaulted / non - defaulted, I have genereted the probability of default. I have a hold out sample of 5000 clients. I have calculated (1

[R] Logistic regresion - Interpreting (SENS) and (SPEC)

2008-10-09 Thread Maithili Shiva
Hi Hi I am working on credit scoring model using logistic regression. I havd main sample of 42500 clentes and based on their status as regards to defaulted / non - defaulted, I have genereted the probability of default. I have a hold out sample of 5000 clients. I have calculated (1) No of corre

[R] How to validate model?

2008-10-07 Thread Maithili Shiva
Hi! I am working on scorecard model and I have arrived at the regression equation. I have used logistic regression using R. My question is how do I validate this model? I do have hold out sample of 5000 customers. Please guide me. Problem is I had never used Logistic regression earlier neithe

[R] Bias in sample - Logistic Regression

2008-09-30 Thread Maithili Shiva
Hi. This is my first mail. I am new to R and also to the company where I am employed now. I have Statistics background (i.e. Master of Science). However, it is only now I understand what I learned in text is simply a bookish knowledge and when it comes to actually applying statistics in real li

[R] (no subject)

2008-09-30 Thread Maithili Shiva
Hi. This is my first mail. I am new to R and also to the company where I am employed now. I have Statistics background (i.e. Master of Science). However, it is only now I understand what I learned in text is simply a bookish knowledge and when it comes to actually applying statistics in real li