1. In previous assignments, you looked at various aspects of a data on two species of...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. In previous assignments, you looked at various aspects of a data on two species of rock crabs; in this problem, you will use linear discriminant analysis to derive a rule for classifying the colour and sex of a crab. The data are in the file crabs, txt on Quercus. The data can be read into R using the following code: > x colour sex < x[[2]] > FL < x[[4]] > RW CL < x[[6]] > CW BD group group [sex=="M"&colour=="B"] group [sex=="F"&colour=="B"] group [sex=="M"&colour=="0"] < 3 > group [sex=="F"&colour=="0"] group library (MASS) # library with lda. > r $class 2 1 1 2 1 1 2 1 1 1 1 1 1 1 [1] 1 2 1 11 11 1 1 1 1 1 1 1 1 1 [45] 1 1 1 1 1 1 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 [89] 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 333 [133] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 3 4 4 4 4 4 4 4 4 4 4 4 4 444 [177] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4444 Levels: 1 2 3 4 $terms group FL + RW + CL + CW + BD attr(, "variables") list(group, FL, RW, CL, CW, BD) attr(,"factors") FL RW CL CW BD group 0 0 0 0 0 FL RW CL CW BD 1 0000 0 1 0 0 0 0 0 100 00010 0 0 0 0 1 attr(,"term.labels") [1] "FL" "RW" "CL" "CW" "BD" attr(, "order") [1] 1 1 1 1 1 attr(, "intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(, "predvars") list(group, FL, RW, CL, CW, BD) attr(, "dataClasses") group FL RW CL CW BD "factor" "numeric" "numeric" "numeric" "numeric" "numeric" $call lda(formula group FL + RW + CL + CW + BD, CV = T) $xlevels named list() 1. In previous assignments, you looked at various aspects of a data on two species of rock crabs; in this problem, you will use linear discriminant analysis to derive a rule for classifying the colour and sex of a crab. The data are in the file crabs, txt on Quercus. The data can be read into R using the following code: > x colour sex < x[[2]] > FL < x[[4]] > RW CL < x[[6]] > CW BD group group [sex=="M"&colour=="B"] group [sex=="F"&colour=="B"] group [sex=="M"&colour=="0"] < 3 > group [sex=="F"&colour=="0"] group library (MASS) # library with lda. > r $class 2 1 1 2 1 1 2 1 1 1 1 1 1 1 [1] 1 2 1 11 11 1 1 1 1 1 1 1 1 1 [45] 1 1 1 1 1 1 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 [89] 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 333 [133] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 3 4 4 4 4 4 4 4 4 4 4 4 4 444 [177] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4444 Levels: 1 2 3 4 $terms group FL + RW + CL + CW + BD attr(, "variables") list(group, FL, RW, CL, CW, BD) attr(,"factors") FL RW CL CW BD group 0 0 0 0 0 FL RW CL CW BD 1 0000 0 1 0 0 0 0 0 100 00010 0 0 0 0 1 attr(,"term.labels") [1] "FL" "RW" "CL" "CW" "BD" attr(, "order") [1] 1 1 1 1 1 attr(, "intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(, "predvars") list(group, FL, RW, CL, CW, BD) attr(, "dataClasses") group FL RW CL CW BD "factor" "numeric" "numeric" "numeric" "numeric" "numeric" $call lda(formula group FL + RW + CL + CW + BD, CV = T) $xlevels named list()
Expert Answer:
Posted Date:
Students also viewed these mathematics questions
-
All of the following represent trends shaping HR over the past decade, according to our reading, except: Organizations are spending more on the expansion of physical office space Employees are...
-
Which events ignited the Alliance of Progress? What was its main goal?
-
Alden Company uses a three-variance analysis for factory overhead variances. Practical capacity is defined as 32 setups and 32,000 machine hours to manufacture 6,400 units for the year. Selected data...
-
Activity analysis; SCE Following are the activities that occur during a patient visit to a physician's office. a. Classify each of the above activities as value-added or non-value-added. b. Determine...
-
Jan Shumard, president and general manager of Danbury Company, was concerned about the future of one of the companys largest divisions. The divisions most recent quarterly income statement follows:...
-
Use CRC to detect error P(X) = X 3 + X 2 + 1 M = 11001011 What is T ? Please show your work.
-
The following data from the just completed year are taken from the accounting records of Mason Company: $ 657,000 $ 86,000 Sales Direct labor cost Raw material purchases Selling expenses...
-
A basketball player throws a ball with an average horizontal force of 8 0 N and his hand and the ball move through a horizontal displacement of 5 . 7 m during this period of force application. The...
-
provide a detailed analysis of columbia sportswear by considering at least one financial ratio is each of the following categories: - Profitability Ratios (Hint: Margins, sustainability, input costs)...
-
Double Dice Ltd., a burgeoning Quebec company excelling in crafting bespoke footwear, has recently welcomed you aboard as a financial analyst. Given that the team at Double Dice lacks fundamental...
-
c 1 = 2 5 uf , c 2 = 1 0 0 uf c 3 = 7 5 uf , c 4 = 5 0 uf A switch bridges the gap between the capacitor branches and is currently OPEN. What is the approximate value of the equivalent capacitance of...
-
Assume that there are only material costs associated with the Cost of Goods Sold (COGS) That is, there is no labor or other direct items associated with the manufacture of the product. For the...
-
The accounting clerk of Kremetart Creations needs to finalise the notes to the financial statements for the year ended 28 February 20.20 in the absence of the accountant. Kremetart Creations...
-
A test car is driven a fixed distance of n miles along a straight highway. (Here n Z+.) The car travels at one mile per hour for the first mile, two miles per hour for the second mile, four miles...
Study smarter with the SolutionInn App