Introduction to Scientific Programming and Simulation Using R

  • Share this:
Share with a friend
Sign into your email account to send this page to a friend:
Outlook or Apple Mail
or other default program

Save $25 when you open a Walmart® Credit Card and spend $75 today.*

*Offer subject to credit approval
Learn More
or Apply Now

Advertisement
  • Browse Related Products
  •  
Advertisement

Introduction to Scientific Programming and Simulation Using R

Format:  Hardcover,

453 pages

Publisher: Taylor & Francis

Publish Date: Mar 2009

ISBN-13: 9781420068726

ISBN-10: 1420068725

Buy from Walmart

Shipping & Pickup
Online
$87.95

In stock for:

  • Store information not available.

 Buy from Marketplace

Shipping & Additional Information

Book Information

The following content was provided by the publisher.

Known for its versatility, the free programming language R is widely used for statistical computing and graphics, but is also a fully functional programming language well suited to scientific programming.

An Introduction to Scientific Programming and Simulation Using R teaches the skills needed to perform scientific programming while also introducing stochastic modelling. Stochastic modelling in particular, and mathematical modelling in general, are intimately linked to scientific programming because the numerical techniques of scientific programming enable the practical application of mathematical models to real-world problems.

Following a natural progression that assumes no prior knowledge of programming or probability, the book is organised into four main sections:

  • Programming In R starts with how to obtain and install R (for Windows, MacOS, and Unix platforms), then tackles basic calculations and program flow, before progressing to function based programming, data structures, graphics, and object-oriented code
  • A Primer on Numerical Mathematics introduces concepts of numerical accuracy and program efficiency in the context of root-finding, integration, and optimization
  • A Self-contained Introduction to Probability Theory takes readers as far as the Weak Law of Large Numbers and the Central Limit Theorem, equipping them for point and interval estimation
  • Simulation teaches how to generate univariate random variables, do Monte-Carlo integration, and variance reduction techniques

In the last section, stochastic modelling is introduced using extensive case studies on epidemics, inventory management, and plant dispersal. A tried and tested pedagogic approach is employed throughout, with numerous examples, exercises, and a suite of practice projects. Unlike most guides to R, this volume is not about the application of statistical techniques, but rather shows how to turn algorithms into code. It is for those who want to make tools, not just use them.

Specifications

Author:
Author:
Publisher: Taylor & Francis
Publish Date: Mar 2009
ISBN-13: 9781420068726
ISBN-10: 1420068725
Format: Hardcover
Number of Pages: 453
Shipping Weight (in pounds): 2.05
Product in Inches (L x W x H): 6.1 x 1.3 x 9.3

Chapter outline

