subject
Computers and Technology, 12.08.2020 05:01 j015

Longley data set. The Longley data set of labor statistics was one of the first used to test the accuracy of least squares computations. You don't need to go to the NIST Web site to do this problem, but if you are interested in the background, you should see the Longley page at [3]. The data set is available in NCM in the file longley. dat. You can bring the data into MATLAB with load longley. dat
y = longley (:,1);
x = longley (:,2:7);
There are 16 observations of 7 variables, gathered over the years 1947 to 1962. The variable y and the 6 variables making up the columns of the data matrix X are X3 =
y = Total Derived Employment,
x1 = GNP Implicit Price Deflater,
x2 = Gross National Product,
x3 = Unemployment,
x4 = Size of Armed Forces,
x5 = Non-institutional Population
x6 = Age
The objective is to predict y by a linear combination of a constant and the six x's:
y aBo + Bkxk. 26 = 6 1
A) Use the MATLAB backslash operator to compute Bo, B1, ..., B6. This involves augmenting X with a column of all l’s, corresponding to the constant term.
B) Compare your B’s with the certified values.
C) Use errorbar to plot y with error bars whose magnitude is the difference between y and the least squares fit.
D) Use corrcoef to compute the correlation coefficients for X without the column of 1's. Which variables are highly correlated?
E) Normalize the vector y so that its mean is zero and its standard deviation is one. You can do this with
y = y mean(y);
y = y/std(y)
Do the same thing to the columns of X. Now plot all seven normalized vari- ables on the same axis. Include a legend.
Using MATLAB to solve it.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 06:30, Knownothing
When early motion pictures played in movie theaters, they were often accompanied by live organ or piano music. which of the following are the most likely reasons that this happened? (select all that apply). the music was provided to distract audience members from the loud sounds made when filmstrips were changed. the music accompanied the movies because the movies were silent and audiences were used to hearing music during plays in theaters. the music usually was played before, and sometimes after the movie, as an alternative form of entertainment. the music viewers to interpret the dramatic action in the films.
Answers: 2
image
Computers and Technology, 23.06.2019 11:00, jolleyrancher78
What are the possible consequences of computer hacking? what is computer piracy? describe some examples. what are the effects of computer piracy? what are the possible consequences of computer piracy? what is intentional virus setting? describe some examples. what are the effects of intentional virus setting? what are the possible consequences of intentional virus setting? what is invasion of privacy? describe some examples. what are the effects of invasion of privacy? what are the possible consequences of invasion of privacy? what is an acceptable use policy and what is the purpose of the acceptable use policy what is intellectual property and how can you use it?
Answers: 1
image
Computers and Technology, 24.06.2019 12:00, tipbri6380
An npn transistor is correctly biased and turned on if the a. base is negative. b. collector is negative. c. collector is positive with respect to the emitter and negative with respect to the base. d. collector is the most positive lead followed by the base.
Answers: 1
image
Computers and Technology, 24.06.2019 13:00, naomirice24
In a heat transfer course, we can derive the equation for the temperature distribution in a flat rectangular plate. in this example, we will look at a plate at steadystate with three sides being held at t1, and one side held at t2. the temperature for any location on the plate, t(x, y), can be calculated by where create a function (prob3_5) that will take inputs of vectors x and y in feet, scalar n, scalars l and w in feet and scalars t1 and t2 in degrees fahrenheit. it will output a matrix t which is the temperature of each x and y locations. t will have the number of columns equal to the number of elements in x and rows equal to the number of elements in y. though this can be done without loops (perhaps more efficiently), your program must use a nested loop.
Answers: 2
You know the right answer?
Longley data set. The Longley data set of labor statistics was one of the first used to test the acc...

Questions in other subjects:

Konu
Mathematics, 14.09.2021 14:00