title: Using glm syntax to fit complex models?
body: <p>Is it possible to fit the following regression model with glm()? </p>
  
  <p><a href="https://i.stack.imgur.com/ztEyK.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ztEyK.gif" alt="enter image description here"></a>
  that can be written like this:</p>
  
  <p><a href="https://i.stack.imgur.com/mnCHm.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mnCHm.gif" alt="enter image description here"></a></p>
  
  <p>That's, 8 input variables but only 2 parameters, a and b.</p>
  
  <p>Maybe with some kind of transformation?
  Or should I use some other method/package instead, such as GAM?, How?</p>
  
  <p>Another simple model, with one parameter<br>
  <a href="https://i.stack.imgur.com/fY9HB.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fY9HB.gif" alt="enter image description here"></a><br>
  How do you write it with glm formula syntax?</p>
  
  <p>OK, I've found that my example could be easily written as
  <a href="https://i.stack.imgur.com/WAzhV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WAzhV.png" alt="enter image description here"></a></p>
  
  <p>Then I need to define two new variables and use a simple linear regression.</p>