Re: [R] Errors with systemfit package and systemfitClassic()

From: Arne Henningsen <ahenningsen_at_email.uni-kiel.de>
Date: Thu, 07 Jun 2007 08:16:10 +0200

Hi iamisha1:

Sorry for answering so late!

On Wednesday 09 May 2007 23:47, iamisha1_at_comcast.net wrote:
> I get the following error message after using the sysfit package's function
> 'systemfitClassic':
>
> Error in data[[eqnVar]] : subscript out of bounds
>
> When I do this:
>
> MSYS1 <- cbind(Y, Num, F, PO, PD, GO, GD)
> MigOLS1 <- systemfitClassic("OLS", F ~ PO + PD + GO + GD, eqnVar = "Num",
> timeVar = "Y", data = MSYS1) and I get this error message:

Argument "data" must be a "data.frame" (please read the documentation!). Hence,

   systemfitClassic( [...], data = as.data.frame( MSYS1 ) ) or

   MSYS1 <- as.data.frame( cbind(Y, Num, F, PO, PD, GO, GD) ) should work.

Arne

>
> Error in inherits(x, "factor") : attempt to select more than one element
>
> when I do this (removing quotes from columns set as 'eqnVar' and
> 'timeVar'):
>
> MSYS1 <- cbind(Y, Num, F, PO, PD, GO, GD)
> MigOLS1 <- systemfitClassic("OLS", F ~ PO + PD + GO + GD, eqnVar = Num,
> timeVar = Y, data = MSYS1)
>
> When I query 'typeof()' I get the following:
>
> Y: Integer
> Num: Integer
> F: Integer
> PO: Integer
> PD: Integer
> GO: Double
> GD: Double
>
> I have set my data up in a manner analogous to that in the examples in the
> systemfit documentation. Also, the panel is balanced. If it matters, here
> are some descriptions of the data:
>
> Y: Year
> Num: ID of Flow
> F: Flow
> PO: Origin Population
> PD: Destination Population
> GO: Origin GDP
> GD: Destination GDP
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html and provide commented, minimal,
> self-contained, reproducible code.

-- 
Arne Henningsen
Department of Agricultural Economics
University of Kiel
Olshausenstr. 40
D-24098 Kiel (Germany)
Tel: +49-431-880 4445
Fax: +49-431-880 1397
ahenningsen_at_agric-econ.uni-kiel.de
http://www.uni-kiel.de/agrarpol/ahenningsen/

______________________________________________
R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 07 Jun 2007 - 06:26:23 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 07 Jun 2007 - 09:31:39 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.