title: fitdist for truncated normal
body: <p>The truncated normal is given by:</p>
  
  <pre><code>dtnorm&lt;- function(x, mean, sd, a, b) {
  dnorm(x, mean, sd)/(pnorm(b, mean, sd)-pnorm(a, mean, sd))
  }
  ptnorm &lt;- function(x, mean, sd, a, b) {
  (pnorm(x,mean,sd) - pnorm(a,mean,sd)) / 
    (pnorm(b,mean,sd) - pnorm(a,mean,sd))
  }
  </code></pre>
  
  <p>The fit is given by:</p>
  
  <pre><code>fitdist( data, tnorm, method="mle",
                      start=list(mean=mapply("[[", results[1], 1),
                                 sd=mapply("[[", results[1], 2)),
                      fix.arg=list(a=minLoose,b=maxLoose))
  </code></pre>
  
  <p>Where results[i] is a matrix with the mle results of fitdist using normal instead of tnormal.</p>
  
  <p>I get the following results for tnorm:</p>
  
  <pre><code>mean=-0.00844725266454969, sd=0.012540928272073
  </code></pre>
  
  <p>whereas with norm:</p>
  
  <pre><code>mean=0.00748402597402597, sd=0.00614293813955003
  </code></pre>
  
  <p>The data is all larger than 0 and smaller than 0.04 so the mle obtained for tnorm does not seem right.... Any advise?</p>
  
  <p>Thanks!</p>