Prefacep. v
Programmingp. 1
Setting upp. 3
Installing Rp. 3
Starting Rp. 3
Working directoryp. 4
Writing scriptsp. 5
Helpp. 5
Supporting materialp. 5
Ras a calculating environmentp. 11
Arithmeticp. 11
Variablesp. 12
Functionsp. 13
Vectorsp. 15
Missing datap. 18
Expressions and assignmentsp. 19
Logical expressionsp. 20
Matricesp. 23
The workspacep. 25
Exercisesp. 25
Basic programmingp. 29
Introductionp. 29
Branching with ifp. 31
Looping with forp. 33
Looping with whilep. 36
Vector-based programmingp. 38
Program flowp. 39
Basic debuggingp. 41
Good programming habitsp. 42
Exercisesp. 43
I/O: Input and Outputp. 49
Textp. 49
Input from a filep. 51
Input from the keyboardp. 53
Output to a filep. 55
Plottingp. 56
Exercisesp. 58
Programming with functionsp. 63
Functionsp. 63
Scope and its consequencesp. 68
Optional arguments and default valuesp. 70
Vector-based programming using functionsp. 70
Recursive programmingp. 74
Debugging functionsp. 76
Exercisesp. 78
Sophisticated data structuresp. 85
Factorsp. 85
Dataframesp. 88
Listsp. 94
The apply familyp. 98
Exercisesp. 105
Better graphicsp. 109
Introductionp. 109
Graphics parameters: parp. 111
Graphical augmentationp. 113
Mathematical typesettingp. 114
Permanencep. 118
Grouped graphs: latticep. 119
3D-plotsp. 123
Exercisesp. 124
Pointers to further programming techniquesp. 127
Packagesp. 127
Frames and environmentsp. 132
Debugging againp. 134
Object-oriented programming: S3p. 137
Object-oriented programming: S4p. 141
Compiled codep. 144
Further readingp. 146
Exercisesp. 146
Numerical techniquesp. 149
Numerical accuracy and program efficiencyp. 151
Machine representation of numbersp. 151
Significant digitsp. 154
Timep. 156
Loops versus vectorsp. 158
Memoryp. 160
Caveatp. 161
Exercisesp. 162
Root-findingp. 167
Introductionp. 167
Fixed-point iterationp. 168
The Newton-Raphson methodp. 173
The secant methodp. 176
The bisection methodp. 178
Exercisesp. 181
Numerical integrationp. 187
Trapezoidal rulep. 187
Simpson's rulep. 189
Adaptive quadraturep. 194
Exercisesp. 198
Optimisationp. 201
Newton's method for optimisationp. 202
The golden-section methodp. 204
Multivariate optimisationp. 207
Steepest ascentp. 209
Newton's method in higher dimensionsp. 213
Optimisation in R and the wider worldp. 218
A curve fitting examplep. 219
Exercisesp. 220
Probability and statisticsp. 225
Probabilityp. 227
The probability axiomsp. 227
Conditional probabilityp. 230
Independencep. 232
The Law of Total Probabilityp. 233
Bayes' theoremp. 234
Exercisesp. 235
Random variablesp. 241
Definition and distribution functionp. 241
Discrete and continuous random variablesp. 242
Empirical cdf's and histogramsp. 245
Expectation and finite approximationsp. 246
Transformationsp. 251
Variance and standard deviationp. 256
The Weak Law of Large Numbersp. 257
Exercisesp. 261
Discrete random variablesp. 267
Discrete random variables in Rp. 267
Bernoulli distributionp. 268
Binomial distributionp. 268
Geometric distributionp. 270
Negative binomial distributionp. 273
Poisson distributionp. 274
Exercisesp. 277
Continuous random variablesp. 281
Continuous random variables in Rp. 281
Uniform distributionp. 282
Lifetime models: exponential and Weibullp. 282
The Poisson process and the gamma distributionp. 287
Sampling distributions: normal, X2, and tp. 292
Exercisesp. 297
Parameter Estimationp. 303
Point Estimationp. 303
The Central Limit Theoremp. 309
Confidence intervalsp. 314
Monte-Carlo confidence intervalsp. 321
Exercisesp. 322
Simulationp. 329
Simulationp. 331
Simulating iid uniform samplesp. 331
Simulating discrete random variablesp. 333
Inversion method for continuous rvp. 338
Rejection method for continuous rvp. 339
Simulating normalsp. 345
Exercisesp. 348
Monte-Carlo integrationp. 355
Hit-and-miss methodp. 355
(Improved) Monte-Carlo integrationp. 358
Exercisesp. 360
Variance reductionp. 363
Antithetic samplingp. 363
Importance samplingp. 367
Control variatesp. 372
Exercisesp. 374
Case studiesp. 377
Introductionp. 377
Epidemicsp. 378
Inventoryp. 390
Seed dispersalp. 405
Student projectsp. 421
The level of a damp. 421
Roulettep. 425
Buffon's needle and crossp. 428
Insurance riskp. 430
Squashp. 433
Stock pricesp. 438
Glossary of R commandsp. 441
Programs and functions developed in the textp. 447
Indexp. 449

Book description

Known for its versatility, the free programming language R is widely used for statistical computing and graphics, but is also a fully functional programming language well suited to scientific programming.

An Introduction to Scientific Programming and Simulation Using R teaches the skills needed to perform scientific programming while also introducing stochastic modelling. Stochastic modelling in particular, and mathematical modelling in general, are intimately linked to scientific programming because the numerical techniques of scientific programming enable the practical application of mathematical models to real-world problems.

Following a natural progression that assumes no prior knowledge of programming or probability, the book is organised into four main sections:

  • Programming In R starts with how to obtain and install R (for Windows, MacOS, and Unix platforms), then tackles basic calculations and program flow, before progressing to function based programming, data structures, graphics, and object-oriented code
  • A Primer on Numerical Mathematics introduces concepts of numerical accuracy and program efficiency in the context of root-finding, integration, and optimization
  • A Self-contained Introduction to Probability Theory takes readers as far as the Weak Law of Large Numbers and the Central Limit Theorem, equipping them for point and interval estimation
  • Simulation teaches how to generate univariate random variables, do Monte-Carlo integration, and variance reduction techniques

In the last section, stochastic modelling is introduced using extensive case studies on epidemics, inventory management, and plant dispersal. A tried and tested pedagogic approach is employed throughout, with numerous examples, exercises, and a suite of practice projects. Unlike most guides to R, this volume is not about the application of statistical techniques, but rather shows how to turn algorithms into code. It is for those who want to make tools, not just use them.

Customer Product Reviews

 

Gifting Plans

Financing Offers

Enjoy Great Financing!

Make the most of your shopping experience with the Walmart Discover® or Walmart Credit Card.

Save $25 when you open a Walmart® Credit Card and spend $75 today.*

*Offer subject to credit approval

Learn More or Apply Now

No Payments + No Interest if Paid in Full in 6 Months!
Enjoy no payments for 6 months. You'll have 6 months with no payments, and no interest if paid in full within 6 months on orders over $250. Otherwise, interest will be charged from the original date of purchase. Bill Me Later is the quick, easy, secure way to buy online without using your credit card. Simply select Bill Me Later at checkout. Subject to credit approval.

See Terms