Re: [R] Binomial

2011-05-12 Thread Sarah Sanchez
Thanks a lot sir. Regards Sarah --- On Thu, 5/12/11, Alexander Engelhardt wrote: From: Alexander Engelhardt Subject: Re: [R] Binomial To: "Sarah Sanchez" Cc: "David Winsemius" , r-help@r-project.org Date: Thursday, May 12, 2011, 12:53 PM Am 12.05.2011 13:19, schrieb Sar

Re: [R] Binomial

2011-05-12 Thread Sarah Sanchez
Dear R helpers, I am raising one query regarding this "Binomial" thread with the sole intention of learning something more as I understand R forum is an ocean of knowledge. I was going through all the responses, but wondered that original query was about generating Binomial random numbers while

[R] Generation of uniform random numbers

2010-09-03 Thread Sarah Sanchez
Dear R helpers I have following dataset rate_number = matrix(c(5, 15, 60, 15, 5, 0, 20, 60, 20,0, 10, 20, 40, 20, 10), nrow = 5, ncol = 3) range_mat = matrix(c(6.25, 6.75, 7.25, 8.75, 9.25, 9.75, 8.5, 9, 9.5, 10.5, 11, 11.5, 4.25, 4.75, 5.25, 5.75, 6.25, 6.75), nrow = 6, ncol = 3) > rate_

[R] Shifting of Principal amount while calculating Present Value

2010-08-20 Thread Sarah Sanchez
Dear R Helpers I have following data - cash_flow = c(7, 7, 107)  # 107 = Principle 100 + interest of 7% t = c(1,2,3) and zero rate table as rating year1   year2   year3 AAA    3.60    4.17  4.73 AA  3.65    4.22

[R] Double Integration

2010-07-01 Thread Sarah Sanchez
Dear R helpers I am working on the Bi-variate Normal distribution probabilities. I need to double integrate the following function (actually simplified form of bivariate normal distribution) f(x, y) = exp [ - 0.549451 * (x^2 + y^2 - 0.6 * x * y) ] where 2.696 < x < 3.54 and -1.51 < y < 1.98 I

[R] Generation of binomial numbers using a loop

2010-06-23 Thread Sarah Sanchez
Dea'R' helpers I have following data - prob = c(0.1, 0.2, 0.3, 0.4, 0.5) frequency = c(100, 75, 45, 30, 25) no_trials = c(10, 8, 6, 4, 2) freq1 = rbinom(frequency[1], no_trials[1], prob[1]) freq2 = rbinom(frequency[2], no_trials[2], prob[2]) freq3 = rbinom(frequency[3], no_trials[3], prob[3])

Re: [R] PLEASE HELP!!! Total and heading of portfoilo table

2010-02-16 Thread Sarah Sanchez
05 15160    53186 15110    53211 Please guide Regards Sarah   --- On Tue, 2/16/10, Madhavi Bhave wrote: From: Madhavi Bhave Subject: Re: [R] Total and heading of portfoilo table To: r-help@r-project.org, "Sarah Sanchez" Date: Tuesday, February 16, 2010, 7:05 AM Hi!  

[R] Total and heading of portfoilo table

2010-02-15 Thread Sarah Sanchez
Dear R helpers, I have two input files as 'quantity.csv' and 'equity_price.csv' as (for example) given below. 'quantity.csv' GOOG YHOO 1000 100 'equity_price.csv' sr_no   GOOG_price   YHOO_price 1    15.22 536.40 2    15.07 53