联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Algorithm 算法作业Algorithm 算法作业

日期:2018-04-22 02:39

Skills Test: Analyst

Introduction

The test is designed to be challenging, so it’s alright if you are unable to finish certain sections—just submit an outline of your thinking in places where you are stuck or run out of time. We expect this test should take no more than 4 hours. We are more interested in seeing your thought process than whether you can complete every section.

Details

Instructions for how to submit your test can be found at the end of this document. Please do not spend more than four hours on the test—if you run out of time, simply outline your thought process for the remaining sections, and keep in mind the following:

You will have 48 hours from the time you receive the test to complete and return both sections.

Please use the R statistical programming language for the entirety of the two task parts.

You are encouraged to use resources such as Google and StackOverflow, but please do not consult anyone directly about the test.

It may also be helpful to look at this document, which discusses how we do our analysis at greater length.

Part I

The point of this section is to show how you would approach analyzing an experiment.

Your coworker started the analysis for an experiment, but didn’t finish it, and confesses to having done a careless job with it. They have left comments in the code highlighting places where work is unfinished.

It is your responsibility to make sure the code is complete, correct, and well-documented. Your submission will be partially evaluated on your ability to correct and document issues you find in the code and execution.

In 2017, one of our partners was interested in determining the effectiveness of an SMS persuasion program on likely voters. The campaign hoped their text messages would both persuade voters to support candidate Jane Smith over her opponents, and mobilize voters to cast a ballot in their state’s 2017 general election.  Voters were randomly assigned to receive one of two interventions:

No contact (Control group)

Message reminding them to vote in the upcoming election, and a message highlighting Smith’s record on environmental issues (Treatment group)

After the SMS program was implemented, we conducted a live phone survey asking voters which candidate they planned to support in the upcoming election. After the election, we consulted publicly-available state voter files to measure whether the targeted voters actually voted on Election Day. Note that while the state voter files (and thus, our measure of turnout) include everyone in the treatment universe, we only surveyed a subset of the universe. For the purposes of this task, do not worry about implementing survey weights.

The three main research questions were:

1.Did the message program increase voters’ likelihood to vote?

2.Did the message program persuade voters to support Jane Smith?

3.Did the message program increase how much voters care about protecting the environment on a scale from 1-10?

We have attached a zip file of the data and unfinished code. Please feel free to change the analysis code however you feel is necessary, and add comments to explain what your code does.

Before starting on Part 1, you may find it helpful to read the Analysis at AI document.


Part II

The point of this section is to show how you approach general programming tasks, how you solve problems, and how you document your approach. It’s okay if you can’t do everything—just outline your thought process for the parts that you didn’t finish.

Please write a function to transform a continuous variable into a “binned” (categorical) variable. The function should:

Accept either a number of breaks or a vector of specific breaks

Display diagnostics on the distribution of the resulting categorical variable

Return the new categorical variable

For example, the function should be able to take a continuous variable “age”, which spans 18-100, and turn it into the following ranges: 18-29, 30-39, 40-55, etc.

Guidelines

Please write the function in R

You are encouraged to use existing functions in any common library or package of your choice (the goal of this exercise is NOT to demonstrate your knowledge of any algorithms but rather your ability to write clear and well-documented code)

Please note if you import a library (or any other dependencies)

Use your judgment in deciding the appropriate function inputs

Include documentation and usage instructions with at least one example

Your function will be evaluated on functionality, ease of use, speed, conciseness, and documentation.

How to Submit

Part I

Please create a secret Gist on GitHub.com. Go to and click “New Gist” in the upper right hand corner:


 

Start by copy+pasting the original code sent to you from your co-worker and click CREATE SECRET GIST. Doing this allows us to see the changes you’ve made in the gist, so it’s important to follow these directions. (请仔细看这个要求,要把原来的code直接复制过去然后在这个网上做修改 让他们看到你修改的步骤)

Name your gist: FIRSTNAME_LASTNAME_PART1.R

Then, when you’re ready, edit the Gist and copy+paste in the revised code and click UPDATE SECRET GIST. (改好了以后的操作)

Part 1 also asks you to create some graphs at the end. Please include images of your graphs as comments on your gist.

Part II

Please create another secret Gist on Github. Copy and paste the code for your function and examples there.  Name your gist: FIRSTNAME_LASTNAME_PART2.R


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp