This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(ggplot2) | |
#data points | |
p <- data.frame(t=seq(-2*pi, 2*pi, 0.1)) | |
#1.. drawing polar rose | |
c <- ggplot(p, aes(x=t, y=cos(3*t))) | |
c + geom_line() + coord_polar() | |
#2.. another one with sine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ontext | |
PROBLEM STATMENT | |
EV analysis from Hazell-Norton | |
AIM: draw the EV-frontier for the following farm planning problem | |
MODEL 1. EXPECTED PROFIT MAXIMIZATION (farm with fixed land, 4 crops, fixed labour and a rotational constraint) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ontext | |
PROBLEM STATMENT | |
EV analysis from Hazell-Norton | |
ctnd. from ev.gms | |
Extension: find the optimal farm decision based on EUH; having the EV-frontier and assuming a utility function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(gdxrrw) | |
library(ggplot2) | |
# path to the gams installation | |
igdx("n:/soft/gams/gams23.8_64") | |
# data input | |
gdxName <- "EV" | |
symName <- "EV_frontier" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$title A Macro to Compute Exponential Growth Rates | |
$ontext | |
originally posted by T. Rutherford on the gams mailing list | |
http://www.mpsge.org/exprate.html | |
extended by me with a nested macro solution (probably easier to follow) | |
$offtext | |
$ontext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ontext | |
Freund showed that the expected utility of a normally distributed gamble given | |
negative exponential preferences could be written as: | |
E(U(x)) = mu(x) - rho/2 * sigma^2(x) | |
where mu and sigma are the mean and standard deviation of the normally distributed gamble | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ontext | |
Email: | |
"Dear GAMS Users, | |
Do you have some examples or code files for panel data estimation in GAMS? I was thinking to combine two indices - individual and time, into one index and run OLS, but I could not get any idea of combining two sets into one. | |
I guess there is some smart way to do panel data estimation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ontext | |
Email: | |
"Dear GAMS Users, | |
Do you have some examples or code files for panel data estimation in GAMS? I was thinking to combine two indices - individual and time, into one index and run OLS, but I could not get any idea of combining two sets into one. | |
I guess there is some smart way to do panel data estimation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ontext | |
"Is there some GAMS template around to determine the definiteness of a given | |
matrix? (At the moment, I need it for a 5x5 matrix, but the dimension will | |
eventually be higher.) | |
Or is it advisable to switch to another math package for solving this? | |
Stefan" |
OlderNewer