concept information in category R

appears as: information, information
R in Action, Third Edition

This is an excerpt from Manning's book R in Action, Third Edition.

How we analyze data has changed dramatically in recent years. With the advent of personal computers and the internet, the sheer volume of data we have available has grown enormously. Companies have terabytes of data about the consumers they interact with, and governmental, academic, and private research institutions have extensive archival and survey data on every manner of research topic. Gleaning information (let alone wisdom) from these massive stores of data has become an industry in itself. At the same time, presenting the information in easily accessible and digestible ways has become increasingly challenging.

  • An important side benefit of power analysis is the shift that it encourages, away from a singular focus on binary hypothesis testing (that is, does an effect exists or not), toward an appreciation of the size of the effect under consideration. Journal editors are increasingly requiring authors to include effect sizes as well as p values when reporting research results. This helps you to determine both the practical implications of the research and provides you with information that can be used to plan future studies.
  • Machine Learning with R, the tidyverse, and mlr

    This is an excerpt from Manning's book Machine Learning with R, the tidyverse, and mlr.

    When we measure a variable, it’s often desirable to examine the range of values taken on by the variable. We can do this, for example, using a histogram, where we plot the possible values of our variable against the frequency with which we observed each of them. The shape we get from plotting such a histogram represents the distribution of our variable and tells us information such as where our variable is centered, how dispersed it is, whether its values are symmetrically distributed around its center, and how many peaks it has.

    While logistic regression is most certainly a classification algorithm, it uses linear regression and the equation for a straight line to combine the information from multiple predictors. In this chapter, you’ll learn how the logistic function works and how the equation for a straight line is used to build a model.

  • Feature engineering is the process by which we extract information from, or create new variables from, existing variables to maximize their predictive value.
  • Practical Data Science with R, Second Edition

    This is an excerpt from Manning's book Practical Data Science with R, Second Edition.

    Try to directly measure the information you need

    As much as possible, try to use information that can be directly measured, rather than information that is inferred from another measurement. For example, you might be tempted to use income as a variable, reasoning that a lower income implies more difficulty paying off a loan. The ability to pay off a loan is more directly measured by considering the size of the loan payments relative to the borrower’s disposable income. This information is more useful than income alone; you have it in your data as the variable Installment_rate_in_percentage_of_disposable_income.

    This is the stage where you initially explore and visualize your data. You’ll also clean the data: repair data errors and transform variables, as needed. In the process of exploring and cleaning the data, you may discover that it isn’t suitable for your problem, or that you need other types of information as well. You may discover things in the data that raise issues more important than the one you originally planned to address. For example, the data in figure 1.2 seems counterintuitive.

    The idea is that at the modeling step, you give all the variables—income, income_isBAD, gas_usage, no_gas_bill, and so on—to the modeling algorithm, and it can determine how to best use the information to make predictions. If the missing values really are missing randomly, then the indicator variables that you added are uninformative, and the model should ignore them. If the missing values are missing systematically, then the indicator variables provide useful additional information to the modeling algorithm.

    R in Action, Second Edition: Data analysis and graphics with R

    This is an excerpt from Manning's book R in Action, Second Edition: Data analysis and graphics with R.

    How we analyze data has changed dramatically in recent years. With the advent of personal computers and the internet, the sheer volume of data we have available has grown enormously. Companies have terabytes of data about the consumers they interact with, and governmental, academic, and private research institutions have extensive archival and survey data on every manner of research topic. Gleaning information (let alone wisdom) from these massive stores of data has become an industry in itself. At the same time, presenting the information in easily accessible and digestible ways has become increasingly challenging.

    For this illustration, we’ll use the UScrime dataset distributed with the MASS package. It contains information about the effect of punishment regimes on crime rates in 47 US states in 1960. The outcome variables of interest will be Prob (the probability of imprisonment), U1 (the unemployment rate for urban males ages 14–24), and U2 (the unemployment rate for urban males ages 35–39). The categorical variable So (an indicator variable for Southern states) will serve as the grouping variable. The data have been rescaled by the original authors. (Note: I considered naming this section “Crime and Punishment in the Old South,” but cooler heads prevailed.)

    Listing 15.1. Creating a time-series object
    > sales <- c(18, 33, 41, 7, 34, 35, 24, 25, 24, 21, 25, 20, 22, 31, 40, 29, 25, 21, 22, 54, 31, 25, 26, 35) > tsales <- ts(sales, start=c(2003, 1), frequency=12) #1 > tsales Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 2003 18 33 41 7 34 35 24 25 24 21 25 20 2004 22 31 40 29 25 21 22 54 31 25 26 35 > plot(tsales) > start(tsales) #2 [1] 2003 1 > end(tsales) [1] 2004 12 > frequency(tsales) [1] 12 > tsales.subset <- window(tsales, start=c(2003, 5), end=c(2004, 6)) #3 > tsales.subset Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 2003 34 35 24 25 24 21 25 20 2004 22 31 40 29 25 21 #1: 1 Creates a time-series object #2: 2 Gets information about the object #3: 3 Subsets the object
    Figure 18.4. Scatter plot between amount of dream sleep and length of gestation, with information about missing data in the margins