My good friend and I coauthored a paper that was accepted at a major research conference. He works in industry and has now decided to apply for PhD programs. He asked that I write him a letter of recommendation because I am most familiar with his academic strengths and research work. I've been working on research level problems with him for the past 3 years.
Question: Can I write him a letter of recommendation even though I am only a PhD student?