Dear Stata Community,
I am currently working on replicating the 2011 paper by Malmendier & Nagel. I have hit a roadblock in my analysis, and I am hoping for help/ a hint.
I want to estimate a nonlinear regression to examine how past returns influence a household's investment decisions. The underlying assumption is that more recent returns have a stronger impact on decision-making than those further in the past (Malmendier & Nagel, 2011). This means that the weighting of a return depends on how many years ago it was realized. The sum of all weights always equals one, and the exact weight distribution is determined by the parameter λ. My goal is that the parameter λ (and its standard error) are estimated directly by the program.
In other words, I want to estimate the following non-linear regression:

Notably, yit is the fraction of liquid assets invested in stocks, k is the number of years since the return has been realized, and Rt-k is the respective return.
In other words, my dataset includes:
So far, I have tried writing an ml command, but unfortunately, it does not work. I would be extremely grateful for help. Thanks a lot in advance.
I am currently working on replicating the 2011 paper by Malmendier & Nagel. I have hit a roadblock in my analysis, and I am hoping for help/ a hint.
I want to estimate a nonlinear regression to examine how past returns influence a household's investment decisions. The underlying assumption is that more recent returns have a stronger impact on decision-making than those further in the past (Malmendier & Nagel, 2011). This means that the weighting of a return depends on how many years ago it was realized. The sum of all weights always equals one, and the exact weight distribution is determined by the parameter λ. My goal is that the parameter λ (and its standard error) are estimated directly by the program.
In other words, I want to estimate the following non-linear regression:
Notably, yit is the fraction of liquid assets invested in stocks, k is the number of years since the return has been realized, and Rt-k is the respective return.
In other words, my dataset includes:
| Variable Name | Description |
| age | Age of the household head |
| stk_exp_ret_1914 (up to stk_exp_ret_2022) |
Experienced return in the year 1914
|
| k_1914 (up to k_2022) |
Number of years since the return in the respective year was experienced
|
| fraction_liq_stock | The proportion of liquid assets that the household invests in stocks |
| normalized_weight | Weighting of the respective household |
So far, I have tried writing an ml command, but unfortunately, it does not work. I would be extremely grateful for help. Thanks a lot in advance.
