Skip to main content

Linear Algebra with Programming Applications

  • Chapter
  • First Online:
Political Analysis Using R

Part of the book series: Use R! ((USE R))

  • 12k Accesses

Abstract

The RĀ language has several built-in matrix algebra commands. This proves useful for analysts who wish to write their own estimators or have other problems in linear algebra that they wish to compute using software. In some instances, it is easier to apply a formula for predictions, standard errors, or some other quantity directly rather than searching for a canned program to compute the quantity, if one exists. Matrix algebra makes it straightforward to compute these quantities yourself. This chapter introduces the syntax and available commands for conducting matrix algebra in R.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Alternatively, when the combined elements are complex objects, c instead creates a list object.

  2. 2.

    For readers interested in bootstrapping, which is one of the most common applications of sampling from data, the most efficient approach will be to install the boot package and try some of the examples that library offers.

  3. 3.

    An alternate syntax would have been X2%o%X3.

  4. 4.

    A unique variety of matrix multiplication is called the Kronecker product (H āŠ—L). The Kronecker product has useful applications in the analysis of panel data. See the kronecker command in RĀ for more information.

  5. 5.

    As another application in statistics, the likelihood function for a multivariate normal distribution also calls on the determinant of the covariance matrix.

References

  • Monogan JE III (2013a) A case for registering studies of political outcomes: an application in the 2010 House elections. Polit Anal 21(1):21ā€“37

    ArticleĀ  Google ScholarĀ 

Download references

Author information

Authors and Affiliations

Authors

10.1 Electronic Supplementary material

Rights and permissions

Reprints and permissions

Copyright information

Ā© 2015 Springer International Publishing Switzerland

About this chapter

Cite this chapter

Monogan, J.E. (2015). Linear Algebra with Programming Applications. In: Political Analysis Using R. Use R!. Springer, Cham. https://doi.org/10.1007/978-3-319-23446-5_10

Download citation

Publish with us

Policies and ethics