[R] fitting truncated normal distribution

From: <aon.912182281.tmp_at_aon.at>
Date: Wed 16 Aug 2006 - 23:48:14 EST

I am a new user of R and found the function dtnorm() in the package msm.

My problem now is, that it is not possible for me to get the mean and sd out of a sample when I want a left-truncated normal distribution starting at "0".

fitdistr(x,dtnorm, start=list(mean=0, sd=1))

returns the error message
"Fehler in "[<-"(`*tmp*`, x >= lower & x <= upper, value = numeric(0)) : nichts zu ersetzen"

I don't know, where to enter the lower/upper value. Is there a possibility to program the dtnorm function by myself?

Thank you very much in advance for your help, markus

Versendet durch aonWebmail (webmail.aon.at)

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 and provide commented, minimal, self-contained, reproducible code. Received on Wed Aug 16 23:57:09 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 17 Aug 2006 - 02:20:37 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.