Below are the solutions to these exercises on “Simple Numerical Modeling – Part 2.” ############### # # # Exercise 1 # # # ############### #previous work (ignore when you used the same script as previous exercise) datatable <- read.table(file.choose()) t<-0 k <- 0.05 S <- 15 timestep <- 1 ntimesteps <-100 output <- mat.or.vec(ntimesteps,2) for(n […]

## Simple Numerical Modeling in R – Part 2: Exercises

In this exercise, we will continue to build our model from our previous exercise here, specifically to revise the errors that may be generated from the model, including rounding and truncating errors. Answers to these exercises are available here. If you obtained a different (correct) answer than those listed on the solutions page, please feel […]

## Simple Numerical Modeling in R – Part 1: Solutions

Below are the solutions to these exercises on “Simple Numerical Modeling in R – Part 1.” ############### # # # Exercise 1 # # # ############### # Load Data datatable <- read.table(file.choose()) # Plot Data View(datatable) plot(datatable$V1,datatable$V2) ############### # # # Exercise 2 # # # ############### # dS/dt = kS # where S is […]

## Simple Numerical Modeling in R – Part 1: Exercises

The modeling process is just one of the methods to find a solution for a certain problem. It can be a combination between empirical simulation approaches. The empirical method is data-based analysis that relies upon mathematical function and often has no meaning in real life. An approach using simulation is more based on scientific understanding […]

## Modeling With ANCOVA – Part 2: Solutions

Below are the solutions to these exercises on “ANCOVA – Part 2.” if (!require(car)){install.packages(car, dep=T)} library(car) if (!require(ggplot2)){install.packages(ggplot2, dep=T)} library(ggplot2) ############### # # # Exercise 1 # # # ############### # Load data limpet<-read.csv(file.choose()) limpet.lm <- lm(EGGS ~ DENSITY * SEASON, data = limpet) ############### # # # Exercise 2 # # # ############### predict(limpet.lm) […]

## Modeling With ANCOVA – Part 2: Exercises

In this 2nd part of ANCOVA modeling exercises, we will focus on the extend of ANCOVA visualization using the predict function. The function will help us to plot the linear regression of ANCOVA and also predict other useful information that aids our interpretation (We’ll see later.) The previous exercise can be found here. Answers to these […]

## Modeling With ANCOVA – Part 1: Exercises

In the previous exercise on the #REcology series, we learned how to define the impact of one explanatory variable to another response variable. In a real practice, particularly in experimental or observational design, explanatory variables are often found to be more than one. Thus, it needs a new determination to analyze the data-set and generate […]

## Modeling With ANCOVA – Part 1: Solutions

Below are the solutions to these exercises on “ANCOVA.” if (!require(car)){install.packages(car, dep=T)} ## Warning: package ‘car’ was built under R version 3.3.2 library(car) ############### # # # Exercise 1 # # # ############### # Load data comp<-read.csv(file.choose()) ############### # # # Exercise 2 # # # ############### #scatterplot sct_plot<-scatterplot(Fruit ~ Root | Grazing, data=comp, xlab=”Root”, […]

## Groups Comparison With ANOVA: Exercises (Part 2)

On this 2nd part of groups comparison exercise, we will focus on nested ANOVA application in R, particularly the application on ecology. This is the last part of groups comparison exercise.Previous exercise can be found here Answers to the exercises are available here. If you obtained a different (correct) answer than those listed on the […]

## Groups Comparison With ANOVA: Solutions (Part 2)

Below are the solutions to these exercises on Two way ANOVA. if (!require(car)){install.packages(car, dep=T)} ## Warning: package ‘car’ was built under R version 3.3.2 library(car) if (!require(ggplot2)){install.packages(ggplot2, dep=T)} ## Warning: package ‘ggplot2’ was built under R version 3.3.3 library(ggplot2) if (!require(dplyr)){install.packages(dplyr, dep=T)} ## Warning: package ‘dplyr’ was built under R version 3.3.3 library(dplyr) if (!require(lattice)){install.packages(lattice, […]