Question

# load "ChickWeight" dataset data(ChickWeight) # Create T | F vector indicating observations with Diet ==...

# load "ChickWeight" dataset data(ChickWeight) # Create T | F vector indicating observations with Diet == "3" index <- ChickWeight$Diet == "3" # Create vector of "weight" for observations where Diet == "3" and Time == 20 pre <- subset(ChickWeight[index, ], Time == 20, select = weight)$weight # Create vector of "weight" for observations where Diet == "3" and Time == 21 post <- subset(ChickWeight[index, ], Time == 21, select = weight)$weight # The pre and post values are paired, each pair corresponding to an individual chick. cbind(pre, post) ```

(3)(c) (2 points) Present a scatterplot of the variable "post" as a function of the variable "pre". Include a diagonal line with zero intercept and slope equal to one. Title and label the variables in this scatterplot.

Please help, how do I include a line with zero intercepts and slope equal to one?

Homework Answers

Answer #1

# load "ChickWeight" dataset
data(ChickWeight)
# Create T | F vector indicating observations with Diet == "3"

index <- ChickWeight$Diet == "3"

# Create vector of "weight" for observations where Diet == "3" and Time == 20
pre <- subset(ChickWeight[index, ], Time == 20, select = weight)$weight

# Create vector of "weight" for observations where Diet == "3" and Time == 21

post <- subset(ChickWeight[index, ], Time == 21, select = weight)$weight

##Scatterplot


plot(pre,post,col="red",xlab="Variable Pre",ylab="Variable Post",
main="Scatterplot Pre~Post",pch=19)

Scatterplot Pre-Post CN CN 150 200 250 300 350 Variable Pre

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Here are 21 observations from a dataset of liver disease deaths per 100,000 people (liver) and...
Here are 21 observations from a dataset of liver disease deaths per 100,000 people (liver) and the liters of wine consumed per capita (wine).  To gather the data the researcher calculated wine per capita by calculating total wine consumed in a country and dividing by the population; they used official records to determine the number of people with liver disease and again divided by total population.  For this question you are welcome to use Excel, but you still need show the formula...
PLEASE FILL IN THE BLANKS WITH THE PROPER TERM! THANKS Key Terms ---------------------------------------------------------------------------------------------------------------------------- Positive relationship ---...
PLEASE FILL IN THE BLANKS WITH THE PROPER TERM! THANKS Key Terms ---------------------------------------------------------------------------------------------------------------------------- Positive relationship --- Occurs in so far as pairs of observations tend to occupy similar relative positions in their respective distribution. Negative relationship --- Occurs in so far as pairs of observations tend to occupy dissimilar relative positions in their respective distribution. Scatterplot --- a graph containing a cluster of dots that represents all pairs of observations. Person correlation coefficient --- A number between –1 and +1...
Mastery Problem: CVP Analysis - Constructing a Cost-Volume-Profit Chart CVP Analysis and the Contribution Margin Income...
Mastery Problem: CVP Analysis - Constructing a Cost-Volume-Profit Chart CVP Analysis and the Contribution Margin Income Statement For planning and control purposes, managers have a powerful tool known as cost-volume-profit (CVP) analysis. CVP analysis shows how revenues, expenses, and profits behave as volume changes, which helps identify problems and create solutions. In CVP analysis, costs are classified according to behavior: variable or fixed, rather than by category: product (which includes both variable and fixed) or period (which includes both variable...
Mastery Problem: CVP Analysis - Constructing a Cost-Volume-Profit Chart CVP Analysis and the Contribution Margin Income...
Mastery Problem: CVP Analysis - Constructing a Cost-Volume-Profit Chart CVP Analysis and the Contribution Margin Income Statement For planning and control purposes, managers have a powerful tool known as cost-volume-profit (CVP) analysis. CVP analysis shows how revenues, expenses, and profits behave as volume changes, which helps identify problems and create solutions. In CVP analysis, costs are classified according to behavior: variable or fixed, rather than by category: product (which includes both variable and fixed) or period (which includes both variable...
Total utility can be objectively measured in numbers that indicate usefulness or benefit to the consumer....
Total utility can be objectively measured in numbers that indicate usefulness or benefit to the consumer. ____ 2. Consumers should purchase quantities of a good to the point where MU > P. ____ 3. Voluntary exchange requires that there must be mutual gain. ____ 4. Points along a budget line represent the maximum combinations of two commodities that a consumer can afford. ____ 5. The budget line represents a consumer's preferences for a commodity. ____ 6. A change in consumer...
Please read the article and answear about questions. Determining the Value of the Business After you...
Please read the article and answear about questions. Determining the Value of the Business After you have completed a thorough and exacting investigation, you need to analyze all the infor- mation you have gathered. This is the time to consult with your business, financial, and legal advis- ers to arrive at an estimate of the value of the business. Outside advisers are impartial and are more likely to see the bad things about the business than are you. You should...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary rivals? How will the acquisition of Reebok by Adidas impact the structure of the athletic shoe industry? Is this likely to be favorable or unfavorable for New Balance? 2- What issues does New Balance management need to address? 3-What recommendations would you make to New Balance Management? What does New Balance need to do to continue to be successful? Should management continue to invest...
Delta airlines case study Global strategy. Describe the current global strategy and provide evidence about how...
Delta airlines case study Global strategy. Describe the current global strategy and provide evidence about how the firms resources incompetencies support the given pressures regarding costs and local responsiveness. Describe entry modes have they usually used, and whether they are appropriate for the given strategy. Any key issues in their global strategy? casestudy: Atlanta, June 17, 2014. Sea of Delta employees and their families swarmed between food trucks, amusement park booths, and entertainment venues that were scattered throughout what would...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT