search for: mnull1

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

Did you mean: mnull2
2023 Jan 25
2
Potential bug in fitted.nls
...a single parameter is length 1, but if I multiply that constant by a vector of ones, then the fitted values are of `length(y)`. Is this something that should be reported? ``` r dat <- data.frame(y=c(80,251,304,482,401,141,242,221,304,243,544,669,638), ones = rep(1, 13)) mNull1 <- nls(y ~ a, data=dat, start=c(a=mean(dat$y))) fitted(mNull1) #> [1] 347.6923 #> attr(,"label") #> [1] "Fitted values" mNull2 <- nls(y ~ a*ones, data=dat, start=c(a=mean(dat$y))) fitted(mNull2) #> [1] 347.6923 347.6923 347.6923 347.6923 347.6923 347.6923 347...
2023 Jan 26
1
Potential bug in fitted.nls
...t if I multiply that constant by a > vector of ones, then the fitted values are of `length(y)`. Is this > something that should be reported? > > ``` r > dat <- > data.frame(y=c(80,251,304,482,401,141,242,221,304,243,544,669,638), > ones = rep(1, 13)) > mNull1 <- nls(y ~ a, data=dat, start=c(a=mean(dat$y))) > fitted(mNull1) > #> [1] 347.6923 > #> attr(,"label") > #> [1] "Fitted values" > > mNull2 <- nls(y ~ a*ones, data=dat, start=c(a=mean(dat$y))) > fitted(mNull2) > #> [1] 347.6923 347.6923...