[R-br] Problema ao truncar PDF

Benilton Carvalho beniltoncarvalho em gmail.com
Quarta Junho 15 17:49:11 BRT 2011


p.trunc recebe os argumentos trunc e b... mas chama dricker com os
argumentos 'x' e 'b'...

2011/6/15 Cristiano Strieder <cstrieder em gmail.com>:
> Olá,
>
> estou com problemas no seguinte código:
>
> dricker =  function (x,b,...) {b^2*x*exp(-b*x)}
> pricker = function (x, b,...){exp(-b*x)*(exp(b*x)-b*x-1)} # CDF
> dricker.t = function (x, b,...){
>  p.trunc = pricker(trunc,b)
>        dricker(x,b)/(1 - p.trunc)}
> dricker.t(10, b=0.1)
>
> Error in -b * x : non-numeric argument to binary operator
>
> Alguma sugestão?
>
> Obrigado.
>
> --
> Cristiano Strieder
> São José dos Campos - SP
> _______________________________________________
> R-br mailing list
> R-br em listas.c3sl.ufpr.br
> https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br
> Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código mínimo reproduzível.
>



-- 
Successful people ask better questions, and as a result, they get
better answers. (Tony Robbins)


Mais detalhes sobre a lista de discussão R-br