Google APP Engineを使ってみる

最近,Pythonに深く関心を寄せているのですが,その理由の一つにGoogle app engineの存在があります.なんといっても無料でGoogleのリソース上にWebアプリをつくることができ,ストレージは 500 MB までページビューは月間 500 万まで利用可能というのは素晴…

The effect of social comparisons on commute well-being

Abou-Zeid, M. and Ben-Akiva, M., The effect of social comparisons on commute well-being, Transportation Research Part A, Article in Press, 2011.相変わらずブログを放置気味だったし,D論書かなきゃいかんけど春なので時間も少しあるということで論…

Rを使ってYahoo!乗換案内から運賃や所要時間,乗換回数を取得するコード書いた

R

(※追記あり) 数日前にスクレイピングという言葉を学び,とりあえずRでやってみた.まだまだ勉強途中なのでいろいろ間違ってるかもしれないし,計算速度もそんなに速くないのだけど,どなたか詳しい人ご教授ください.むしろもっと楽な方法があれば是非!内…

Dynamic commuter departure time choice under uncertainty

Jou, R.-C., Kitamura, R., Weng, M.-C., Chen, C.-C., Dynamic commuter departure time choice under uncertainty, Transportation Research Part.A, Vol.42, pp.774-783, 2008.通勤行動の出発時刻選択に対して,許容可能な最も速い出発時刻tEと就業開始時…

Framing, Probability Distortion, and Insurance Decisions

Johnson, E.J., Hershey, J., Meszaros, J., Kunreuther, H., Framing, Probability Distortion, and Insurance Decisions, Jornal of Risk and Uncertainty, Vol.7, pp.35-51, 1993.保険を購入する際のリスク評価と保険選択において,被験者はリスクやプレ…

Rational Choice and the Framing of Decisions

Tversky, A. Kahneman, D., Rational Choice and the Framing of Decisions, Journal of Business, Vol.59, Issue.4, pp.S251-S278, 1986. 期待効用最大化理論の4つの仮定 Cancellation Transitivity Dominance Invariance certainty effectとpseudocertain…

Investigating the distribution of the value of travel time saving

Fosgerau, M., Investigating the distribution of the value of travel time saving, Transportation Research Part.B, Vol.40, pp.688-707, 2006.Fosgerauさんの論文は結構好きで地味なんだけどSPでずっと時間価値の研究をしている.いつもSPのデザインは…

Allowing for intra-respondent variations in coefficients estimated on repeted choice data

Hess, S. Rose, J.M., Allowing for intra-respondent variations in coefficients estimated on repeted choice data, Transportation Research Part.B, Vol.43, pp.708-719, 2009.繰り返し(パネル)データのintra-personalな異質性をmixed logitで扱おうと…

Value of time by time of day: A stated-preference study

Tseng, Y.-Y., Verhoef, E.T., Value of time by time of day: A stated-preference study, Transportation Research Part B, Vol.42, pp.607-618, 2008.この論文はとてもおもしろかった.というのも,よくあるのは移動中の時間価値を手段選択のパラメータか…

Choice models based on mixed discrete/continuous PDFs

J. Swait, Choice models based on mixed discrete/continuous PDFs, Transportation Research Part B, vol.43, pp.766-783, 2009.U_i = V_i + ε_i with probability q_i U_i = -∞ with probability 1 - q_i とすることで,混合分布として扱い,非補償型の意…

Information value and sequential decision-making in a transport setting: an experimental study

Denant-Boemont, L., Petiot, R., Information value and sequential decision-making in a transport setting: an experimental study, Transportation Research Part B, vol.37, pp.365-386, 2003.実験経済学的手法により情報価値(IV)を評価するという内容…

The information content of a stated choice experiment: A new method and its application to the value of a statistical life

J. Rouwendal, A. Blaeij, P. Rietveld, E. Verhoef, The information content of a stated choice experiment: A new method and its application to the value of a statistical life, Transportation Research Part B, Vol.44, pp.136-151, 2010.SPで時間…

Auction Theory with Private Values

E. S. Maskin, J.G. Riley, 1985, Auction Theory with Private Values, The American Economic Review, Vol. 75, No. 2, pp.150-155.AERの古めの論文であるが,private valueやasymmetryに対してのインプリがあり,短くて読みやすいが内容はそこそこおもし…

英語プレゼンテーション

また気付いたら1ヶ月くらい経っているという….先日,初めて英語プレゼンをする機会があり,しかもそれが自分の分野の大御所であるMoshe Ben-Akivaの前であり,そして自分の研究の進捗が散々なものであるという状況で非常に辛いものではありましたが,大変経…

Residential self-selection effects in an activity time-use behavior model

