From: William P. Y. H. <wil...@gm...> - 2005-12-31 08:06:16
|
When doing my homework, I needed regress and rcoplot. So I've written them, but they're far from completed. The problems I have are: For regress: 1. In the Matlab documentation from www.mathworks.com (for regress), it mentions QR factorization (using QR factorization instead of computing an inverse matrix). Can anyone explain to me about this and maybe modify the code? 2. The confidence interval for beta as returned by regress differs from the one returned by Matlab's regress (I compared my results with my friend's results, and also another set of data from my textbook). I've implemented the formulas on my textbook (don't ask -- it's in Chinese, but if you would like to know the formulas, I can post it here), but I still don't know what went wrong. A note: for any particular dataset, the intervals seem to be scaled with a factor which is dependent on the dataset. So if Matlab's interval is [b-m,b+m], then mine would be [b-qm,b+qm], with q < 1. But I don't know where this q comes from, and for every dataset it is different. 3. The p value calculated is different from my friend's calculation (using Matlab). For rcoplot: 1. The round circles in the middle are ugly 2. It's a bit slow, but that's the fastest I can get. I've tried looping the plot command (and using hold on/off), but that's slower. Note that I'm using % for my comments, because I was comparing it with my friend's data, and he only knows Matlab. When the problems above are solved, I'll tidy up the functions and submit them (to octave-forge? or to Octave?). Please help :) -- William Poetra Yoga Hadisoeseno |