Hi r-users,

I have this code here :

dt   <- winter_pos_sum
bt   <- c(24.96874, 19.67861, 23.51001, 19.86868); round(bt,2)

alp  <- c(2.724234, 3.914649, 3.229146, 3.120719); round(alp,2)

bt_min  <- min(bt) ; bt_min
p       <- alp_sum    ; p
t  <- 50
t1 <- t+1
            

#first get the sum over the eigenvalues for a particular power i
gam_sum <- function(alp,bt,bt_min,i) {alp*(1-bt_min/bt)^i}
gam_sum(alp,bt,bt_min,1)
0.57718379+ 0.00000000+ 0.52625031+ 0.02985377 = 1.133288



term   <- function(i,alp,bt,bt_min) {sum(sapply(bt,gam_sum , alp,bt_min,i))}
> term (1,alp,bt,bt_min)
[1] -1817.765


I should get the value using term (1,alp,bt,bt_min)=1.133288. I have 4 values of beta and 4 values of alpha.
 
Thank you so much for your help.


      
	[[alternative HTML version deleted]]

