Re: [Gretl-users] Building gretl from CVS on Linux
by Allin Cottrell
On Sun, 17 Apr 2011, Artur Tarassow wrote:
> Since some time I got the impression that a previously installed version
> using the package management system collides with a self-compiled
> version to some extend. [...]
OK, understood.
> I followed Allin's recommendation to use "./configure --enable-build-doc
> --prefix=/usr && make && sudo make install" after running "rm -f
> ~/.gretl2rc" (deletes the respective file in my /home folder) as well.
> The output is:
> --------------------------------------------------------------
> mkdir -p -- /usr/share/gretl/data
> mkdir: kann Verzeichnis „/usr/share/gretl/data“ nicht anlegen: Die Datei
> existiert bereits
> make[1]: *** [installdirs] Fehler 1
> make[1]: *** Warte auf noch nicht beendete Prozesse...
> cp -fp ../share/data/descriptions /usr/share/gretl/data
> cp -fp ../share/data/gretldata.dtd /usr/share/gretl/data
> cp -fp ../share/data/plotbars/nber.txt /usr/share/gretl/data/plotbars
> cp: Zugriff auf „/usr/share/gretl/data/plotbars“: Ist kein Verzeichnis
> make[1]: *** [install_datafiles] Fehler 1
> make[1]: Verlasse Verzeichnis '/home/artur/cvs/gretl/share'
> make: *** [install] Fehler 2
> ---------------------------------------------------------------
> It cannot open a new folder name "/.../data" since there exists already
> a FILE just named "data". Even if I rename this file or delete it, the
> compilation re-builds it and hence the folder named "data" cannot be
> build again.
Truly weird. I think you're discovering bugs in the Ubuntu 11.04
beta. However, I've just committed an update to the mkinstalldirs
script in gretl CVS. (The old version works fine for me, but just
in case...)
If the problem with the "data" directory still occurs, could you
remove the file "/usr/share/gretl/data" and then send the output
from
sudo make install > install.log 2>&1
> Following Riccardo's entry, I ran "sudo ldconfig". For a second the
> gretl window opens but closes immediately again with the error:
> ---------------------------------------------------------------------
> Couldn't read /home/artur/.gretl2rc
That's OK, it will be re-created.
> Speicherzugriffsfehler (Speicherabzug geschrieben) [This refers to a
> segmentation fault - A.T.]
Not too surprising since gretl seems to be half-installed at this
point.
Allin
13 years, 8 months
Re: [Gretl-users] Panel Data Help
by Allin Cottrell
On Sun, 17 Apr 2011, Mina Shariq wrote:
> I was wondering if you could kindly help me out. I am using Gretl to regress
> panel data for my dissertation. My panel data consists of data on 13
> villages over the span of 8 years: 2001 - 2008 (a total of 104
> observations). The problem is whenever I lag any of my variables (such as
> government spending) Gretl drops my first year of observations and leaves me
> with only 91 over a span of 7 years instead.
>
> Is there any way to fix this problem or will this always happen regardless?
> I tried readjusting my data set to include a year 2000 with only zero values
> in it, but the same thing happened again.
It's a fact of life that in taking lags (or differences) you lose
at least one initial observation.
If you really managed to pad the dataset with zeros for year 2000,
for all variables, then you ought to be able to get gretl to use
104 observations, but is that what you want, statistically? If
zero were the expected value of all your series that might be
acceptable, otherwise it will bias your estimates and make them
less efficient. In general you can't just invent data to give
yourself a bigger sample.
Allin Cottrell
13 years, 9 months
Building gretl from CVS on Linux
by Allin Cottrell
Hello all,
This may or may not be relevant to the problem recently reported
by Artur T., but I'll set it out for the record.
1) If you install gretl using the package management system of a
Linux distribution, it will almost certainly be installed under
/usr -- the gretl executables in /usr/bin, the gretl shared
library in /usr/lib, and data files and so on in /usr/share/gretl.
2) But if you build the program yourself, the default (as per the
GNU standard) is to install under /usr/local -- the executables
in /usr/local/bin, the library in /usr/local/lib, and shared files
under /usr/local/share/gretl.
3) Unfortunately, this creates the potential -- for anyone not
used to managing a Linux system -- for a nasty mix-up of
incompatible bits and pieces.
4) We therefore recommend that if you're building gretl yourself
(a) you should ensure that you uninstall completely the gretl
version installed by your distribution (if present), and (b) to
avoid the possibility of ending up with parallel versions, you may
want to configure the gretl build with --prefix=/usr . That way,
if anything remains from a stock installation it will be
overwritten by files from your CVS build.
5) If you're switching from packaged gretl to your own build, an
additional safety measure is to delete your old per-user gretl
config file, and let this be re-established:
rm -f ~/.gretl2rc
--
Allin Cottrell
Department of Economics
Wake Forest University
13 years, 9 months
Re: [Gretl-users] problems compiling gretl (cvs)
by Allin Cottrell
On Sat, 16 Apr 2011, Artur Tarassow wrote:
> Thanks for your effort. Unfortunately nothing has changed. I got the
> current cvs and tried to compile it with different options, but the same
> error occurs...
That's not possible -- not if you were invoking an instance of
gretl newly configured and built from current CVS.
You said the error message was:
/usr/lib/libgretl-1.0.so.0: undefined symbol: omp_get_wtime
The function omp_get_wtime() is called only in
lib/src/gretl_utils.c, and it is compiled conditionally, as in:
<C-snippet>
#if defined(_OPENMP) && defined(USE_OPENMP)
#include <omp.h>
static double tim0;
static void gretl_stopwatch_init (void)
{
tim0 = omp_get_wtime();
}
</C-snippet>
The (new) macro USE_OPENMP is defined (in gretl's config.h) only
if you do --enable-openmp. You can check this in your build
of config.h. You should see
/* Are we using openmp? */
/* #undef USE_OPENMP */
Checks:
1) Is the installed library really current?
ls -l /usr/lib/libgretl-1.0.so.0.0.62
2) Does it invoke omp_get_wtime?
nm /usr/lib/libgretl-1.0.so.0.0.62 | grep omp_get
Allin
13 years, 9 months
Re: [Gretl-users] panel data's year dummies: a wooldridge textbook's problem
by Allin Cottrell
On Sat, 16 Apr 2011, Qi Shi wrote:
> Wooldridge's Example 14.4. Using Stata, I can include dummies
> d81-d87 into the panel data estimation. But using gretl, the computer
> say it encounters exact or nearly colliearity. Why?
This is on the random effects model. The reason is that when gretl
estimates the "within" variance via fixed effects (one piece of
information required for the random effects estimator) it flags an
error if there is exact collinearity. And there is exact
collinearity in this case: that's why Wooldridge omits "exper" in
his fixed effects estimation.
Now maybe gretl is being too conservative here: perhaps we should
just prune the set of regressors to avoid exact collinearity in
estimating the within variance, which I suppose is what Stata
does.
Allin Cottrell
13 years, 9 months
Re: [Gretl-users] problems compiling gretl (cvs)
by Allin Cottrell
On Fri, 15 Apr 2011, Artur Tarassow wrote:
> please find the [gretl configure and build] files attached.
Thanks, Artur. It seems to me this is a bug in the gcc supplied
with Ubuntu 11.04. (There's no such problem with Ubuntu 10.10.)
But anyway, I've now put in place a workaround in CVS, which
should probably enable you to compile gretl OK.
Allin
13 years, 9 months
Re: [Gretl-users] GMM Instruments Lagged Independent Variables
by Allin Cottrell
On Fri, 15 Apr 2011, Dempsey, Keely wrote:
> After estimating GMM, is it possible to estimate R-squared of
> the equation?
Yes, but you have to decide how you want to calculate R-squared,
for a model not estimated via least squares. One approach that
people use is to compute the square of the correlation between
actual and predicted y (dependent variable). But GMM is general
enough that gretl doesn't necessarily know what the "dependent
variable" is; you'll have to tell it.
Here's a simple example script:
open data4-1
# run OLS and record R-squared
ols price const sqft
R2_ols = $rsq
# set-up for GMM
matrix X = { const, sqft}
matrix y = { price }
matrix B = { 50, 0.1 }'
matrix I2 = I(2)
matrix e = y - X*B
# emulate OLS via GMM
gmm e = y - X*B
orthog e ; X
params B
weights I2
end gmm
# calculate fitted values from GMM
series yhat = price - e
R2_gmm = corr(price, yhat)^2
printf "R2_ols = %.4f, R2_gmm = %.4f\n", R2_ols, R2_gmm
Allin Cottrell
13 years, 9 months
Re: [Gretl-users] problems compiling gretl (cvs)
by Allin Cottrell
On Fri, 15 Apr 2011, Artur Tarassow wrote:
> [gcc -v] gives:
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/lto-wrapper
> Target: x86_64-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
> 4.5.2-8ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs
> --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
[and so on]
Thanks, but it turns out this didn't tell me much.
It would be useful to have the full output from configure and
build, as in
./configure <options> > gretl.log 2>&1
make > gretl.log 2>&1
(and also probably config.log after configuring).
Maybe I can then figure out what's happening here.
Allin
13 years, 9 months