similar to: Problem with systemfit 0.7-3 and transformed variables

Displaying 20 results from an estimated 900 matches similar to: "Problem with systemfit 0.7-3 and transformed variables"

2003 Oct 17
2
nlm, hessian, and derivatives in obj function?
I've been working on a new package and I have a few questions regarding the behaviour of the nlm function. I've been (for better or worse) using the nlm function to fit a linear model without suppling the hessian or gradient attributes in the objective function. I'm curious as to why the nlm requires 31 iterations (for the linear model), and then it doesn't work when I try to add
2003 Sep 30
1
can't get names from vector in nlm calls
I've been trying to figure out how to get the names of the parameter vector variables when inside the function that nlm calls to return the objective function value: knls <- function( theta, eqns, data, fitmethod="OLS", instr=NULL, S=NULL ) { ## print( names( theta ) ) # returns NULL ## get the values of the parameters for( i in 1:length( theta ) )
2003 Oct 06
1
getting names of p vector in nlm function...
Dear R programming folks: I'm trying to finish off a package for non-linear simultaneous system estimation and I've been trying to figure out how to get the names of the parameter vector variables when inside the function that nlm calls to return the objective function value: knls <- function( theta, eqns, data, fitmethod="OLS", instr=NULL, S=NULL ) { ## print(
2005 Dec 02
3
masked from package:base?
I am confused by the following description in http://www.maths.lth.se/help/R/.R/library/systemfit/html/hausman.systemfit.html what does the "Not run" mean? if we do not load systemfit, how can we run the following code? ## Not run: library( systemfit ) data( kmenta ) attach( kmenta ) ... I install the package of systemfit, and run the code. I got the warning: > library( systemfit
2009 Jul 23
2
SystemFit
Hi, I have two products which are substitudes. I try to fix a system as below to mydata. Demand1 = A1 -B1*Price1 + C1*Price2 Demand2 = A2 +B2*Price1 - C2*Price2 I would expect C1 & B2 to be symmetric, If they are truly substitude. How can I enforce this symmetry when creating a system of equations via SystemFit ? -- View this message in context:
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
2012 Oct 28
6
Hausman test in R
Hi there, I am really new to statistics in R and statistics itself as well. My situation: I ran a lot of OLS regressions with different independent variables. (using the lm() function). After having done that, I know there is endogeneity due to omitted variables. (or perhaps due to any other reasons). And here comes the Hausman test. I know this test is used to identify endogeneity. But what I
2012 Mar 21
1
How to do 2SLS in R
Hi List I want to carry out structural mode. Following Example l have taken from Basic Econometrics- Damodar Gujarati : Advertising intensity function: Ad/S = a0 + a1M + a2 (CD/S) + a3C + a4C2 + a5Gr + a6Dur – (1) Concentration function: C = b0 + b1 (Ad/S) + b2 (MES/S) -(2) Price-cost margin function: M = c0 + c1(K/S) + c2Gr + c3C + c4GD + c5(Ad/S) + c6 (MES/S)
2011 Mar 28
1
maximum likelihood accuracy - comparison with Stata
Hi everyone, I am looking to do some manual maximum likelihood estimation in R. I have done a lot of work in Stata and so I have been using output comparisons to get a handle on what is happening. I estimated a simple linear model in R with lm() and also my own maximum likelihood program. I then compared the output with Stata. Two things jumped out at me. Firstly, in Stata my coefficient
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 05
2
about systemfit
Hello. I am still a newbie in R. Excuse me if I am asking something obvious. My efforts to get an answer through browsing the mailing archives failed. I want to perform an augmented Dickey-Fuller test and to obtain AIC and BIC and to be able to impose some linear restrictions on the ADF regression so as to decide the correct order of autoregression. However I could find no obvious way to impose
2007 May 23
1
I made some progress on my previous "systemfit" question but still not quite there
Surprisingly, I played around with some test code and below actually creates equations that look correct. tempmat<-matrix(10,nrow=6,ncol=6) restrictmat<-diag(6) colnames(tempmat)<-c("AUD.l1","CHF.l1","CAD.l1","GBP.l1","EUR.l1","JPY.l 1")
2007 Feb 19
1
Urgent: How to obtain the Consistent Standard Errors after apply 2SLS through tsls() from sem or systemfit("2SLS") without this error message !!!!!!!!!!!!!
Hi, I am trying to obtain the heteroskedasticity consitent standard errors (HCSE) after apply 2SLS. I obtain 2SLS through tsls from package sem or systemfit: #### tsls #### library (sem) Reg2SLS <-tsls(LnP~Sc+Ag+Ag2+Var+R+D,~I2+Ag+Ag2+Var+R+D) summary (Reg2SLS) #### systemfit #### library (systemfit) RS <- LnP~Sc+Ag+Ag2+Var+R+D Inst <- ~I2+Ag+Ag2+Var+R+D labels
2009 May 29
1
Error messages/systemfit package
Hello !   I’m trying to estimate a system of equation (demand and supply) using the systemfit package.  My program is:   library(systemfit) demand <- tsyud ~ tsyud1 + tsucp + tspo + tssn supply <- tscn ~ tsyn + tsqn + tsksn + tsucp system <- list(demand=eqdemand, learning = eqsupply) labels <- list(demand="eqdemand", learning="eqsupply") inst <- ~ tsupp1 + tsupp2
2007 Aug 16
0
summarising systemfit with saveMemory
Hi all - I'm on R 2.5.1 for XP. in the systemfit package, the summary is set to print the McElroy's measure of fit unless it's NULL. When the option saveMemory = TRUE, the McElroy isn't included, instead it defaults to NA. Thus I am unable to use summary.systemfit. > library(systemfit) > example(systemfit) > surfit2 <-
2003 Jul 16
2
Weighted SUR, 2SLS regressions
Is there an option for running SUR and 2SLS regressions with weighting (I am analysing mortality in towns, hence want to weight by population size) Many thanks Jon Anson -- Yonathan (Jon) Anson Department of Social Work Ben Gurion University of the Negev 84105 Be'er Sheva, Israel. Tel: +972 8 647 93 14(w) +972 8 6489286 (h) 067 233279 (m) Fax: +972 8 647 29 33
2006 Jul 13
1
ols/gls or systemfit (OLS, WLS, SUR) give identical results
I might be sorry for asking this question :-) I have two equations and I tried to estimate them individually with "lm" and "gls", and then in a system (using systemfit) with "OLS", "WLS" and "SUR". Quite surprisingly (for myself at least) the results are identical to the last digit. Could someone (please!) give a hint as to what am I
2009 Oct 28
1
New variables "remember" how they were created?
Hello all, I hope this question is appropriate for this ML. Basically, I am wondering if when you create a new variable, if the variable holds some information about how it was created. Let me explain, I have the following code to replicate an example in a textbook (Greene's Econometric Analysis), using the systemfit package. dta <-
2011 Jan 16
1
Hausman Test
Hi, can anybody tell me how the Hausman test for endogenty works? I have a simulated model with three correlated predictors (X1-X3). I also have an instrument W for X1 Now I want to test for endogeneity of X1 (i.e., when I omit X2 and X3 from the equation). My current approach: library(systemfit) fit2sls <- systemfit(Y~X1,data=data,method="2SLS",inst=~W) fitOLS <-
2006 Jan 12
1
Problem with NLSYSTEMFIT()
Hello, I want to solve a nonlinear 3SLS problem with "nlsystemfit()". The equations are of the form y_it = f_i(x,t,theta) The functions f_i(.) have to be formulated as R-functions. When invoking "nlsystemfit()" I get the error Error in deriv.formula(eqns[[i]], names(parmnames)) : Function 'f1' is not in the derivatives table