[R] integrate fails with errors

From: <herodote_at_oreka.com>
Date: Wed 20 Jul 2005 - 02:11:37 EST


Hi all,
i'm new to R,
I need to modelize in R a statistic algorithm, This algo use Weibull, normal law, linear regression, normalisation, root mean square, to find eta and beta fitting the weibull model (to analyse few results) and further when we will get more information apply bayes model .

the problem is when When i try to integrate it fails with errors.

by the way i like to integrate something like that :

beta0,eta0,n are initialized as single integer, temp is a 1 dimension array containing 9 integer.

integrate(function(beta) ((beta/(eta0)^beta)^n)*prod(temp^(1-beta)*exp(-sum(temp^beta)/(eta^beta)))*(1/(sqrt(2*pi))*exp(((beta-beta0)^2,0,Inf)

R says : The longuest object isn't a multiple of the shortest object in temp^beta , the same for temp^(1-beta).

I don't understand why R fails to take calculate each temp^beta then sum it over again for each beta values.

don't know if my post is explicit my head is burned out with these things today

thks.

////////////////////////////////////////////////////////////
// Webmail Oreka : http://www.oreka.com
////////////////////////////////////////////////////////////



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jul 20 03:43:28 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:50 EST