fit.gaussian {LearnEDA} | R Documentation |
Fits a Gaussian curve with known mean and standard deviation to binned data.
fit.gaussian(data,bins,g.mean,g.sd)
data |
numeric vector of values of variable |
bins |
a vector giving the breakpoints between histogram cells |
g.mean |
mean of Gaussian distribution |
g.sd |
standard deviation of Gaussian distribution |
counts |
vector of frequencies of the bins |
probs |
vector of fitted probabilities of the bins |
expected |
vector of expected frequencies of the bins |
residual |
vector of simple rootogram residuals |
Jim Albert
# fit Gaussian curve to simulated data from t distribution data=rt(200,df=5) bins=pretty(range(data)) g.mean=0 g.sd=1 fit.gaussian(data,bins,g.mean,g.sd)