Displaying 6 results from an estimated 6 matches for "demand2".
Did you mean:
demand
2005 May 25
3
Problem with systemfit 0.7-3 and transformed variables
...example: this is, of course, OK:
> data(kmenta)
> demand <- q ~ p + d
> instr <- ~ d + f
> fit1 <- systemfit("2SLS", eqns=list(demand), inst=instr, data=kmenta)
But, now if I'd like to estimate a model with logarithm of p as a regressor,
an error occurs:
> demand2 <- q ~ log(p) + d
> fit2 <- systemfit("2SLS", eqns=list(demand2), inst=instr, data=kmenta)
Error in log(p) : Object "p" not found
However, estimating the same formula with OLS using the regular 'lm' is OK:
> fit2.ols <- lm(demand2, kmenta)
Transforming a...
2003 Oct 17
2
nlm, hessian, and derivatives in obj function?
...linear model isn't
the "optimal" method, but I would like to make sure the parameter estimates
and the se's are matching before I attempt more difficult problems.
rm(list=ls(all=TRUE))
print( "running nlsystemfit models test at end...")
data( kmenta )
attach( kmenta )
##demand2 <- q ~ d0 + d1 * p + d2 * d
supply2 <- q ~ s0 + s1 * p + s2 * f + s3 * a
##system2 <- list( demand2, supply2 )
##labels <- list( "Demand", "Supply" )
##inst <- ~ d + f + a
##sv2 <- c(d0=3,s2=2.123,d2=4,s0=-2.123,s3=4.234,d1=4.234,s1=0.234)
sv2 <- c(s0=-2.123...
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: http://www.nabble.com/SystemFit-tp24588252p24588252.html
Sent from the R help...
2003 Sep 30
1
can't get names from vector in nlm calls
...lhs[[i]] <- eval( formula( eqns[[i]] )[2] )
rhs[[i]] <- eval( formula( eqns[[i]] )[3] )
residi[[i]] <- lhs[[i]] - rhs[[i]]
r <- rbind( r, as.matrix( residi[[i]] ) )
}
## blah, blah, blah....
knls <- obj
}
print( "calling nlstest" )
demand2 <- q ~ d0 + d1 * p + d2 * d
supply2 <- q ~ s0 + s1 * p + s2 * f + s3 * a
system2 <- list( demand2, supply2 )
sv2 <- c(d0=3,d2=4,d1=4.234,s0=-2.123,s2=2.123,s3=4.234,s1=0.234)
### call the nlm function to get the estimates...
estnew <- nlm( knls, sv2, hessian=TRUE, print.level=1, eqn...
2003 Oct 06
1
getting names of p vector in nlm function...
...lhs[[i]] <- eval( formula( eqns[[i]] )[2] )
rhs[[i]] <- eval( formula( eqns[[i]] )[3] )
residi[[i]] <- lhs[[i]] - rhs[[i]]
r <- rbind( r, as.matrix( residi[[i]] ) )
}
## blah, blah, blah....
knls <- obj
}
print( "calling nlstest" )
demand2 <- q ~ d0 + d1 * p + d2 * d
supply2 <- q ~ s0 + s1 * p + s2 * f + s3 * a
system2 <- list( demand2, supply2 )
sv2 <- c(d0=3,d2=4,d1=4.234,s0=-2.123,s2=2.123,s3=4.234,s1=0.234)
### call the nlm function to get the estimates...
estnew <- nlm( knls, sv2, hessian=TRUE, print.level=1, eqn...
2006 Mar 13
4
undefined method `validates_presence_of'' for #<ProductsContr
Hi,
I am trying to use method `validates_presence_of'' for validating my
input fields on form . I m using it in my action class as follows:-
=======================
validates_presence_of(params[:product][:quantity])
======================
But when I am running my application i m getting error like:-
=========================
undefined method `validates_presence_of'' for