Hi List,
Is there anyway to estimate the parameters with integral forms?
Here is the function. The idea is to calculate the real mean from the censored
mean given normal distribution.
I have the function as
trun.mean<- function(mu,sigma,t) # t is the threshold
{
f <- function(x) (1/(sigma*sqrt(2*pi)))*exp(-(x-mu)^2/(2*sigma^2));
pdf.fun <- function(x) x*f(x);
mut <-
integrate(f,thre,upper=Inf)$value/integrate(pdf.fun,thre,upper=Inf)$value ;
# true mean
cat( mut,"\n");
}
The pain is the integral forms in the function so I don't know how to put it
in a parameter optimizator.
Is there any way to do simulation in R to get true mu and sigma? if I know both
censored mean and standard deviation?
Thanks!
Jen.
[[alternative HTML version deleted]]