The help for -makematrix- tells you why, although 
you must read it very closely. 
The outline syntax for -makematrix- is 
makematrix [matrix_name] ,
	from(results_list) [production_options] [list_options] :
	["]command["] [varlist] ... [, options ]
In particular, following the colon : a command must be specified together 
with whatever elements from 
[varlist] [if exp] [in range] [weight] [, options ] 
are appropriate.
Now that last syntax is fairly general, and covers lots of 
commands. However, the -ttest- command you are using is not 
among them, given the equals sign that is part of the syntax. 
In short, -makematrix- is not general enough to allow what
you want to do. It falls over given the = sign. 
As I have indicated before, -makematrix- was a project that 
led to a program I thought worth publishing, but it's still
a dead end. 
For what you want to do, a more basic approach is simpler 
and more flexible: 
ttest y = x 
mat a = r(p) \ r(t) 
mat rownames a = p t 
Nick 
[email protected] 
Herve STOLOWY
 
> A few months ago, I asked a question concerning a way to get 
> the t test results in a matrix. I received an answer based on 
> -makematrix- (downloadable from SSC) and the following 
> command works perfectly: 
> 
> makematrix c1, from(r(t) r(p)) label : ttest var1, by(groupvar)
> 
> I am now running a different form of t test: 
> 
> makematrix c1, from(r(t) r(p)) label : ttest var1 = var2
> 
> Unfortunately, I get an "invalid syntax" error message.
> 
> Would you know why?
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/