irr

IRR in poi return NaN but correct value in excel

久未见 提交于 2021-01-29 12:01:24
问题 When i calculate Irr value use apache/poi i get Double.NaN, but the same inputs in excel i got a negative value. So why they return different value? inputs here: irr(-1.0601017230994111E8,19150.63,44505.08,22997.34,33936.39,27265.92,2127.66,2108.63,886.53,2482.27,4305.12,3421.58,65644.12,1020.51,2659.57,3191.49,20284508.4,1881279.27,11675415.09,7557862.28,921090.46,622104.32,289267.36,183.41,886.53, 0.1) 回答1: For me it gives the #NUM! error in current apache poi 4.1.0 , not NaN . The problem

IRR library is only good if the pay period and compound period is in years (Engineering Economy)

走远了吗. 提交于 2019-12-24 13:30:12
问题 http://docs.scipy.org/doc/numpy-1.10.0/reference/generated/numpy.irr.html The link above works for me only when the pay period and compound period are in years. If they in months or quarters, I don't know how to use it. You will understand what I am saying, if you have knowledge about IRR, present value, future value, etc. The answer for IRR(Year) is 298.88% and I am getting 12.22% The time in column A is in years EXCEL FILE IMAGE: Excel File image import xlrd import numpy fileWorkspace = 'C:

How can I incorporate if statement when calculating IRR in R?

爷,独闯天下 提交于 2019-12-12 13:24:31
问题 This is a simple function I use to calculate IRR. However, there are incidences when all cash flows are negative and return "Error in uniroot(npv, c(0, 1), cf = cf) : f() values at end points not of opposite sign." Is there any way I can put if statement so that when IRR can't be computed, R simply returns 0? npv<-function(i,cf,t=seq(along=cf)) sum (cf/(1+i)^t) irr <- function(cf) {uniroot(npv, c(0,1), cf=cf)$root } irr(cf) 回答1: You could use the all function: irr <- function(cf) { if(all(cf

Kappam.light from irr package in R: Warning sqrt(varkappa), NAns produced, kappa = NA, z-value=NA and p-value=NA

陌路散爱 提交于 2019-12-11 10:37:27
问题 I'm trying to calculate the inter-observer reliability in R for a scoring system using Light's kappa provided by the irr package. It's a fully crossed design in which fifteen observers scored 20 subjects for something being present ("1") or something not being present ("0"). This is my data frame (imported from an excel sheet): library(irr) my.df #my dataframe a b c d e f g h i j k l m n o 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 4 0 1 1