Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Regstats for a regression on a constant term only
Replies: 1   Last Post: Mar 18, 2013 5:14 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Tom Lane

Posts: 854
Registered: 12/7/04
Re: Regstats for a regression on a constant term only
Posted: Mar 18, 2013 5:14 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

> I want to regress Y on a constant only.
> I want the t-statistic 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




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.