This video covers the factors that go into optimizing research for countries, there's a lot that goes into the research output.
The factors are
Total population
GDP per capita: Key breakpoints at 30k and 55k
Education: Key breakpoint at 12
Cohesion
Government score
Unrest
and Councilor's Science if advising