合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

        代做NEKN96、代寫c/c++,Java程序設(shè)計(jì)
        代做NEKN96、代寫c/c++,Java程序設(shè)計(jì)

        時(shí)間:2024-10-01  來源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯(cuò)



        Homework Assignment 1
        NEKN96
        Guidelines
        1. Upload the HWA in .zip format to Canvas before the 2nd of October, 23:59, and only
        upload one HWA for each group. The .zip ffle should contain two parts:
        - A report in .pdf format, which will be corrected.
        - The code you used to create the output/estimates for the report. The code itself will
        not be graded/corrected and is only required to conffrm your work. The easiest is to add
        the whole project folder you used to the zip ffle.
        1 However, if you have used online tools,
        sharing a link to your work is also ffne.
        2
        2. The assignment should be done in groups of 3-4 people, pick groups at
        Canvas → People → Groups.
        3
        3. Double-check that each group member’s name and ID number are included in the .pdf ffle.
        4. To receive your ffnal grade on the course, a PASS is required on this HWA.
        - If a revision is required, the comments must be addressed, and an updated version should
        be mailed to ioannis.tzoumas@nek.lu.se. However, you are only guaranteed an additional
        evaluation of the assignment in connection to an examination period.
        4
        You will have a lot of ffexibility in how you want to solve each part of the assignment, and all things
        that are required to get a PASS are denoted in bullet points:

        Beware, some things require a lot of work, but you should still only include the ffnal table or ffgure
        and not all intermediary steps. If uncertain, add a sentence or two about how you reached your
        conclusions, but do not add supplementary material. Only include the tables/ffgures explicitly asked
        for in the bullet points.
        Good Luck!
        1Before uploading the code, copy-paste the project folder to a new directory and try to re-run it. Does it still work?
        2Make sure the repository/link is public/working before sharing it.
        3Rare exceptions can be made if required. 
        4Next is the retake on December 12th, 2024.
        1NEKN96
        Assignment
        Our goal is to put into practice the separation of population vs. sample using a linear regression
        model. This hands-on approach will allow us to generate a sample from a known Population Regression
        Function (PRF) and observe how breakages of the Gauss-Markov assumptions can affect our sample
        estimates.
        We will assume that the PRF is:
        Y = α + β1X1 + β2X2 + β3X3 + ε (1)
        However, to break the assumptions, we need to add:
        A0: Non-linearities
        A2: Heteroscedasticity
        A4: Endogeneity
        A7: Non-normality in a small sample
        A3 autocorrelation will be covered in HWA2, time-series modelling.
        Q1 - All Assumptions Fulfflled
        Let’s generate a ”correct” linear regression model. Generate a PRF with the parameters:
        α = 0.7, β1 = −1, β2 = 2, β3 = 0.5, ε ∼ N(0, 4), Xi
         iid∼ N(0, 1). (2)
        The example code is also available in Canvas
        Setup Parameters
        n = 30
        p = 3
        beta = [-1, 2, 0.5]
        alpha = 0.7
        Simulate X and Y, using normally distributed errors
        5
        np. random . seed ( seed =96)
        X = np. random . normal (loc=0, scale =1, size =(n, p))
        eps = np. random . normal (loc =0, scale =2, size =n)
        y = alpha + X @ beta + eps
        Run the correctly speciffed linear regression model
        result_OLS = OLS( endog =y, exog = add_constant (X)). fit ()
        result_OLS . summary ()
        ˆ Add a well-formatted summary table
        ˆ Interpret the estimate of βˆ
        2 and the R2
        .
        5
        Important: The np.random.seed() will ensure that we all get the same result. In other words, ensure that we are
        using the ”correct” seed and that we don’t generate anything else ”random” before this simulation.
        2NEKN96
        ˆ In a paragraph, discuss if the estimates are consistent with the population regression function.
        Why, why not?
        ˆ Re-run the model, increasing the sample size to n = 10000. In a paragraph, explain what happens
        to the parameter estimates, and why doesn’t R2 get closer and closer to 1 as n increases?
        Q2 - Endogeneity
        What if we (wrongly) assume that the PRF is:
        Y = α + β1X1 + β2X2 + ε (3)
        Use the same seed and setup as in Q1, and now estimate both the ”correct” and the ”wrong” model:
        result_OLS = OLS( endog =y, exog = add_constant (X)). fit ()
        result_OLS . summary ()
        result_OLS_endog = OLS ( endog =y, exog = add_constant (X[:,0:2 ])). fit ()
        result_OLS_endog . summary ()
        ˆ Shouldn’t this imply an omitted variable bias? Show mathematically why it won’t be a problem
        in this speciffc setup (see lecture notes ”Part 2 - Linear Regression”).
        Q3 - Non-Normality and Non-Linearity
        Let’s simulate a sample of n = 3000, keeping the same parameters, but adding kurtosis and skewness
        to the error terms:
        6
        n = 3000
        X = np. random . normal (loc=0, scale =1, size =(n, p))
        eps = np. random . normal (loc =0, scale =2, size =n)
        eps_KU = np. sign ( eps) * eps **2
        eps_SKandKU_tmp = np. where ( eps_KU > 0, eps_KU , eps_KU *2)
        eps_SKandKU = eps_SKandKU_tmp - np. mean ( eps_SKandKU_tmp )
        Now make the dependent variable into a non-linear relationship
        y_exp = np.exp( alpha + X @ beta + eps_SKandKU )
        ˆ Create three ffgures:
        1. Scatterplot of y exp against x 1
        2. Scatterplot of ln(y exp) against x 1
        3. plt.plot(eps SKandKU)
        The ffgure(s) should have a descriptive caption, and all labels and titles should be clear to the
        reader.
        Estimate two linear regression models:
        6The manual addition of kurtosis and skewness will make E [ε] ̸= 0, so we need to remove the average from the errors
        to ensure that the exogeneity assumption is still fulfflled.
        3NEKN96
        res_OLS_nonLinear = OLS( endog =y_exp , exog = add_constant (X)). fit ()
        res_OLS_transformed = OLS ( endog =np.log ( y_exp ), exog = add_constant (X)). fit ()
        ˆ Add the regression tables of the non-transformed and transformed regressions
        ˆ In a paragraph, does the transformed model fft the population regression function?
        Finally, re-run the simulations and transformed estimation with a small sample, n = 30
        ˆ Add the regression table of the transformed small-sample estimate
        ˆ Now, re-do this estimate several times
        7 and observe how the parameter estimates behave. Do
        the non-normal errors seem to be a problem in this spot?
        Hint: Do the parameters seem centered around the population values? Do we reject H0 : βi = 0?
        ˆ In a paragraph, discuss why assuming a non-normal distribution makes it hard to ffnd the
        distributional form under a TRUE null hypothesis, H0 ⇒ Distribution?
        Hint: Why is the central limit theorem key for most inferences?
        Q4 - Heteroscedasticity
        Suggest a way to create heteroscedasticity in the population regression function.
        8
        ˆ Write down the updated population regression function in mathematical notation
        ˆ Estimate the regression function assuming homoscedasticity (as usual)
        ˆ Adjust the standard errors using a Heteroscedastic Autocorrelated Consistent (HAC) estimator
        (clearly state which HAC estimator you use)
        ˆ Add the tables of both the unadjusted and adjusted estimates
        ˆ In a paragraph, discuss if the HAC adjustment to the standard errors makes sense given the
        way you created the heteroscedasticity. Did the HAC adjustment seem to ffx the problem?
        Hint: Bias? Efffcient?
        7Using a random seed for each estimate.
        8Tip: Double-check by simulating the model and plotting the residuals against one of the regressors. Does it look
        heteroscedastic?


        請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp






         

        掃一掃在手機(jī)打開當(dāng)前頁
      1. 上一篇:ITMF7.120代寫、代做Python編程設(shè)計(jì)
      2. 下一篇:代做COMP 412、代寫python設(shè)計(jì)編程
      3. ·CRICOS編程代做、代寫Java程序設(shè)計(jì)
      4. ·MDSB22代做、代寫C++,Java程序設(shè)計(jì)
      5. ·代做Electric Vehicle Adoption Tools 、代寫Java程序設(shè)計(jì)
      6. ·代做INFO90001、代寫c/c++,Java程序設(shè)計(jì)
      7. · COMP1711代寫、代做C++,Java程序設(shè)計(jì)
      8. ·GameStonk Share Trading代做、java程序設(shè)計(jì)代寫
      9. ·CSIT213代做、代寫Java程序設(shè)計(jì)
      10. ·CHC5223代做、java程序設(shè)計(jì)代寫
      11. ·代做INFS 2042、Java程序設(shè)計(jì)代寫
      12. ·代寫CPT206、Java程序設(shè)計(jì)代做
      13. 合肥生活資訊

        合肥圖文信息
        出評 開團(tuán)工具
        出評 開團(tuán)工具
        挖掘機(jī)濾芯提升發(fā)動機(jī)性能
        挖掘機(jī)濾芯提升發(fā)動機(jī)性能
        戴納斯帝壁掛爐全國售后服務(wù)電話24小時(shí)官網(wǎng)400(全國服務(wù)熱線)
        戴納斯帝壁掛爐全國售后服務(wù)電話24小時(shí)官網(wǎng)
        菲斯曼壁掛爐全國統(tǒng)一400售后維修服務(wù)電話24小時(shí)服務(wù)熱線
        菲斯曼壁掛爐全國統(tǒng)一400售后維修服務(wù)電話2
        美的熱水器售后服務(wù)技術(shù)咨詢電話全國24小時(shí)客服熱線
        美的熱水器售后服務(wù)技術(shù)咨詢電話全國24小時(shí)
        海信羅馬假日洗衣機(jī)亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
        海信羅馬假日洗衣機(jī)亮相AWE 復(fù)古美學(xué)與現(xiàn)代
        合肥機(jī)場巴士4號線
        合肥機(jī)場巴士4號線
        合肥機(jī)場巴士3號線
        合肥機(jī)場巴士3號線
      14. 短信驗(yàn)證碼 酒店vi設(shè)計(jì)

        精品无码久久久久国产动漫3d| 亚洲精品国产精品乱码不99 | 91精品国产免费久久久久久青草| 国产成人无码久久久精品一| 精品精品国产国产| 日韩人妻无码精品无码中文字幕| 久久亚洲日韩精品一区二区三区| 国产99视频精品免费视频7| 精品国产亚洲一区二区三区在线观看| 一本一本久久a久久综合精品蜜桃| 7m凹凸精品分类大全免费| 久久久久人妻一区精品色| 日韩欧美中文字幕公布| 国产99视频精品免费视频7| 国产精品第一区揄拍无码| 国产愉拍精品手机| 久久66热这里只会有精品| 亚洲精品无码av人在线观看| 国内精品久久久久久麻豆 | 亚洲精品乱码久久久久久下载| 久久96精品国产| 久久精品99国产精品日本| 久久综合精品不卡一区二区| 国产精品久线在线观看| 国产精品污WWW在线观看| 亚洲午夜国产精品无码老牛影视| 999精品视频这里只有精品| 91精品一区国产高清在线| 国产偷国产偷精品高清尤物| 99精品久久精品| 亚洲精品V欧洲精品V日韩精品| 亚洲精品成人片在线观看精品字幕 | 妇女自拍偷自拍亚洲精品| 精品国产三上悠亚在线观看| 国产日产欧产精品精品蜜芽| 国产人妻777人伦精品hd| 精品国产区一区二区三区在线观看| 国精产品一品二品国精品69xx| 成人亚洲国产精品久久| 免费a级毛片18以上观看精品 | 999精品视频在线观看|