Aptech Systems, Inc. Worldwide Headquarters
Mailing Address:
PO Box 250
Black Diamond, WA 98010 USAStreet Address:
30741 Third Avenue #160
Black Diamond, WA 98010 USAPhone: 360.886.7100
FAX: 360.886.8922Ready to Get Started?
For Pricing and Distribution
Industry Solutions
Products
Resources
Support
Training & Events
Want more guidance while learning about the full functionality of GAUSS and its capabilities? Get in touch for in-person training or browse additional references below.
Tutorials
Step-by-step, informative lessons for those who want to dive into GAUSS and achieve their goals, fast.
Have a Specific Question?
Get a real answer from a real person
- Need Support?
Q&A: Register and Login
Support Plans
Premier Support and Platinum Premier Support are annually renewable membership programs that provide you with important benefits including technical support, product maintenance, and substantial cost-saving features for your GAUSS System or the GAUSS Engine.
User Forums
Join our community to see why our users are considered some of the most active and helpful in the industry!
Where to Buy
Available across the globe, you can have access to GAUSS no matter where you are.
Recent Tags
applications character vectors CMLMT covariance matrix dates dlibrary dllcall ECDF Editor error handling errors floating network GAUSS Engine Geometric mean graphics GUI hardware histogram hotkeys if statements installation Java API linux localization Matlab convert matlab translation matrices matrix initialization matrix manipulation Maxlik MaxLikMT Memory output pgraph graph PQG graphics RAM random numbers RedHat 6.1 simulation string functions strings threading threads loops Time Series writing dataRecent Questions
Features
Resources
error G0462 : Negative trim value
Dear forum,
I am estimating a linear feedback model with sequential instruments using the GAUSS programme EXPEND from Frank Windmeijer I get the following error message:
D:\gauss\expendnmJKR.prg(99) : error G0462 : Negative trim value Currently active call: makezi [99] D:\gauss\expendnmJKR.prg Stack trace: makezi called from D:\gauss\expendnmJKR.prg, line 149 makezz called from D:\gauss\expendnmJKR.prg, line 1041
The lines 149 and 1041 in expendnmJKR.prg contain:
149: z = makezi(yx,year,ji); 1041: w = invpd(makezz);
Could anyone tell me, what this error means and how it possibly can be solved?
Thanks in advance
Jürgen
P.S.: GAUSS 13.0.2 build 2940
1 Answer
It appears that on line 99 in file expendnmJKR.prg is a call to the GAUSS function trimr. This function takes 3 inputs. The first argument is a matrix to be “trimmed”. The second argument is how many rows to trim, or remove from the top of the matrix. The third argument is how many rows to remove from the bottom of the matrix.
Either the second or third argument to trimr is negative. The error means that the program is trying to remove a negative number of rows from a matrix.
The fastest way to see what is going on is probably to stick a breakpoint on that call to trimr, then run the debugger to that point and see which value is negative. Then you can look backwards and see what went wrong.

