全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 LATEX论坛
2015-7-13 06:42:14

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-13 06:42:47

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-13 06:43:20

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-13 06:43:51

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-13 07:07:12

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-13 07:08:37

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-14 10:26:10
RStudio and GitHub
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-14 10:28:50
The first time I read John Cook’s advice “Don’t invert that matrix,” I wasn’t sure how to follow it. I was familiar with manipulating matrices analytically (with pencil and paper) for statistical derivations, but not with implementation details in software. For reference, here are some simple examples in MATLAB and R, showing what to avoid and what to do instead.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-14 10:51:54
The first time I read John Cook’s advice “Don’t invert that matrix,” I wasn’t sure how to follow it. I was familiar with manipulating matrices analytically (with pencil and paper) for statistical derivations, but not with implementation details in software. For reference, here are some simple examples in MATLAB and R, showing what to avoid and what to do instead.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-14 13:24:19


International Encyclopedia of Statistical Science By Miodrag Lovric
2011 | 1671 Pages | ISBN: 3642048978 , 3642049168 | PDF | 31 MB


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-14 13:24:58


Secondary Algebra Education By Paul Drijvers
2010 | 234 Pages | ISBN: 9460913334 | PDF | 5 MB


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-14 13:25:46
Derek Haylock, "Key Concepts in Teaching Primary Mathematics"
2007 | pages: 201 | ISBN: 1412934109 | PDF | 1,6 mb
Visit Website
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-14 13:26:21
Luminita Barbu, Gheorghe Morosanu, "Singularly Perturbed Boundary-Value Problems"
2007 | pages: 236 | ISBN: 3764383305 | PDF | 1,5 mb
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-14 13:27:24


J

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-14 14:01:05
Jay Jorgenson, Serge Lang, Dorian Goldfeld, "Explicit Formulas for Regularized Products and Series"
1994 | pages: 156 | ISBN: 3540586733 | PDF | 4,5 mb
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-14 14:01:39
R.S. Johnson, "Singular Perturbation Theory: Mathematical and Analytical Techniques with Applications to Engineering"
2005 | pages: 309 | ISBN: 0387232001 | PDF | 4,6 mb
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-15 15:46:36
When estimating integrated covariation between two assets based on high-frequency data,simple assumptions are usually imposed on the relationship between the price processes and the observation times. In this paper, we introduce an endogenous 2-dimensional model and show that it is more general than the existing endogenous models of the literature. In addition, we establish a central limit theorem for the Hayashi-Yoshida estimator in this general endogenous model in the case where prices follow pure-diffusion processes.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-15 16:04:49
The purpose of this post is to demonstrate change point analysis by stepping through an example of change point analysis in R presented in Rizzo’s excellent, comprehensive, and very mathy book, Statistical Computing with R, and then showing alternative ways to process this data using the changepoint and bcp packages. Much of the commentary is simplified, and that’s on purpose: I want to make this introduction accessible if you’re just learning the method. (Most of the code is straight from Rizzo who provides a much more in-depth treatment of the technique. I’ve added comments in the code to make it easier for me to follow, and that’s about it.)

The idea itself is simple: you have a sample of observations from a Poisson (counting) process (where events occur randomly over a period of time). You probably have a chart that shows time on the horizontal axis, and how many events occurred on the vertical axis. You suspect that the rate at which events occur has changed somewhere over that range of time… either the event is increasing in frequency, or it’s slowing down — but you want to know with a little more certainty. (Alternatively, you could check to see if the variance has changed, which would be useful for process improvement work in Six Sigma projects.)
You want to estimate the rate at which events occur BEFORE the shift (mu), the rate at which events occur AFTER the shift (lambda), and the time when the shift happens (k). To do it, you can apply a Markov Chain Monte Carlo (MCMC) sampling approach to estimate the population parameters at each possible k, from the beginning of your data set to the end of it. The values you get at each time step will be dependent only on the values you computed at the previous timestep (that’s where the Markov Chain part of this problem comes in). There are lots of different ways to hop around the parameter space, and each hopping strategy has a fancy name (e.g. Metropolis-Hastings, Gibbs, “reversible jump”).
In one example, Rizzo (p. 271-277) uses a Markov Chain Monte Carlo (MCMC) method that applies a Gibbs sampler to do the hopping – with the goal of figuring out the change point in number of coal mine disasters from 1851 to 1962. (Looking at a plot of the frequency over time, it appears that the rate of coal mining disasters decreased… but did it really? And if so, when? That’s the point of her example.) She gets the coal mining data from the boot package. Here’s how to get it, and what it looks like:

library(boot)
data(coal)
y <- tabulate(floor(coal[[1]]))
y <- y[1851:length(y)]
barplot(y,xlab="years", ylab="frequency of disasters")
coalmine-freq

First, we initialize all of the data structures we’ll need to use:

# initialization
n <- length(y) # number of data elements to process
m <- 1000 # target length of the chain
L <- numeric(n) # likelihood fxn has one slot per year
k[1] <- sample(1:n,1) # pick 1 random year to start at
mu[1] <- 1
lambda[1] <- 1
b1 <- 1
b2 <- 1
# now set up blank 1000 element arrays for mu, lambda, and k
mu <- lambda <- k <- numeric(m)
Here are the models for prior (hypothesized) distributions that she uses, based on the Gibbs sampler approach:

