I'm trying to develop a non-linear model, but I'd like to have the values for the parameters vary by group. To give you an example, a section of my data (just random numbers here) looks like:
MONTH FUTURE.PC FUTURE.SALES 1 APR 35 1498 2 APR 22 1124 3 MAY 24 744 4 MAY 45 453 5 MAY 13 1024 6 JUN 26 689
Say I wanted to make a non-linear model that looked like
nls(FUTURE.SALES ~ a + b * FUTURE.PC ^ c)
Is there a way to change the values of $a$, $b$, and $c$ based on which month the record belongs to? Alternatively, is there a way to incorporate factor variables in non-linear regression in $R$?