1 Basic information
This is a list of 6 exercises for the Applied Quantitative Methods with R labs. You can solve these exercises
using base R functionalities or functions from the tidyverse (e.g. dplyr ) package. Solutions should be
send via moodle platform. Outputs are presented in html tables but only for comparison purposes. You do
not need to create html tables. Note that solving some of these exercises requires going through help
pages or looking for an appropriate function in the packages documentation.
Deadline to send solutions is the 9th of January 2023.
If you have questions do not hesitate to contact us via email.
2 Exercise 1 (1 pt)
The sum of the squares of the first ten natural numbers is,
The square of the sum of the first ten natural numbers is,
Hence the difference between the sum of the squares of the first ten natural numbers and the square of the
sum is .
Find the difference between the sum of the squares of the first one hundred natural numbers and the
square of the sum.
Result: -25164150 .
3 Exercise 2 (1 pt)
Write an R program to create a data.frame which contain the following details
employee salary
Jane B 1000
David G 2500
Emilo A 1500
Assignments for extra 10 pts
Maciej Beręsewicz, Tomasz Klimanek, Marcin Szymkowiak
AUTHOR
12 + 22+. . . +102 = 385
(1 + 2+. . . +10)2 = 552 = 3025
385 − 3025 = −2640
employee salary
Janet F 3000
George H 680
and display summary of the data.
4 Exercise 3 (1 pt)
Download this dataset. The dataset is about the number of foreigners insured in Poland according to the
ZUS data. It contains the following columns:
kwartal – quarter (format: YYYYQQ, i.e. 2021Q1 refers to 1 quarter of 2021)
obywatelstwo – citizenship (in Polish)
wiek – age group (levels: ogol, 19, 20-24, 25-29, 30-34, 35-39, 40-44, 45-49, 50-54, 55-59, 60-
64, 60+, 65 , where ogol refers to total ),
plec – sex (levels: ogol, kob, mez , where ogol refers to total , kob to females and mez to males ),
ubezp – the number of insured people.
Your task in this assignment consists of two steps:
1. read the data using appropriate function from the readr package or base R (0.5 pt),
2. rename the columns using the following rules (0.5 pt),
kwartal to quarter ,
obywatelstwo to citizenship ,
wiek to age ,
plec to sex ,
ubezp to count .
The expected result is presented below.
quarter citizenship age sex count
2019Q1 ALBAŃSKIE ogol ogol 369
2019Q1 ALGIERSKIE ogol ogol 592
2019Q1 AMERYKAŃSKIE ogol ogol 1792
2019Q1 ANDORSKIE ogol ogol 6
2019Q1 ANGOLSKIE ogol ogol 142
2019Q1 ARGENTYŃSKIE ogol ogol 177
https://gist.githubusercontent.com/BERENZ/788573cbd805b0a1cbfd8d4597118796/raw/33b031e8f6e9e11859f0c50115488bebc58edc54/zus-2019-2022-zdr.csv
https://psz.zus.pl/
5 Exercise 4 (2 pt)
Create the following data.frame containing information about the overall number of foreigners in Poland
according to ZUS data. Column quarter refers to the quarter column and Freq is based on the count
c
Why Choose Us
- 100% non-plagiarized Papers
- 24/7 /365 Service Available
- Affordable Prices
- Any Paper, Urgency, and Subject
- Will complete your papers in 6 hours
- On-time Delivery
- Money-back and Privacy guarantees
- Unlimited Amendments upon request
- Satisfaction guarantee
How it Works
- Click on the “Place Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
- Fill in your paper’s requirements in the "PAPER DETAILS" section.
- Fill in your paper’s academic level, deadline, and the required number of pages from the drop-down menus.
- Click “CREATE ACCOUNT & SIGN IN” to enter your registration details and get an account with us for record-keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
- From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.