mu comes from a Gamma distribution with shape parameter of (0.5 + the sum of all your frequencies UP TO the point in time, k, you’re currently at) and a rate of (k + b1)
lambda comes from a Gamma distribution with shape parameter of (0.5 + the sum of all your frequencies AFTER the point in time, k, you’re currently at) and a rate of (n – k + b1) where n is the number of the year you’re currently processing
b1 comes from a Gamma distribution with a shape parameter of 0.5 and a rate of (mu + 1)
b2 comes from a Gamma distribution with a shape parameter of 0.5 and a rate of (lambda + 1)
a likelihood function L is also provided, and is a function of k, mu, lambda, and the sum of all the frequencies up until that point in time, k
At each iteration, you pick a value of k to represent a point in time where a change might have occurred. You slice your data into two chunks: the chunk that happened BEFORE this point in time, and the chunk that happened AFTER this point in time. Using your data, you apply a Poisson Process with a (Hypothesized) Gamma Distributed Rate as your model. This is a pretty common model for this particular type of problem. Here is Rizzo’s (commented) code:

# start at 2, so you can use initialization values as seeds
# and go through this process once for each of your m iterations
for (i in 2:m) {
kt <- k[i-1] # start w/random year from initialization
# set your shape parameter to pick mu from, based on the characteristics
# of the early ("before") chunk of your data
r <- .5 + sum(y[1:kt])
# now use it to pick mu
mu[i] <- rgamma(1,shape=r,rate=kt+b1)
# if you're at the end of the time periods, set your shape parameter
# to 0.5 + the sum of all the frequencies, otherwise, just set the shape
# parameter that you will use to pick lambda based on the later ("after")
# chunk of your data
if (kt+1 > n) r <- 0.5 + sum(y) else r <- 0.5 + sum(y[(kt+1):n])
lambda[i] <- rgamma(1,shape=r,rate=n-kt+b2)
# now use the mu and lambda values that you got to set b1 and b2 for next iteration
b1 <- rgamma(1,shape=.5,rate=mu[i]+1)
b2 <- rgamma(1,shape=.5,rate=lambda[i]+1)
# for each year, find value of LIKELIHOOD function which you will
# then use to determine what year to hop to next
for (j in 1:n) {
L[j] <- exp((lambda[i]-mu[i])*j) * (mu[i]/lambda[i])^sum(y[1:j])
}
L <- L/sum(L)
# determine which year to hop to next
k[i] <- sample(1:n,prob=L,size=1)
}
Knowing the distributions of mu, lambda, and k from hopping around our data will help us estimate values for the true population parameters. At the end of the simulation, we have an array of 1000 values of k, an array of 1000 values of mu, and an array of 1000 values of lambda — we use these to estimate the real values of the population parameters. Typically, algorithms that do this automatically throw out a whole bunch of them in the beginning (the “burn-in” period) — Rizzo tosses out 200 observations — even though some statisticians (e.g. Geyer) say that the burn-in period is unnecessary:

> b <- 201 # treats time until the 200th iteration as "burn-in"
> mean(k[b:m])
[1] 39.765
> mean(lambda[b:m])
[1] 0.9326437
> mean(mu[b:m])
[1] 3.146413
The change point happened between the 39th and 40th observations, the arrival rate before the change point was 3.14 arrivals per unit time, and the rate after the change point was 0.93 arrivals per unit time. (Cool!)
After I went through this example, I discovered the changepoint package, which let me run through a similar process in just a few lines of code. Fortunately, the results were very similar! I chose the “AMOC” method which stands for “at most one change”. Other methods are available which can help identify more than one change point (PELT, BinSeg, and SegNeigh – although I got an error message every time I attempted that last method).

> results <- cpt.mean(y,method="AMOC")
> cpts(results)
cpt
36
> param.est(results)
$mean
[1] 3.2500000 0.9736842
> plot(results,cpt.col="blue",xlab="Index",cpt.width=4)
coalmine-changepoint

I decided to explore a little further and found even MORE change point analysis packages! So I tried this example using bcp (which I presume stands for “Bayesian Change Point”) and voila… the output looks very similar to each of the previous two methods!!!):

coalmine-bcp

It’s at this point that the HARD part of the data science project would begin… WHY? Why does it look like the rate of coal mining accidents decreased suddenly? Was there a change in policy or regulatory requirements in Australia, where this data was collected? Was there some sort of mass exodus away from working in the mines, and so there’s a covariate in the number of opportunities for a mining disaster to occur? Don’t know… the original paper from 1979 doesn’t reveal the true story behind the data.

There are also additional resources on R Bloggers that discuss change point analysis:
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-17 16:01:22
Climate change is what the world’s population perceives as the top global threat, followed by global economic instability and Isis, according to research conducted by the Pew Research Center

Read more on the dat
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-17 16:03:09
A manhunt is under way after suspect knifed another driver following a collision on the A24 in West Sussex

A manhunt is under way for a man who got out of his car and stabbed to death another motorist after their vehicles crashed.

