Displaying 1 result from an estimated 1 matches for "wrongfit".
2005 Nov 09
2
help with legacy R code
...rong.jpg", width = 800, height = 600, pointsize = 12,
quality = 75, bg = "white")
 myfunc <- function(x, mean, sd, nfalse, ntotal, shape, rate) {
 (nfalse*dgamma(x,shape,rate)+(ntotal-nfalse)*dnorm(x,mean,sd))/ntotal
 }
 wrong <- scan("wrongrawdata.txt", list(x=0))
 wrongfit <- fitdistr(wrong$x, "gamma")
 wrongmean <- mean(wrong$x)
 wrongshape <- wrongfit[[1]][1]
 wrongrate <- wrongfit[[1]][2]
 good <- scan("rawdata.txt", list(x=0))
 xmin = 0
 newx = good$x
 xmean = mean(newx)
 xmax = max(newx)+0.15
 goodhist <- hist(newx, br=se...