由买买提看人间百态

topics

全部话题 - 话题: vairable
(共0页)
c*******n
发帖数: 112
1
来自主题: JobHunting版 - 一个面经
昨天去面试了一个想起的金融公司。里面有一些有意思的问题:
1. Given two vairables a and b, do not use any temporary variable and
swap their value.
2. how to optimize the following code
double doit() {
double ret = 0
for(double i = 0; i <= 10; i = i + 2) {
double t = i / 2;
ret = ret + t;
}
return ret;
}
第一问题是和别人讨论的时候问的。 大脑一下没有转过弯了,没有答出来。最后人面
试人给了一个答
案。第二个笔试的问题。最后一个面试的人和我讨论我的答案。他的思路比较有意思。
还有其他问题例如
Given two integers, do not use any loop (for, while...) and do not
declar any variable, find the g
g***t
发帖数: 83
2
来自主题: DotNet版 - Does .net come with class wizard?
I was using Visual studio 6.0 before, using class wizard to add a class or add
a member vairable.
Now I switch to .net, is there anyone knows if there is similar way to do it
now?
I tried to right click certain class in class view to add a variable, but it
is fairly slow. I think there might be sth wrong.
Thanks.
w*r
发帖数: 2421
3
来自主题: Java版 - how to edit autoexec.bat
ffdt... you must read a really old tutorial telling you to do so . In fact,
you should use
system vairables instead. right click My computer and go to properties.
go to Advanced -> Environment Variables.
Append your directories in the PATH variable.
Z****e
发帖数: 2999
4
来自主题: Java版 - anyone saw this on code?
with or without final, the line of code is doing nothing; adding a final
further rendered the vairable uselss because it can no longer be assigned to
any other value
b******d
发帖数: 794
5
来自主题: Java版 - java的一个问题
请问这段代码为什么结果是"furry bray stripes", 同一个object, 用不同reference
type引用, object里面的variable的值就会变吗,还是本身object里面就有好几个同名
vairable分属于inheritence tree里面不同classes?
3. class Mammal {
4. String name = "furry ";
5. String makeNoise() { return "generic noise"; }
6. }
7. class Zebra extends Mammal {
8. String name = "stripes ";
9. String makeNoise() { return "bray "; }
10.}
11. public class ZooKeeper {
12. public static void main(String[] args) { new ZooKeeper().go(); }
13. void go() {
... 阅读全帖
o*******0
发帖数: 699
6
来自主题: Programming版 - copy constructor 问题
The point is not about memory leak (which is true), but returning local
vairable (instance of object) will trigger copy contructor to copy it to the
caller stack. Not sure how compiler can optimize it away.
Thanks
C********e
发帖数: 219
7
来自主题: Programming版 - 求助调试c++程序
valgrind显示了很多大概不相关的oracle occi里面的uninitialized vairable,
condition jump based on uninitialized variable什么的,都是oracle-
instantclient shared library里面的
我试试helgrind。
谢谢建议
s*******t
发帖数: 1743
8
来自主题: Economics版 - 关于intrumental vairable的一个问题
关于时间序列中使用intrumental variable的问题,请教一下各位
举个例子吧,好说一点
如果我用housing price 来预测housing supply,在通常情况下,需要用intrumental
vairbable和2SLS,而不是直接使用price。
假如我对price和supply都取difference,在模型中用他们的changes,而不是levels,
还有identification的问题嘛?还需要使用instrumental variable嘛?
我用wooddrige课本上的方法检测了endogneity,结果显示,没有这个问题,但是我想知
道理论上有没有这个说法。谢谢各位了。
x********4
发帖数: 405
9
来自主题: Economics版 - 关于intrumental vairable的一个问题
the reason why there is an endogeneity issue in your settig is that the
price is determined by both supply and demand. without controlling for
demand, i do not think your identification strategy works. Ideally, you want
to find some exogenous shocks (variation) that only affect housing demand
but not the housing supply, which helps you identify the system... i know,
finding a good IV is really hard... good luck!

intrumental
想知
s*******t
发帖数: 1743
10
来自主题: Economics版 - 关于intrumental vairable的一个问题
我的问题是,对于price,如果我用的是difference,而不是level的话,还有没有这个
identification的问题?

want
x********4
发帖数: 405
11
来自主题: Economics版 - 关于intrumental vairable的一个问题
i answered your question in my previous post: "without controlling for
demand, i do not think your identification strategy works"
t****g
发帖数: 715
12
来自主题: Economics版 - 关于intrumental vairable的一个问题
Simplified notations are introduced to show why you fail:
y_t= b * x_t + u_t (1)
Its lag:
y_{t-1}=b * x_{t-1} + u_{t-1}
Take a difference:
y_t-y_{t-1}=b*(x_t-x_{t-1})+(u_t-u_{t-1}) (2)
Endogeneity takes place in (1), i.e. x_t,u_t is correlated; now you consider
(2) and wonder whether endogeneity is gone, i.e. (x_t-x_{t-1}), and (u_t-u_
{t-1}) is uncorrelated? In general, this is not true.
Unless you make this strict assumption, you still suffer endogeneity. Could
you explain a
s*******t
发帖数: 1743
13
来自主题: Economics版 - 关于intrumental vairable的一个问题
thanks.
Wooldrige suggests a two-step procedure to test the endogeneity of a single
explanatory variable:
step1: estimate the reduced form for Y_2 (suspected to be endogenous) by reg
ressing it on ALL exogenous variables,including intrumental variables and th
ose in the structral equation, and save the residuals
step2: add the residuals to your structural equation and test its significan
ce. If it is sig, we conclude that Y_2 is endogenous.

consider
u_
Could
s*******t
发帖数: 1743
14
来自主题: Economics版 - 关于intrumental vairable的一个问题
another question:
if I also use price changes at t-1, t-2, do I also have to use intrumental v
ariables for them, like what I do with the price change at time t?
thanks.

single
reg
th
significan
i*****r
发帖数: 1302
15
哎...其实我的想法是想抛开这些学术书本上的东西,这些东西谁都知道,想从更实际应
用的地方出发.比如regression,某些vairable在某段时间内有预测能力的,但可能从某
点开始作用就慢慢下降,也许不久又会上升.当你意识到的时候,比如tstats,rsquare变
小的时候,已经发生了太晚了.我就在想能不能有什么办法能early detect模型的变化,
能够及时换走variable或者干脆放弃使用
s********a
发帖数: 1100
16
某些vairable在某段时间内有预测能力的
你是不是variable 就选的不对 overstate it的能力了。。
G*****3
发帖数: 71
17
来自主题: Quant版 - DLL 文件能被改写吗?
Well, you probably should check what DLL is for.
It is only a set of libraries or functions you can call. You could never
store vairables there.
s*******w
发帖数: 27
18
来自主题: Statistics版 - 请教确定weights 的方法
我老板让我做个project, 本人水平有限, 向各位讨教。 希望各位能给我些建议。先
谢过大家!!
比如我们已经知道1000 个加油站的销售量。要做个Predictive Model.
每个加油站大概有100个attributes. 80% attributes are catogorical data. Like
the appearance of this gas station is 1-5. 1 is very bad. 5 is outstanding.
我先是把这100 attributes 能和的和,能去的去。俺家领导要求保留尽可能多的
independent variables. 所以最后还是有很多indep variables. 我就用加油站的销售
量做为Dependent variable. 做个Regression. Because of muticolinearity problem
, many weights don't make sense at all.
最后决定给这100 Independent variables 分成5大类, 像Facility,... 阅读全帖
c****s
发帖数: 395
19
第一个先按大中小等等分组
组内再比较吧
第二个30十几个vairables还算好的吧
先explore一下
再stepwise一下吧
p********2
发帖数: 9939
20
2SLS难道不是先一个logit啥的,把fitted value 丢到第二个regression里面来, so
that就不会和error correlated。请大虾指正。
自己批评一下。好像没法用2SLS,因为这个case没有那个vairable需要IV,而是你得sample有可能是biased。为啥不用Heckman呵?
顺便弱问一下,对于大多数regression,我发现OLS的结果和很多fancy的treatment的结果都很相近。难道大多数fancy的econometric model都是用来抵御可有可无的质疑的吗?
(共0页)