search for: fitsur

Displaying 6 results from an estimated 6 matches for "fitsur".

2011 Jun 28
2
How do I output all the R-squares of an SUR? summary(fitSUR$eq[[1:4]])$r.squared does not work
Greetings R Users, I have a system of equations for which I would like to output all the R-squares. Assume there are four equations in my system, the only way I found to output all the R-squares is by calling them out one by one as this: summary(fitSUR$eq[[1]])$r.squared summary(fitSUR$eq[[2]])$r.squared summary(fitSUR$eq[[3]])$r.squared summary(fitSUR$eq[[4]])$r.squared But isn't there a way of making this automatic, for example, something more along the way of summary(fitSUR$eq[[1:4]])$r.squared ? The above does not work, by the way. I...
2009 Aug 18
3
R formula
Hi I was trying to estimate simultaneous equation system in R using systemfit. I used the following commands >library(systemfit) > data(Kmenta) > attach(Kmenta) >eqDemand<-consump~price+income > eqSupply<-consump~price+farmprice+trend > fitsur<-systemfit("SUR",list(demand=eqDemand, supply=eqSupply)) and got the following error messege Error in systemfit("SUR", list(demand = eqDemand, supply = eqSupply)) : argument 'formula' must be an object of class 'formula' or a list of objects of class 'for...
2004 Nov 29
3
systemfit - SUR
Hello to everyone, I have 2 problems and would be very pleased if anyone can help me: 1) When I use the package "systemfit" for SUR regressions, I get two different variance-covariance matrices when I firstly do the SUR regression ("The covariance matrix of the residuals used for estimation") and secondly do the OLS regressions. In the manual for "systemfit" on page
2007 Apr 13
0
Problem with predict in systemfit
...rmation, please just let me know and I will tell him. Thanks. -----Original Message----- Sent: Friday, April 13, 2007 3:58 PM To: Leeds, Mark (IED) Subject: R question I am using the "predict" function after I have done a simultaneous estimation of a system using "systemfit". fitsur is the output of systemfit and "system" is my system of equations, "SUR" is the Seemingly Unrelated Regrssions method of estimation. fitsur<-systemfit("SUR",system) I am supposed to be able to use the estimated coefficients for out-of-sample prediction using a dif...
2010 Sep 03
1
How to use lm() output for systemfit() 'Seemingly unrelated regression'
...systemfit package. Basicaly, the problem s following - I generate several formulas using lm() > fo1 <- lm(r98[,2] ~ f98[,1] + f98[,2] + ... + f98[,43]) > fo2 <- lm(r98[,1] ~ f98[,1] + f98[,2] + ... + f98[,43]) and than I want to estimate a general model using package systemfit. > fitsur <- systemfit("SUR",list(as.formula(fo),as.formula(foo))) and I get following error: Error in systemfit("SUR", list(as.formula(fo), as.formula(foo))) : argument 'formula' must be an object of class 'formula' or a list of objects of class 'formula'...
2007 May 23
0
Changing sequential regression code to call systemfit
...xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx eqDemand <- consump ~ -1 + price + income eqSupply <- consump ~ -1 + price + farmPrice + trend system<-list( demand = eqDemand, supply = eqSupply) #xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Then, the call to systemfit is fitsur<- systemfit( "SUR", system) Does anyone know how to change the code in the for loop ( I can deal with the two lines with x$ ) to mimic the 3 lines between The xxxxxxxxxxxxxxxxxxxx lines ? I'm not good enough in R to do this but my guess is that it is possible because datares and...