[R] Is possible, on biological grounds, suggest to fitdistr (MASS library) that the estimated parameters must be between two values?
Steve_Friedman at nps.gov
Steve_Friedman at nps.gov
Thu Oct 30 13:41:49 CET 2008
Doesn't use of a 95% CI of the mean give you a better handle on this issue.
It then might be interesting to compare the CI range with the values
obtained by the fitdist function.
Steve Friedman Ph. D.
Spatial Statistical Analyst
Everglades and Dry Tortugas National Park
950 N Krome Ave (3rd Floor)
Homestead, Florida 33034
Office (305) 224 - 4282
Steve_Friedman at nps.gov
drbn
<drbn at yahoo.com>
Sent by: To
r-help-bounces at r- r-help at r-project.org
project.org cc
Subject
10/30/2008 02:53 [R] Is possible, on biological
AM MST grounds, suggest to fitdistr (MASS
library) that the estimated
parameters must be between two
values?
Sorry if it is a silly question, I haven't found documentation on this and
I
don't know if it is possible.
library(MASS) ## for fitdistr
library(msm) ## for dtnorm
#prepare truncated normal distribution
dtnorm0 <- function(x, mean, sd , log = FALSE) {
dtnorm(x, mean, sd, 105, 135, log)
}
set.seed(1)
#Generate normal distribution with the TRUE population mean (day 106 of the
year) that I don't know a priori
x <- rnorm(100, mean=106, sd=40)
#truncated sample simulating those records that I was able to observe
x<-x[x>105 & x<=135]
#fit truncated normal distribution to the data
fitdistr(x, dtnorm0, start = list(mean = mean(x), sd = sd(x)))
The result of the estimated true mean=132.8, sd=25.9, far from the true
values.
Can I, on biological grounds, suggest to fitdistr that the mean must be a
value, for example, between 90 and 110?
Thanks
David
--
View this message in context:
http://www.nabble.com/Is-possible%2C-on-biological-grounds%2C-suggest-to-fitdistr-%28MASS-library%29-that-the-estimated-parameters-must-be-between-two-values--tp20243667p20243667.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
R-help at r-project.org 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.
More information about the R-help
mailing list