Write an r script and implement the r functions

Assignment Help Advanced Statistics
Reference no: EM13981760

OVERVIEW

The Final Project provides students with an opportunity to apply the techniques learned in the course to answering practical data analysis questions.

General Plan

? Students will use one week of time (Week 12) to work on the Final Project.
? A few practical questions will be asked about the data provided.
? Students must demonstrate the skills learned in Weeks 1-11, such as reading, cleaning, transforming data, writing functions, loops, conditional statements, performing string manipulations and arithmetic calculations etc., to answer these questions.

Final Project Steps

? A csv file called COS­206_gradebook.csv is provided for this project (see Course Documents). This file contains grades data for 17 students on 20 assessments. These assessments include quizzes, homework assignments, term projects, and tests.
? First you are strongly encouraged to open this file in Excel to gain an overview of the data. Note the second row contains point totals for the assessments. For instance, the point total for hw0 (Homework 0) is 20 while the point total for hw1 (Homework 1) is 14.

? Using the csv file, write an R script that contains the following R functions:

1. readData <­ function(fileName);
a. This function reads data from a csv file called fileName. A data frame that stores the contents of this file is returned.

2. checkStudent <­ function(df, studentName);
a. This function extracts a particular student's grades data from a data frame and

returns them.

3. checkAssessment <­ function(df, assessmentName);
a. This function returns a vector/list of three statistics, min, max, and average, about the assessment whose name is given as assessmentName.

4. calcAssessmentEffectiveScoreRatios <­ function(df, assessmentName)
a. This function return a vector/list of effective score ratios for the assessment whose name is given as assessmentName.
b. An effective score ratio for a particular student on a given assessment is the raw score divided by the point total for the assessment. For instance: if a student scored 18 out of 20 for an assessment, then the effective score ratio is 18/20.

5. assessmentCount <­ function(df, assessmentNamePrefix);
a. This function returns the number of assessments whose names start with assessmentNamePrefix.

6. assessmentWeight <­ function(df, assessmentName, assessmentTypeWeights)
a. This function returns the weight for an assessment whose name is given by assessmentName.
b. assessmentTypeWeights is a named vector that contains the weight for each type of assessments. The vector should reflect the following weights assignment:
i. quizzes-5%;
ii. homework assignments-15%;
iii. term project phase 1-5%;
iv. term project phase 2-3%;
v. term project phase 3-2%;
vi. exam 1-10%;
vii. exam 2-10%;
viii. exam 3-10%;
ix. final-40%.
c. A helper function assessmentPrefix <­ function(assessmentName,assessmentTypeWeights) is provided;
i. This function returns the prefix of the assessment whose name is given by assessmentName.
d. The list assessmentTypeWeights is also provided;

7. CalcFinalGrades <­ function(df);
a. This function returns a vector that contains the final grades for all the students.
8. writeReport <­ function(df,finalGradesVector,fileName).

a. This function adds a new column (grade) to df and then writes the updated data frame to a file whose name is given by filename.

? Name your R script "COS­206_FinalProject.R" and submit it by the due date indicated in the Course Calendar.

For your convenience, a template of the R script is provided (see Course Documents). This template:
1. has comments that describe each function;
2. provides the skeleton for each function, you just need to fill R statements in each function body;
3. provides the helper function assessmentPrefix; and
4. provides the declaration and initialization of assessmentTypeWeights.

Another file called COS­206_finalProjectTester.R is also provided. This file contains function calls and their expected results. You can use it to check if your implementations are correct.

(Remember to source your COS­206_FinalProject.R before running the tester, otherwise it will complain that functions are not declared).

Attachment:- COS-216 gradebook.csv

Reference no: EM13981760

Questions Cloud

Returns on stock of small ?rms : Returns on stock of small ?rms have been shown to be symmetrically distributed, but the distributions are believed to be "long-tailed"-not well approximated by the normal distribution. To test whether the average return on a stock of a small ?rm i..
What are the relative changes in angular momentum : Suppose some children push a merry-go-round so that it turns twice as fast as it did before they pushed it. What are the relative changes in angular momentum and rotational kinetic energy?
Give an example of each of the spheres of business power : Business & Society Ethics, Sustainability and Stakeholder management, give an example of each of the four levels of corporate power. Also, give an example of each of the spheres of business power.
The slack of a constraint multiplied by the shadow : Consider the following stateent: "The slack of a constraint multiplied by the shadow price associated with that constraint must equal zero."  Is this true or false?  Explain
Write an r script and implement the r functions : Write an R script that contains the R functions - readData, checkStudent, checkAssessment, assessmentWeightetc.
Find a lug wrench to remove the nuts off the bolt studs : Suppose your car has a flat tire. You get out your tools and find a lug wrench to remove the nuts off the bolt studs. You find it impossible to turn the nuts.
How far from the launch point does the child land in water : A water slide launches a child horizontally above a swimming pool. vertical distance from the top of the slide to the launch point is 2.76 m. How far from the launch point does the child land in the water
Revenue-generating allocation method : According to an article in Real Estate Finance, developers and hotel operators have three ways of controlling shared facilities: the square footage allocation (SF) method, the revenue-generating (RG) allocation method, and the purchase price value..
What is the best predicted productivity score : The regression equation relating dexterity scores (x) and productivity scores (y) for the employees of a company is y=5.50 + 1.91x. What is the best predicted productivity score of 32.

Reviews

Write a Review

Advanced Statistics Questions & Answers

  Hiring process and affirmative action plan

Would you as head of the human resource department meet with the committee prior to any interviews? If yes, what would you say to the members?

  Resources and capabilities of two labor markets

Analyze the resources and capabilities of the two labor markets of Ireland and Singapore and which place to locate my pharmaceutical company.

  Construct a leading economic indicator

The index of leading economic indicators, compiled and published by the U.S. National Bureau of Economic Research, is composed of 12 time series, such as the average work hours of production in manufacturing, manufacturers

  What is companys labor hours productivity

What is the company's labor hours productivity and what is its multifactor productivity and what is the percent change in the multifactor productivity if the initial process used is the one without the rework capability and is then replaced by the ..

  Research study statistical testing

Suppose you are testing the differences in attitudes toward health care reform using Democrats, Republicans, and Independents. How would the median measure be used for this test?

  Model 1nbsp lets consider the logistic regression model

model 1nbsp lets consider the logistic regression model which we will refer to as model 1 given

  Planning function for competitve advantage

Identify an organization and provide an example of strategic planning and one example of functional-level planning. What are the differences in decision-makers, risk, cost, timeframe, and profit potential of decisions being made at various levels ..

  Develop and provide the linear regression equation

Develop and provide the linear regression equation for the damage given the inventory level using the appropriate independent and dependent variables.

  Relationship between speed, flow and geometry

Write a project proposal on relationship between speed, flow and geometry on single carriageway roads.

  Evaluate result for the case in which x is an exponential rv

Evaluate your result for the case in which X is an exponential rv (you already know what the result should be in this case). Evaluate your result for a case in which E [X]  ∞ and E rX2l = ∞.

  Airphone inc manufactures cellular telephones at a

q1. airphone inc. manufactures cellular telephones at a processing cost of 47 per unit.nbsp the company produces an

  Find a right eigenvector for each distinct eigenvalue

Find a right eigenvector for each distinct eigenvalue, and show that the eigenvalue of multiplicity 2 does not have two linearly independent eigenvectors.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd