1. Create 2 vectors of 4000 elements. The elements are draws from a uniform distribution between 0 and 1, U(0,1). Name t

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899559
Joined: Mon Aug 02, 2021 8:13 am

1. Create 2 vectors of 4000 elements. The elements are draws from a uniform distribution between 0 and 1, U(0,1). Name t

Post by answerhappygod »

1 Create 2 Vectors Of 4000 Elements The Elements Are Draws From A Uniform Distribution Between 0 And 1 U 0 1 Name T 1
1 Create 2 Vectors Of 4000 Elements The Elements Are Draws From A Uniform Distribution Between 0 And 1 U 0 1 Name T 1 (100.42 KiB) Viewed 55 times
1. Create 2 vectors of 4000 elements. The elements are draws from a uniform distribution between 0 and 1, U(0,1). Name them xi and x2. You can use runif function for random number generation. In R 2. Create the dependent variable y using the following equation. Yi = 1 * Xli – 2 * X2i +ti i = 1, ..., 4000 where e draws from a standard normal distribution, i.e., E ~ N(0,1). You can use rnorm function for random number generation. 3. Calculate OLS estimator using the formula Bols = (X'X)--(X'y) in open form N N Bols = ( x'x;)-xayi) i=1 i=1 where X = (x1, x2). (You can use the cbind() to combine xı and x2). t() for matrix transpose, solve() for matrix inverse
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply