the year ended December 31, 2022, from 176 for the prior year period. The revenue increase was primarily due to the lessening impact of the COVID-19 pandemic in Europe. The number of sales territories in Europe remained consistent at six during the year ended December 31, 2022.
Cost of goods sold and gross margin
Cost of goods sold increased $1.4 million, or 37%, to $5.0 million for the year ended December 31, 2022, compared to the year ended December 31, 2021. This increase was primarily due to higher sales of Barostim.
Gross profit was $17.5 million for the year ended December 31, 2022, an increase of $8.1 million, or 86%, over the year ended December 31, 2021. Gross margin increased to 78% for the year ended December 31, 2022, compared to 72% for the year ended December 31, 2021. Gross margin for the year ended December 31, 2022 was higher due to a decrease in the cost per unit and an increase in the average selling price. This was partially offset by a larger percentage of our revenue units coming from full systems versus battery replacements.
Research and development expenses
R&D expenses increased $2.5 million, or 33%, to $10.0 million for the year ended December 31, 2022, compared to the year ended December 31, 2021. This change was primarily driven by a $1.8 million increase in compensation expenses, mainly as a result of increased headcount, a $0.4 million increase in consulting fees, a $0.2 million increase in clinical study expenses and a $0.1 million increase in non-cash stock-based compensation expense.
Selling, general and administrative expenses
SG&A expenses increased $22.2 million, or 80%, to $50.0 million for the year ended December 31, 2022, compared to the year ended December 31, 2021. This change was driven by a $12.3 million increase in compensation expenses, mainly as a result of increased headcount, a $2.4 million increase in travel expenses, a $1.8 million increase in non-cash stock-based compensation expense, a $1.7 million increase in marketing and advertising expenses, primarily related to the commercialization of Barostim in the U.S., a $1.2 million increase related to D&O insurance costs incurred as a result of becoming a public company, a $0.9 million increase in professional fees, and a $0.6 million increase in consulting expenses.
Interest expense
Interest expense decreased $2.1 million, or 93%, to $0.2 million for the year ended December 31, 2022, compared to the year ended December 31, 2021. This was driven primarily by the repayment of the outstanding debt in November 2021 under the Horizon loan agreement.
Other income (expense), net
Other income, net was $1.4 million for the year ended December 31, 2022, compared to other expense, net of $14.8 million for the year ended December 31, 2021. Other income, net in 2022 was primarily driven by $1.5 million in interest income on our interest-bearing account. Other expense, net in 2021 was primarily driven by a $13.7 million increase in expense related to the increase in fair value of our convertible preferred stock warrants due to the change in the value of our common stock from December 31, 2021 to July 2, 2021, which is the date the warrants converted to common stock warrants. The expense in 2021 was also due to a $1.3 million loss on debt extinguishment in connection with the November 2021 repayment of the outstanding debt under the Horizon loan agreement.
Provision for income taxes
Provision for income taxes was nominal for the years ended December 31, 2022 and 2021.