padpadpadpad / nls.multstart

Non-linear regression in R allowing multiple start parameters
18 stars 4 forks source link

Modelweights #12

Closed mathesong closed 6 years ago

mathesong commented 6 years ago

I've been meaning to work on other things, but I couldn't get this out of my head :). I got around the problem by just calling it modelweights instead. There's probably a better way to do the actual weights input, but calling it modelweights is going to avoid the potentially annoying issue of people not being allowed to have variables called weights.

I also added variable names to the start_upper and start_lower input vectors in the examples just for consistency with the lower input argument.

I also added some unit tests which should fit the model with and without weighting, as well as using the for-loop and using the map() command.

Last thing, as always: I knitted the README, but I don't have Helvetica as I'm on Windows. So it's got the ugly warning messages there. So you should maybe re-knit the README.

padpadpadpad commented 6 years ago

Merged! Will just remove Helvetica from the README now. Not worth the issues.

mathesong commented 6 years ago

So excited about the unit tests: makes me feel so much more confident about everything now. And sorry about losing Helvetica: for what it's worth, it definitely looks nicer 😢

padpadpadpad commented 6 years ago

Unit tests look sweeeeeet. Been meaning to investigate test_that for a while. Thanks for all your input in the last three days. Has been great.

mathesong commented 6 years ago

The new usethis package makes it pretty easy to implement the tests. It does all the hard work :D.

And thank you too! It's been really fun! I'm busy trying it out with my package functions right now for a particularly nasty data set where we've been messing around with bounds and starting parameters for a while. Seems to be doing a great job thus far. Though have to wait for morning to see if it has truly made all our previous messing about with starting values and bounds redundant. Super exciting!

On 15 Feb 2018 20:52, "Daniel Padfield" notifications@github.com wrote:

Unit tests look sweeeeeet. Been meaning to investigate test_that for a while. Thanks for all your input in the last three days. Has been great.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/padpadpadpad/nls.multstart/pull/12#issuecomment-366042052, or mute the thread https://github.com/notifications/unsubscribe-auth/AG25ZPYpyF-xQY4jJ8xvVQKCExHD9_tUks5tVIr6gaJpZM4SG7Yr .