My problem was an error reading variable names in data file.
that variable names were strangely wrong with system annotations I do not
 understand.
When I imported the same data file into SAS,I found the error.

It was very unusual to me why the R or windows OS resulted in that kind of
error.

I really thank Roger who helped me.

2012년 9월 25일 화요일에 Roger Bivand님이 작성:

> On Tue, 25 Sep 2012, gum hwang wrote:
>
>  Howdy, Grus
>>
>> If this message is overlapped, please forgive me.
>>
>> I have some troubles with SPLM package of R.
>> I am trying to estimate some parameters and their model using SPML in SPLM
>> package of R.
>> Could you tell me some tips to solve my problem below ?
>>
>
> Try:
>
> lm(fm.2, data = mega.data, na.action=na.fail)
>
> and see if you get the same error. It looks as though there are different
> numbers of observations on some variables. Also always run traceback()
> after any error you do not understand, to see the calling sequence of
> functions. Here model.frame.default() was the failing function, which is
> also called in lm(), hence my suggestion. It is also possible that you have
> multiple objects called Census, say both in the global environment and in
> mega.data.
>
> Hope this clarifies,
>
> Roger
>
>
>
>> ------------------------------**------------------------------**
>> ------------------------------**------------------------------**
>> ------------------------------**--
>> ...
>> fm.2 <- mr2.tent ~ Census + Den + CmtSch + CmtPop + SchPop + StayPop +
>> DayPop
>>     + firm + firm500 + RegWrk + GrsWrk + MnfFirm + MnfReg+ MnfGrs
>> ...
>>
>>> fespaterr <- spml(fm.2, data = mega.data, listw = mat2listw(megaww),
>>>
>> model="within", spatial.error="b")
>> Error in model.frame.default(object, data, xlev = xlev) :
>>  variable lengths differ (found for 'Census')
>>
>>>
>>>
>> For variaable reference,
>> Y variable is mr2.tent.
>> X variables are population and firm workers.
>> Population is Census, Den, CmtSch, CmtPop, SchPop, StayPop,  DayPop.
>> Firms are  firm and firm500.
>> Firm workers are RegWrk, GrsWrk, MnfFirm, MnfReg,  MnfGrs.
>> ------------------------------**------------------------------**
>> ------------------------------**------------------------------**
>> ------------------------------**----
>>
>> I appreciate in advance,
>>
>>
>>
> --
> Roger Bivand
> Department of Economics, NHH Norwegian School of Economics,
> Helleveien 30, N-5045 Bergen, Norway.
> voice: +47 55 95 93 55; fax +47 55 95 95 43
> e-mail: Roger.Bivand@nhh.no
>
>

-- 
Kum Hoe Hwang, Ph.D.
82-31-250-3516
Guynggi Research Institute(GRI), Korea (ROK)

	[[alternative HTML version deleted]]

