Recently Published
Exploring the Impact of Age Demographics on Voting Patterns in the 2022 Philippine Presidential Election Using Correspondence Analysis
Research Paper on the Impact of Age Demographics on Voting Patterns in the 2022 Philippine Presidential Election Using Correspondence Analysis
Plot
Test
S01 Estadistica para las CS
Introducción y muestreo
Quadro Comparativo Dengue Alagoinhas
Fonte
DataSUS
DSCI101-Homework1
My homework assignment for DSCI 101, Spring 2025.
All About Ysabel
A quick introduction about me.
HTML
---
title: "Introduction to Time Series Analysis: Simulating and Visualizing Data"
author: "Nishanth Seeniasakap Perumal"
date: "`r Sys.Date()`"
output:
html_document:
theme: cosmo
highlight: tango
toc: true
toc_float: true
code_folding: show
---
## Introduction
This document provides an introduction to **time series analysis** using R. We will:
1. Simulate a time series using the `runif()` function.
2. Convert the data into a quarterly time series object.
3. Visualize the data using static and interactive plots.
4. Apply a **6-period rolling average** to smooth the time series.
5. Create an interactive **dygraph** for exploratory analysis.
All code and outputs are included in this document. You can interact with the graphs directly in the browser!
---
## Simulating the Time Series
We start by simulating a time series with 99 data points. The values are randomly generated between 10 and 45 using the `runif()` function.
```{r simulate, echo=TRUE, message=FALSE, warning=FALSE}
# Set seed for reproducibility
set.seed(123)
# Simulate 99 random points between 10 and 45
mytsdata <- runif(n = 99, min = 10, max = 45)
# Convert to a quarterly time series starting in 2000
myts <- ts(mytsdata, start = c(2000, 1), frequency = 4)
# Display the first 10 values
head(myts, 10)
Document
Lab #2