[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: std error of estimate?
From: |
Jason Stover |
Subject: |
Re: std error of estimate? |
Date: |
Mon, 23 Feb 2009 11:35:06 -0500 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
I just committed a fix to the source repository. To fix your own local copy,
try this patch. Apply by cd'ing to the directory with the source
code, and run
patch -p1 < regression.patch
Then rebuild pspp.
--- pspp.0/src/math/linreg.c 2009-01-19 14:38:06.000000000 -0500
+++ pspp/src/math/linreg.c 2009-02-23 11:09:16.000000000 -0500
@@ -737,3 +737,9 @@
design_matrix_destroy (cov);
}
+double pspp_linreg_mse (const pspp_linreg_cache *c)
+{
+ assert (c != NULL);
+ return (c->sse / c->dfe);
+}
+
--- pspp.0/src/math/linreg.h 2009-01-19 14:38:06.000000000 -0500
+++ pspp/src/math/linreg.h 2009-02-23 11:09:20.000000000 -0500
@@ -222,4 +222,5 @@
Regression using only the covariance matrix.
*/
void pspp_linreg_with_cov (const struct covariance_matrix *, pspp_linreg_cache
*);
+double pspp_linreg_mse (const pspp_linreg_cache *);
#endif
--- pspp.0/tests/command/regression.sh 2009-01-19 14:38:06.000000000 -0500
+++ pspp/tests/command/regression.sh 2009-02-23 11:16:21.000000000 -0500
@@ -95,7 +95,7 @@
#============#========#=================#==========================#
# R #R Square|Adjusted R Square|Std. Error of the Estimate#
#========#===#========#=================#==========================#
-# |.97# .94| .93| .33#
+# |.97# .94| .93| 1.34#
#========#===#========#=================#==========================#
2.2 REGRESSION. ANOVA
#===================#==============#==#===========#======#============#
--- pspp.0/tests/command/regression-qr.sh 2009-01-19 14:38:06.000000000
-0500
+++ pspp/tests/command/regression-qr.sh 2009-02-23 11:11:15.000000000 -0500
@@ -1582,7 +1582,7 @@
#============#========#=================#==========================#
# R #R Square|Adjusted R Square|Std. Error of the Estimate#
#========#===#========#=================#==========================#
-# |.05# .00| .00| .00#
+# |.05# .00| .00| 8.11#
#========#===#========#=================#==========================#
2.2 REGRESSION. ANOVA
#===================#==============#====#===========#=====#============#
--- pspp.0/src/language/stats/regression.q 2009-01-19 14:38:06.000000000
-0500
+++ pspp/src/language/stats/regression.q 2009-02-23 11:10:07.000000000
-0500
@@ -148,7 +148,7 @@
assert (c != NULL);
rsq = c->ssm / c->sst;
adjrsq = 1.0 - (1.0 - rsq) * (c->n_obs - 1.0) / (c->n_obs - c->n_indeps);
- std_error = sqrt ((c->n_indeps - 1.0) / (c->n_obs - 1.0));
+ std_error = sqrt (pspp_linreg_mse (c));
t = tab_create (n_cols, n_rows, 0);
tab_dim (t, tab_natural_dimensions);
tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1);
@@ -281,7 +281,7 @@
int n_cols = 7;
int n_rows = 4;
const double msm = c->ssm / c->dfm;
- const double mse = c->sse / c->dfe;
+ const double mse = pspp_linreg_mse (c);
const double F = msm / mse;
const double pval = gsl_cdf_fdist_Q (F, c->dfm, c->dfe);
On Mon, Feb 23, 2009 at 02:30:20AM -0800, Erik Frebold wrote:
> When I do a linear regression analysis, the model summary always shows what
> appear to be incorrect values for (overall) Std. Error of the Estimate,
> regardless of the data set. It does show individual std. errors for the
> constant and coefficient on X in "Coefficients" section of output and these
> are correct, checked against R and SPSS. Am I missing something?
> (probably... ;-)
>
> This is pspp 0.6.1 for 32bit i586, run on SuSE 10.3, installed from Dr.
> Steuer's repository.
>
> example:
> REGRESSION
> /VARIABLES= x
> /DEPENDENT= y
> /STATISTICS=COEFF R ANOVA.
>
> (choose any x or y variable from any data I've tried)
>
> Is this part of the regression procedure not complete yet?
> --
> Erik Frebold
> Vancouver, BC
>
>
>
> _______________________________________________
> Pspp-users mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/pspp-users