guRus

I have a unique problem in trying to fit a model using specifyModel. I am
trying to fit a model where the price of a variable kc is related to the
volatility of the variable kc and an external data myBRCOF which has only
54 rows. The myVolat(kc) has 10154 rows.
I am not sure if a fit of such nature is possible at the first place but
intuitively I thought I am right (don't we all think so?!).
I ran the following first without the na.rm option and then again with the
na.rm  option and in both cases I get the identical error messages.


 mydata.model=specifyModel(Cl(kc) ~ myVolat(kc) + myBRCOF(kc))
Error in model.frame.default([email protected], data = env, na.action =
NULL) :
  variable lengths differ (found for 'myBRCOF(kc)')


mydata.model=specifyModel(Cl(kc) ~ myVolat(kc) + myBRCOF(kc),na.rm=TRUE)
Error in model.frame.default([email protected], data = env, na.action =
NULL) :
  variable lengths differ (found for 'myBRCOF(kc)')

Can someone help please? The str below..


str(kc)
An 'xts' object on 1973-08-17/2014-03-31 containing:
  Data: num [1:10148, 1:5] 70.2 70.3 69.2 69.1 67.7 ...
 - attr(*, "dimnames")=List of 2
  ..$ : NULL
  ..$ : chr [1:5] "Open" "High" "Low" "Close" ...
  Indexed by objects of class: [Date] TZ: UTC
  xts Attributes:
List of 1
 $ na.action:Class 'omit'  atomic [1:14] 6594 6595 8627 9840 9841 9845 9858
9877 9946 9974 ...
  .. ..- attr(*, "index")= num [1:14] 9.46e+08 9.47e+08 1.20e+09 1.36e+09
1.36e+09 ...


 str(myBRCOF(kc))
An 'xts' object on 1961-12-31/2014-12-31 containing:
  Data: num [1:54, 1] 29800 39600 28900 23200 11000 37700 21000 24500 17000
21000 ...
 - attr(*, "dimnames")=List of 2
  ..$ : NULL
  ..$ : chr "1000 60 KG BAGS"
  Indexed by objects of class: [Date] TZ: UTC
  xts Attributes:
 NULL

str(myVolat(kc))
An 'xts' object on 1973-08-17/2014-03-31 containing:
  Data: num [1:10148, 1] NA NA NA NA NA ...
  Indexed by objects of class: [Date] TZ: UTC
  xts Attributes:
List of 1
 $ na.action:Class 'omit'  atomic [1:14] 6594 6595 8627 9840 9841 9845 9858
9877 9946 9974 ...
  .. ..- attr(*, "index")= num [1:14] 9.46e+08 9.47e+08 1.20e+09 1.36e+09
1.36e+09 ...





Thx
Raghu

        [[alternative HTML version deleted]]

_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

Reply via email to