Skip to content
Prev 309613 / 398502 Next

Problem with lm

See comments inline
We haven't seen the actual call to the function, singleCosinor(), in your code so we can't say for sure what the problem is.  However, the confusion may be that while there is a formal parameter named y, it does not refer to any variable named y in the global environment. If you have a variables t and y in the global environment, then the call would need to be

singleCosinor(t=t, y=y)

hope this is helpful,

Dan

Daniel J. Nordlund
Washington State Department of Social and Health Services
Planning, Performance, and Accountability
Research and Data Analysis Division
Olympia, WA 98504-5204