Hi! I'm a newbie here too, as a matter of fact, this is my first post! 

 I got my precious Yorkie, Chewie, one month ago yesterday and he does this too. He's a year old. It didn't take long for me to figure out when he does this that it scares him and he learned quickly to run to me for security. It passes quickly and I stroke him, (I read to stroke them on their throat gently). It never lasts more than a few seconds. He really responds to my concern, it seems to calm him down. This is usually triggered when he gets really excited. 
I wouldn't yell at him when it happens though, because I can tell you for certain that it frightens them already and I don't think you want to frighten him more than he already is. 
Research revealed that it could be a reverse sneeze or a trachea that collapses or partially collapses. Google both of those terms and I think you'll identify with what is happening. 
Hope that helps a little!
Nice to meet you!