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


Math Forum
»
Discussions
»
Software
»
comp.softsys.matlab
Notice: We are no longer accepting new posts, but the forums will continue to be readable.
Topic:
Regstats for a regression on a constant term only
Replies:
1
Last Post:
Mar 18, 2013 5:14 PM




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