The stabbing took place after two cars collided on the A24 at Findon, West Sussex, on Thursday night, Sussex police said.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-17 16:06:52
Comedy is growing out of pubs and arenas, and making inroads into respected arts festivals – but could it lose its edge as a result?

Interesting times for comedy fans: we’re watching an artform in the process of becoming Art. Time was, international arts festivals had no truck with spit’n’sawdust standup, which had to colonise the fringes to make itself heard. Dance, opera and classical music existed in a more rarefied stratosphere, and showed little desire to mingle.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-17 16:07:39
Greece’s bailout will be debated by German MPs from 9am BST, with around 50 government MPs expected to rebel.

Introduction: Merkel celebrates birthday in the Bundestag
50 CDU/CSU MPs could rebel
Lagarde: plan isn’t ‘viable’ without debt reduction
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-17 16:10:24
Sudden scrapping of concerts in Beijing and Shanghai are being blamed on Happy Birthday tweet to Tibetan leader sent by Jesse Carmichael

Los Angeles band Maroon 5 may have become the latest international musicians to be barred from China, with online speculation blaming one band member’s support for the Dalai Lama.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-17 16:12:20
As children across the country receive their end-of-year school report, teachers highlight lack of time to write truly personal reports

The end-of-year school report, prized and feared by children and parents alike, is no longer quite what it seems.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-17 16:34:10
Freedom of information request by human rights group Reprieve reveals UK service personnel acted under auspices of US and other nations within coalition

RAF pilots have carried out air strikes in Syria, marking a significant expansion of the UK’s role in the campaign against Islamic State.

The UK pilots were embedded with coalition forces, including the US and Canada, and the number involved is understood to have been in single figures.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-17 17:44:08

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-17 17:55:31
Building Web Applications with Flask by Italo Maia
2015 | ISBN: 178439615X | English | 156 pages | True PDF + EPUB + MOBI | 2 MB + 0.4 MB + 1 MB

Use Python and Flask to build amazing web applications, just the way you want them!

About This Book

Learn how to use forms, authentication, and authorization control through extensions, and provide a robust, safe web experience for the client
Free yourself from the SQL vs NoSQL paradigm and use the technology that best fits your needs
Add powerful concepts like TDD and BDD to your range of testing skills
Who This Book Is For

If you are a Python web developer who wants to learn more about developing applications in Flask and scaling them with industry-standard practices, this is the book for you.

In Detail

Flask is a powerful web framework that helps you build great projects using your favorite tools. Flask takes the flexible Python programming language and provides a simple template for web development. Once imported into Python, Flask can be used to save time building web applications. It goes against the flow with the microframework concept, leaving most of the architecture choices to the developer. Through its great API, extensions, and powerful patterns, Flask helps you create simple projects in minutes and complex ones as soon as possible.

From the beginning, Building Web Applications with Flask shows you how to utilize Flask’s concepts, extensions, and components to create engaging, full-featured web projects. You’ll learn how to properly handle forms using WTForms, devise convenient templates with Jinja2 tags and macros, use NoSQL and SQL databases to store user data, test your projects with features and unit tests, create powerful authentication and user authorization, as well as administrative interfaces with ease, and more.

As Flask does not enforce an architectural recipe, neither do we! This book makes no coding assumptions on how you should code, leaving you free to experiment.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-17 18:12:50
虽说 Google 在过去很长时间内都保持着财政增长,但在上两季中他们都没有达到华尔街的预期。不过在刚刚发布的 Q2 财报中,情况终于有了改观,其营收达到了 177 亿美元,较一年前增长了 11%,和 Q1 相比也要高出 3%。这样的成绩没有再让分析师们失望,而 Google 的股价也随之大涨了 11%。而在这之中贡献最大的,按照 CFO Ruth Porat 的说法,就是移动和 YouTube 业务了。...
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-17 18:13:37
据金融时报报道指,三星和苹果正跟 GSMA 商讨,开始研究在旗下设备使用电子 SIM 卡技术。电子 SIM(e-SIM)跟传统实体 SIM 卡不同的是,新技术不会锁定手机使用某一运营商,更能随意即时转换至如何适用的网路。虽然现在香港所出售的手机均是无锁版,但现在日本和美国水货手机都会有锁定,需要所谓「软解」后才可以使用,如果 e-SIM 一经广泛使用就再无以上的问题。其实苹果已经在 iPad 上试行,但只限在美国的 AT&T 和 T-Moilbe 之间转换。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-7-17 18:15:58
将专注于生产电池的 Tesla Gigafactory 虽然尚未完工,但无阻它在正式启用之前扩展的。该公司已确认在内华达州购买了额外约 2,000 英亩的土地,再加上原先那 1,000 英亩的话,Tesla 便在当地拥有接近 3,000 英亩(约 12.14 平方公里)的土地了。不过他们的发言人向华尔街日报指出新买的大部份(1,863 英亩)土地都将作「缓冲地带」,公司不会在上面建筑,但会安装太阳能板供电给工厂。至于剩下那百多英亩的土地则会用作「工业用途」,但不涉及改动原有 Gigafactor
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群