Find Jobs
Hire Freelancers

Code a function in R

$30-250 USD

已完成
已发布大约 10 年前

$30-250 USD

货到付款
I need a simple R function that implements a wild-t bootstrap for a given regression model, the wild-t bootstrap being a method to get appropriate standard errors in the presence of clustering. Note that I tagged C programming because R was not available, and most C programmers know R, I guess. My apologies if this is misleading. Having said that, if someone wants to carry this out in C with an R frontend, you are welcome. The function should take an lm-object and the name of a cluster variable as input (the cluster variable will be in the dataframe used that is stored in the lm-object. Would be cool if it was automatically retrieved from the dataframe stored in the lm-object), and computes wild-t boostrapped p-values for the regression coefficients. I will provide references for the method but it's simple: re-estimate leaving the regressor of interest out, take those residuals, multiply with 1 or -1, add to predicted dependend variable, re-estimate with regressor of interest back in, do this several times and compute p-value on t-stat with cluster-robust standard errors). The exact algorithm can be seen on slide 16 in the attached document. I will provide a more detailed paper later. There is stata code floating around in the world wide web for this procedure, and I would want to see a verification using this, but this can be discussed later. Moreover, it should be reasonably efficient, and I have reasonably large samples (no big data though), so it should work with large samples of around n=1million (and 100 to 150 regressors or so). An option over which variables to execute the bootstrap would be beneficial, as well. To sum up: I need an R function that takes an lm-object, the name of a cluster variable and a list (or vector) of the names (or indices) of regressors of interest as input, bootstraps wild-t cluster robust p-values for the regressors of interest, and gives back the lm-object with the corresponding p-values. The function should work with reasonably large datasets (n=1million). I am not an R programmer, but I am not an R newby either. I just don't have time at the moment, and I would appreciate help for this task. The steps involved strike me as quite simple, but I may overlook something. I can however provide a function that already carries out simple cluster-robust standard error estimation, so that it is easier to see what I have in mind. In any case, I'd suggest maybe around 40 USD for this.
项目 ID: 5574728

关于此项目

4提案
远程项目
活跃10 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
颁发给:
用户头像
Hi, I am an R programmer and a masters level statistician. I am able to deliver on your project after reading through your project description. I will provide you will a well commented script so that you fully understand what I have done. I can look for the STATA version of the code that you mention to provide a check for results from my code. I am looking forward to work with you. Feel free to ask any questions. Kind regards.
$60 USD 在3天之内
4.8 (10条评论)
5.2
5.2
4威客以平均价$112 USD来参与此工作竞价
用户头像
Hi, I am interested in the project. I hold a MSc in Finance and a BSc in Economics. I guess my bid is higher than the utility you get from the code, but there is a fixed cost in understanding the project from my part. Regards.
$188 USD 在3天之内
4.5 (15条评论)
4.5
4.5
用户头像
Hi, I have more than 5 years experience on R and nearly 10 years on C, since my background is computational mathematics and statistics. I have used R/C/Matlab on many scientific computing.
$111 USD 在5天之内
0.0 (0条评论)
0.0
0.0
用户头像
A proposal has not yet been provided
$88 USD 在5天之内
0.0 (0条评论)
0.0
0.0

关于客户

SWEDEN的国旗
Stockholm, Sweden
5.0
5
付款方式已验证
会员自3月 18, 2014起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。