I want to estimate the classical simple linear regression parameters using a maximum likelihood estimation. However, I'm having trouble to program such a thing. Here's the data I generated:
Clear[y, x, e] SeedRandom["MV régression simple"] e = RandomVariate[NormalDistribution[0, 4], 100]; x = RandomVariate[NormalDistribution[20, 3], 100]; y = 4 + x*2.1 + e; And here's what I did to try and find the likelihood function:
Clear[L] L[b0_, b1_, s_] = LogLikelihood[NormalDistribution[b0 + b1*x, s], y] I don't know how to take account of the fact that yi depends only on xi and not the whole x list of data.
Thanks for your future help