[R] Execution of a function
hafida
hafida-06 at hotmail.fr
Tue Aug 7 23:44:16 CEST 2012
HI Arun and all
>my function is:
>aj.fun <- function(j, i, X, z, E, beta0, beta1){
+ n <- length(X)
+ iX <- order(X)
+ iz <- order(z)
+ e1 <- -(beta)*z[ iz[1:(i - 1)] ]
+ numer <- E[j] - sum( X[ iX[1:(i - 1)] ] * exp(e1) )
+ e2 <- -(beta)*z[ iz[i:n] ]
+ denom <- sum( exp(e2) )
+ numer/denom
+ }
>
>how excute this function
>
>thank you
>hafida
--
View this message in context: http://r.789695.n4.nabble.com/Execution-of-a-function-tp4639424p4639469.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list