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

  Predict the mean kilowatt usage when the average temperature

The owner of a single-family home would like to develop a model to predict electricity consumption in his house, based on average atmospheric temperature in degrees Fahrenheit.

  Dependent t test

Perform exploratory data analysis on CreativityPre and CreativityPost. Using SPSS, calculate the mean and standard deviation of these two variables.

  When do you conduct hypothesis testing

If a statistical test result is not significant at the 0.05 level,

  Utility index and selecting choices based on utility

Entrepreneur Jones has a utility index of 5 for a loss of $1,000, and 12 for a profit of $3,000. He says that he is indifferent between $10 for certain and the following lottery:

  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?

  Collecting data in statistics

You anticipate that your presentation with PiggyBank will go well, and want to get ideas for collecting data. Go to the Discussion Board and discuss data collection methods with your peer/mentor group.

  Calculate the sample size

Calculate the sample size and the designs must involve two different statistical analyses. For each design, specify and justify each of the four factors

  Problem 11 there is a formula for sample size n with given

problem 11. there is a formula for sample size n with given margin of error m and condence level c for population

  How many data points can she use in a regression analysis

How many data points can she use in a regression analysis using the data provided and which of the following independent variables explains more than 90 percent of the observed variation in new car sales?

  Find distribution of combined system time for such customer

For a customer that goes through both systems, show why the time in each system is independent of that in the other; find the distribution of the combined system time for such a customer.

  Compute the mean and standard deviation

Form a frequency distribution having 9 class intervals and form a percentage distribution from the frequency distribution (from part a) - Compute the mean, standard deviation and Coefficient of variation

  Calculate the equation of the regression line

Which is the explanatory variable and draw a scatterplot on your calculator and comment on the form, direction, and strength of the data.

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