Page 1 of 2

### Programming a table

Posted: Fri Jan 12, 2018 8:03 pm
Hi,

How can I program a table so that the data will update with the chosen sample length.

Right now in my table I have @mean(variable). the mean of that variable does not change even if I change the length of my sample. How can I have the table react to sample length?

Thanks

### Re: Programming a table

Posted: Fri Jan 12, 2018 8:03 pm
You cannot.

### Re: Programming a table

Posted: Fri Jan 12, 2018 8:15 pm
Ok thanks. I guess i just have to rerun the table each time.

### Re: Programming a table

Posted: Sat Jan 13, 2018 3:37 pm
IS there a way to give data for different samples? For example variable a's mean from 2010-2012 but variable b's mean from 2010-2015?

thanks

### Re: Programming a table

Posted: Sat Jan 13, 2018 4:59 pm
What do you mean by "give"?

### Re: Programming a table

Posted: Tue Jan 16, 2018 7:22 am
I meant display, but i found a work around...

Actually on another point, I'm using the (cov=hac) version of a univariate least squares regression. Is there a way to display the resulting p value in a tables?

### Re: Programming a table

Posted: Tue Jan 16, 2018 9:01 am
Which p-value?

### Re: Programming a table

Posted: Tue Jan 16, 2018 9:17 am
The p value for the constant and/or and other variable in the regression.

### Re: Programming a table

Posted: Tue Jan 16, 2018 9:38 am

### Re: Programming a table

Posted: Wed Jan 24, 2018 9:31 am
Thanks.

As a follow up, can you tell em how to get the p-value for the Breusch-Godfrey Serial Correlation LM Test in a table?

Using

Code: Select all

`equation.@pval(1)`
gives me the pvalue for the first variable in that equation. How do I adjust this line of code to get the p-value from the f-test form the Breusch-Godfrey?

Thanks a lot.

### Re: Programming a table

Posted: Wed Jan 24, 2018 9:34 am

### Re: Programming a table

Posted: Thu Feb 01, 2018 1:24 pm
Thanks again. I'm using the code from this linked post:

Code: Select all

`freeze(tab1) eq01.wald c(1)=0scalar f_pvalue = @val(tab1(6,4))`

and this may be a dumb question but why does the p value for the f-stat that shows up in the "freeze" table not exactly the same as the Prob(Wald F-statistic) that gets reported in the estimation output for the same equaiton?

Thanks again

### Re: Programming a table

Posted: Thu Feb 01, 2018 1:44 pm
Do you have more than one coefficient?

### Re: Programming a table

Posted: Thu Feb 01, 2018 1:49 pm