# economics

• ## how to gen variable = 1 if at least two dummy variables == 1 in Stata?2019-03-13

I am trying to generate a dummy variable that = 1 if at least two or more (out of seven) dummy variables also == 1. Could anybody tell me an efficient way of doing this? --------------Solutions------------- Let's suppose that the indicator variables

• ## Tax calculation issue for a Prestashop Plugin2015-01-19

I am building a Prestashop plugin, and i have stumbled on to this tax calculation issue. The program flow is as follows: A person places an order at the eCommerce website, the order is accepted, the order details such as items, prices, taxes, discoun

• ## How to write function to extract specific data?2014-07-17

I want to write a function to plot desired model fridgerators' daily price. Here is a mini example with my problem: data <- read.table(header=TRUE,text=' date price model 2012-01-01 100 Frenchdoor 2012-01-01 150 Bottom 2012-01-02 110 Frenchdoor 20

• ## Sub setting panel data2012-04-18

Very new, so let me know if this is asking too much. I am trying to sub set panel data, in R, into two different categories; one that has complete information for variables and one that has incomplete information for variables. My data looks like thi

Tags: statistics, economics
• ## An algorithm for economic simulation?2012-02-05

I would like to create a game where the players create differents products with different prices (call it offers), and I give them a certain number of customers (call it demands). Now, I want an algorithm to decid what's the market share of each play

Tags: algorithm, economics
• ## Finding the nearest quantity based on price and amount to get2011-09-28

I've got a small maths problem in which I need to determine a quantity based on a cost price and a final amount. Now this is easy in theory as it's simply final amount/actual cost = quantity, except in my case the actual cost changes based on the qua

Tags: math, economics
• ## Suggestions for building an Economic Simulator? 2011-08-16

I'm trying to construct an OOP/turn-based economic simulator that a) uses AI to simulate rational decision-making b) allows optimal speed with multiple agents interacting and reacting per turn and c) tracks data and logs it to a database. I'm using J

• ## What R data package (or data from other source) with many variables to econometric model?2011-06-13

I would like to ask if you know any R packages with data to do linear econometric model ( least squares method). I must have 5-7 variables (some of them can occure insignificant later). I should check heteroscedascity, autocorelation, catalysis etc.

Tags: data, model, economics
• ## Simple formula for adjusting price based on supply & demand2011-04-19

I'm designing a rpg/mud game with merchant NPCs and I want their prices to adjust dynamically based on supply & demand. What I have already figured out: I don't need a complex, "realistic" system but just a simple multiplier based on some statist

• ## Micro-economics for CS students2011-04-05

I recently went through the article on "Advice for Computer Science College Students", by Joel Spolsky - http://www.joelonsoftware.com/articles/CollegeAdvice.html . In that Joel says that a programmer who understands the fundamentals of business is g

• ## Oaxaca Decomposition in R2011-02-25

I would like to make a Oaxaca Decomposition in R. It is used in e.g. labor economics to distinguish explained variance versus unexplained variance, I believe. I have not been able to find a suitable solution in R, and I am rather reluctant to create

Tags: r, economics, stata
• ## Programming Neural Networks with Python?2010-09-02

I'm a College student (Economics) and I want to program some monetary models using Neural Networks. I want those models to be able to predict future values of some variables using economic data, but I really don't know how to "model" the program itse

• ## How to find balanced panel data in R (aka, how to find which entries in panel are complete over given window)2010-06-22

I have a big panel of data from Compustat. To it I am adding some hand-collected data (seriously hand-collected from a stack of old books). But I don't want to hand-collect for the entire panel, only a randomly selected subset. To find the larger set

Tags: r, economics
• ## Why does Google provide public hosting of popular JavaScript formats?2010-01-29

Does Google track my coding habits to show Google ads in their search if i use any their hosted JavaScript framework? ...Or is there some other reason for them to host these? What is the benefit to them from hosting these frameworks? --------------So

Tags: economics
• ## "symbiosis" between open-source projects and corporate users (or how to get your employer to make financial contributions)2009-12-09

I do most of my programming as one-off work ("scaffolding" code for testing, data analysis, etc.) for a small company + have benefited a lot from open-source software projects over the past 5-10 years. Many of the libraries I've used are free and hav

Tags: open source, economics
• ## STATA foreach loop odd behavior2009-10-24

I'm getting odd behavior (it generates only missing values) from the following loop - foreach x of varlist name { egen totalcapx'=total(cap) if unit!=0 & name=="x'", by(year) } But if I were to do just egen totalcapSOMENAME=total(cap) if unit!=0

Tags: loops, economics
• ## Benefit cost analysis libraries2009-09-03

I was wondering if there are any opensource libraries that are geared towards transportation ben/cost analysis. I currently use microBENCOST and would like to build my own solution. I'm most comfortable with C/c++ and Python. cheers --------------Sol

Tags: c#, python, transport, economics
• ## Voting economy: balancing credits properly2009-07-18

Many websites today (including stackoverflow) and games allow people to perform voting, give feedback, enable additional features etc, according to a score: eg. reputation, or MMORPG credits. As a programmer that will probably need to implement a com

Tags: economics
• ## Economics of software development2008-12-27

Can anyone point me towards any references that attempt to formulate an economics of software development? In my own research, I discovered a book by Barry Boehm on this, but it seems very awkward and theoretical. Dependency Structure Matrices seem t