Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



Re: Regstats for a regression on a constant term only
Posted:
Mar 18, 2013 5:14 PM


> I want to regress Y on a constant only. > I want the tstatistic of this regression, so i want to use regstat. > The problem is that i have no idea what to give as input for X in this > variable, because regstats adds a first column of 1s to X, corresponding > to a constant term in the model. Does anyone know what i should give as > input for X?
This is unusual, but you could just up X with the proper number of rows and no columns:
regstats(y,zeros(length(y),0),'linear','tstat')
 Tom



