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
Active Questions
  • Attached is the file GeometricObject.java. Include this in your project, but do not change. Create a...
    asked 37 seconds ago
  • Suppose the number of cars in a household has a binomial distribution with parameters n =...
    asked 3 minutes ago
  • HR needs some information on the new interns put into a database. Given an id, email,...
    asked 24 minutes ago
  • Problem solving strategies Questions years = input("Enter a number of years and I'll tell you how...
    asked 28 minutes ago
  • Calculate ?Hrxn for the following reaction: CH4(g)+4Cl2(g)?CCl4(g)+4HCl(g) Use the following reactions and given ?H?s. C(s)+2H2(g)?CH4(g)?H=?74.6kJC(s)+2Cl2(g)?CCl4(g)?H=?95.7kJH2(g)+Cl2(g)?2HCl(g)?H=?184.6kJ Express...
    asked 35 minutes ago
  • ASCII (American Standard Code for Information Interchange) has an encoding for every character of the alphabet,...
    asked 49 minutes ago
  • Is home confinement with electronic monitoring a deterrent? Are there negatives to being confined to one’s...
    asked 1 hour ago
  • Social hostility can have severe lasting effects of interperpersonal relationship during our adolescence years, which if...
    asked 1 hour ago
  • - A series RLC circuit has R=15 ?, L=1.5 H, and C=15 ?F. (a) For what...
    asked 1 hour ago
  • TV Circuit has 30 large-screen televisions in a warehouse in Erie and 60 large-screen televisions in...
    asked 1 hour ago
  • Charges q1, q2, q3, and q4 are placed in sequential order at the corners of a...
    asked 1 hour ago
  • Let X~GEOM(0.7). Let Y=e^2x. Find E[Y].
    asked 1 hour ago