search for: cfd7fa

Displaying 2 results from an estimated 2 matches for "cfd7fa".

Did you mean: cfd71a2
2020 Oct 17
2
??? is to nls() as abline() is to lm() ?
...art = c(a = a, mu = mu, sig = sig)) # starting values return(fit) } # Fit and plot ...: # Values x <- c(rnorm(5000, 3, 5), rnorm(2000, -5, 7)) # Two normal distributions ... # Histogram h <- hist(x, freq = FALSE, breaks = seq(min(x)-2, max(x)+2, by = 1), col = "#cfd7fa", main = "", ylab = "density", xlab = "x") # Fit myFit <- fitNorm(h$mids, h$density) # Now: what I can do is, patch together the model function ... mF <- function(x, a = coef(myFit)["a"], mu = coef(myFi...
2020 Oct 17
0
??? is to nls() as abline() is to lm() ?
...return(fit) > } > > # Fit and plot ...: > > # Values > x <- c(rnorm(5000, 3, 5), rnorm(2000, -5, 7)) # Two normal distributions ... > > # Histogram > h <- hist(x, freq = FALSE, > breaks = seq(min(x)-2, max(x)+2, by = 1), > col = "#cfd7fa", > main = "", ylab = "density", xlab = "x") > # Fit > myFit <- fitNorm(h$mids, h$density) > > # Now: what I can do is, patch together the model function ... > mF <- function(x, > a = coef(myFit)["a&qu...