|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
#1 (permalink) |
|
Eager!
Join Date: Feb 2007
Posts: 71
![]() |
Errors using LeSage's MATLAB code for Spatial Econometrics
I've been trying out some of the functions related to spatial regression using James LeSage's MATLAB toolbox and keep running into errors when I try using the SAR function and the DARP function.
Has anyone else had this experience? I'm not really sure what to do next.
_ _ _ _ SIG _ _ _ _
Attending: University of Maryland AREC
|
|
|
|
|
|
#3 (permalink) |
|
Eager!
Join Date: Apr 2009
Posts: 78
![]() |
I wasn't familiar with the toolbox, but I downloaded it and everything seemed to work fine for me. My only thought is that perhaps you forgot to set it up so matlab can access files out of the different folders.
MATLAB - Documentation The easiest way is to go to file -> set path then click on the "add with subfolders..." button, then navigate to where you have the jplv7 folder, highlight it and click okay. Then everything should hopefully work. If you can post most specifically what the errors say people can probably offer more help. |
|
|
|
|
|
#4 (permalink) |
|
Eager!
Join Date: Feb 2007
Posts: 71
![]() |
Thank you for this.
What is the jplv7 folder? This is the error message I get after using SAR (and I did try the add with subfolders thing with just the SAR folder): ??? Error using ==> f_sar at 53 f_sar: Wrong # of input arguments Error in ==> fminbnd at 212 x= xf; fx = funfcn(x,varargin{:}); Error in ==> sar at 195 [p,liktmp,exitflag,output] = fminbnd('f_sar',lmin,lmax,options,eo,el,W,detval); Error in ==> k_sar at 19 res = sar(y,x,W); I also got this message when I started up MATLAB: Warning: Could not get change notification handle for local C:\Program Files\MATLAB\R2008a\work. Performance degradation may occur due to on-disk directory change checking.
_ _ _ _ SIG _ _ _ _
Attending: University of Maryland AREC
|
|
|
|
|
|
#5 (permalink) |
|
Eager!
Join Date: Apr 2009
Posts: 78
![]() |
Sorry about the confusion with the jplv7 folder. I downloaded the toolkit from here: Econometrics Toolbox for MATLAB
and it decompresses into a folder called jplv7, so I incorrectly assumed it was the same for you. What you should do then is do the add with subfolders with whatever folder contains the SAR folder and all of the other folders (coint, data, diagn, etc) I'm not sure if this will fix your problem though. Have you tried running the demo files: sar_d, sar_d2, and sar_d3? If those work, then you know that the problem isn't with his code but with your own. One thing t may be is that our code is slightly different. For example where you have: Code:
[p,liktmp,exitflag,output] =
fminbnd('f_sar',lmin,lmax,options,eo,el,W,detval);
Code:
[prho,liktmp,exitflag,output] = fminbnd('f_sar',rmin,rmax,options,detval,epe0,eped,epe0d,n);
Otherwise I'm not sure what's wrong. Apparently you aren't using f_sar with the right number of inputs (there should be 6), but it's probably another one of his codes doing that and not you. I would try running the demo files and then try updating the toolkit and see if that fixes it. Otherwise you should post or pm me your code and files so I can try to figure out what's going on. As for the change notification handle warning, it's not a huge deal. What it means is that it won't automatically check all your files to see if they've been changed or if any new files have been added to the directory. You can still make it recognize all changes manually after every change by typing Code:
clear all path(path) Good luck! |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Contact TestMagic TestMagic Forums Archive Privacy Statement
TestMagic Locations
Legal
Privacy
SEO by vBSEO 3.2.0
Copyright © 2009 TestMagic
Ad Management by RedTyger