I solve a discrete-time dynamic problem of profit maximization of the representative firm witha power-series adjustment cost function. I focus on the effect of government investment and ofseveral quality-of-institutions variables, such as control of corruption, political stability, andgovernment effectiveness, on private investment. To address this issue, I derive and estimatean Euler equation for investment (EEI) by Dynamic Programming as well as by Calculus-ofVariations. I estimate the EEI using the method of Generalized Methods of Moments (GMM)and annual aggregate data from a panel of 27 OECD countries over the period 1995-2015, aswell as from an expanded panel of 32 countries, to check the robustness of the estimates tosubstantial changes in the sample. My main findings are as follows: First, a crowding-in effectexists, i.e., government investment encourages private investment. Second, the conventional(quadratic) adjustment-cost function is too restrictive, whereas the power-series adjustmentcost function performs better. Third, according to the literature, previous specifications of theEEI fail empirically, whereas the one used here fares better.