A.R.Pinjari, C.R.Bhat, D.A.Hensher, 2009, Residential self-selection effects in an activity time-use behavior model, Transportation Research Part B, Vol.43, Issue.7, pp.729-748.交通行動の分析だけでなく,住宅立地選択と活動時間選択を同時に扱…

Project Euler Problem 19

1900年1月1日は月曜日である。 9月、4月、6月、11月は30日まであり、2月を除く他の月は31日まである。 2月は28日まであるが、うるう年のときは29日である。 うるう年は西暦が4で割り切れる年に起こる。しかし、西暦が400で割り切れず100で割り切れる年はうる…

Project Euler Problem 18

以下の三角形の頂点から下まで移動するとき、その数値の合計の最大値は23になる。 3 7 5 2 4 6 8 5 9 3 この例では 3 + 7 + 4 + 9 = 23 以下の三角形を頂点から下まで移動するとき、その最大の合計値を求めよ。 75 95 64 17 47 82 18 35 87 10 20 04 82 47 6…

Project Euler Problem 17

1 から 5 までの数字を英単語で書けば one, two, three, four, five であり、全部で 3 + 3 + 4 + 4 + 5 = 19 の文字が使われている。 では 1 から 1000 (one thousand) までの数字をすべて英単語で書けば、全部で何文字になるか。 注: 空白文字やハイフンを…

Project Euler Problem 16

2^15 = 32768 であり、これの各数字の合計は 3 + 2 + 7 + 6 + 8 = 26 となる。 同様にして、2^1000 の各数字の合計を求めよ。 久々にやる.こういうのは簡単だなぁ. library(gmp) a1 <- as.bigz(2^1000) b1 <- numeric() for(i in 1:302){ b1[i] <- as.nume…

Project Euler Problem 14

正の整数に以下の式で繰り返し生成する数列を定義する。 n → n/2 (n が偶数) n → 3n + 1 (n が奇数) 13からはじめるとこの数列は以下のようになる。 13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1 13から1まで10個の項になる。この数列はどのような数字からは…

Project Euler Problem 11

08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65 52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91…

Project Euler Problem 15

2 × 2 のマス目の左上からスタートした場合、引き返しなしで右下にいくルートは 6 つある。 では、20 × 20 のマス目ではいくつのルートがあるか。 はいはい,瞬殺.中高生でもやり方わかるよ.コラッツの問題は詰まりそうだったので先にこっちを仕上げてみた…

Project Euler Problem 13

以下の50桁の数字100個の総和の上位10桁を求めよ。 37107287533902102798797998220837590246510135740250 46376937677490009712648124896970078050417018260538 74324986199524741059474233309513058123726617309629 91942213363574161572522430563301811072…

Project Euler Problem 12

三角数の数列は自然数の和で表わされ、7番目の三角数は 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28 である。三角数の最初の10項は1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ...となる。 最初の7項について、その約数を列挙すると、以下のとおり。 1: 1 3: 1,3 6: 1,2,3,6 …

Project Euler Problem 10

10以下の素数の和は2 + 3 + 5 + 7 = 17である. 200万以下の全ての素数の和を計算しなさい. これはエラトステネスの篩のおかげで瞬殺です.エラトステネス様様です. eratosthenes <- function(x){ x_0 <- (x-1)/2 d <- rep(TRUE, x_0) l <- (sqrt(x) - 1) / …

Project Euler Problem 9

ピタゴラスの三つ組(ピタゴラスの定理を満たす整数)とはa a2 + b2 = c2 を満たす数の組である. 例えば, 32 + 42 = 9 + 16 = 25 = 52である. a + b + c = 1000となるピタゴラスの三つ組が一つだけ存在する. このa,b,cの積を計算しなさい. これは組が一つだけ…

Project Euler Problem 8

以下の1000桁の数字から5つの連続する数字を取り出してその積を計算する。そのような積の中で最大のものの値はいくらか 7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017…

Project Euler Problem 7

素数を小さい方から6つ並べると 2, 3, 5, 7, 11, 13 であり、6番目の素数は 13 である。 10001 番目の素数を求めよ。 もう問題は日本語訳でいいや.この問題は結局,今まで避けてきた素数列が必要となるのでそれをつくることを考える.とりあえず素数でない…

Project Euler Problem 6

The sum of the squares of the first ten natural numbers is, 1^(2) + 2^(2) + ... + 10^(2) = 385 The square of the sum of the first ten natural numbers is, (1 + 2 + ... + 10)^(2) = 55^(2) = 3025 Hence the difference between the sum of the sq…

Project Euler Problem 5

2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest number that is evenly divisible by all of the numbers from 1 to 20? 単なる最小公倍数なのですぐにやり方はわかる…