EssayGhost Assignment代写,Essay代写,网课代修,Quiz代考




您的位置: 主页 > 编程案例 > Python代写 >
代做Python:linear algebra1代写 Assignment代写 ECON代写 source code代写 - Python代做
发布时间:2021-07-25 22:06:32浏览次数:
Would you go with , in-stead? Is it better than the restricted model in (1)? Explain.linear algebra1代写Usethe updated second model to suggest an optimal  (Each dollar spent on ads should create at least $1 sales)Now we will test the policy suggested earlier. But first, calculate the totalchangein sales if price goes down 0.4 cents and advert goes up 0.8 thousand dollars. Usethe estimates of the restricted model in (1).linear algebra1代写B. California Test ScoresPlease read the “claiforniatestscores.docx” to understand the data. You will build and run your own model that predicts “educational achievements” and its determinants among 5th grade students. This educational outcome can be defined many different ways but for this dataset we can use test scores (pick one or use an average test score). A simpler model is always better. The model that you will build should make sense so thateach explanatory variable should be justified as to why you have to include each of them in your model.linear algebra1代写Build your model and give a short explanation how your model(s) is justified. In building a model, we usually start with a couple of alternative models. Similar to the models in Part A, these alternatives are defined by “extended” and “nested” models,or type of functions1. Explain your reasoning why you have 2-3 models and why you rank them 1st, 2nd, and 3rd “best” (if you have). You need mathematical expressions of each model with a proper notation. Search Google to see how you insert math equations intoEstimateyour 1st (unrestricted) and 2nd (restricted) models with linear algebra and lm() separately. Check if the results are the same. Interpret the results. Which model seems to have a better explanatory power? (Look at R2, apply an F-test)Now you are going to examine most influential factors in achieving higher test scores.Normalized your variables and estimate “Beta” coefficients. Interpret the results.linear algebra1代写Nowwe are going to test the multicollinearity in your  Before running some diagnostics, do you have any sign of multicollinearity in your estimations?Rememberwe talked about “simple (or gross) correlation”  “higher-order partial correlation coefficients”. Now read Section 6.5 (5th ed. Poor Data, Collinearity, and Insignificance) in your textbook (or other books). Steps:We will first calculate VCM(X), which is a (k x k) and symmetric matrix. Howwould you get VCM(X)? Compare it with the results obtained from cov(X) in R. (Note that VCM(X) reports only variance-covariances)Manually calculate a partial correlation with X2 and X3 by running an “auxiliaryregression” (see the textbook and your notes) holding other Xs fixed.Nowuse a package (search Google about “partial correlation in R”. Here is a simple instruction , Remember from ECON 3303, these are called lin- lin, lin-log, log-lin, and log-log. Moreover, the model could be nonlinear in variables and you may need to add nonlinear extensions to the function (x and x2, for example).linear algebra1代写and this to calculate cor- relation matrix from VCM(X). Compare the partial and simple correlations between X2 and X3.Now calculate VIFs for your model. Google again to find a package to run it. The VIF of X2 with multiple Xs is the R2 of this auxiliary regression. Check if the R2you calculated in 5(b) is close to the VIF? Check if high VIFs are related to higher VCM(betahat).Finally,adjust your model, for those with high VIFs and see you can findC. Simulation with correlated errors following an AR(1) scheme linear algebra1代写We will create 5000 samples with our DGM defined in below. Each of these sam- ples will have 500 observations. In this assignment we have fixed (non-stochastic) x’s. Therefore, we will create x’s out of the loop to fix their values for repeated samples and then we use DGM to create y’s within a loop for each sample.DGM1.Createa vector of 1000 1’s and assign it to x1.2.Createa vector with 1000 random integers between 0 and 100 and assign it to x2.3.Createa vector with 1000 random 0s and 1s and assign it to 4.Createa vector with 1000 random numbers drawn from a uniform distribution min=1, max=50, and assign it to x45.Createa vector with 1000 random numbers drawn from a normal distribution (mean = 2, sd = 1.25) and assign it to x5.linear algebra1代写6.Create a coefficient vector with your choice of For example, beta = (12, -0.7, 34, -0.17, 5.4).7.For the followingDGM,you need to have a vector of 1000 random “errors” drawn from a “Gaussian” distribution (Call it � . The errors in this model follow AR(1), Here is the loop (inside the sampling loop) for this in R:u - rep(rnorm(1,0,1), n)for(j in 1:(n-1)){u[j+1] - u[j]*rho + rnorm(1,0,1)}If you have a better line of code, let us know!Run it only for one sample (you can increase or decrease the samplesize)a.Plot it with different rho’s and see the difference when rho is 1.linear algebra1代写b.Calculate the mean and variance and correlation. Are these close to their theoreticalvalues? Are these values change as you adjust rho and/or sam- ple size?MC Simulation. linear algebra1代写Create5000 samples (with 500 observations) with your DGM and make sure that your x’s are identical in each of 5000  You will have five sampling distri- butions each of which is for one estimator in beta_hat. Calculate the mean of each of these sampling distributions. Compare them with the population parame-ters.  Are they similar as we expect? That is if ?