Page 1 of 1

Consider a dataset with a continuous response Y and only one covariate X. We model this dataset by a weighted linear reg

Posted: Thu Jan 13, 2022 5:46 am
by answerhappygod
Consider A Dataset With A Continuous Response Y And Only One Covariate X We Model This Dataset By A Weighted Linear Reg 1
Consider A Dataset With A Continuous Response Y And Only One Covariate X We Model This Dataset By A Weighted Linear Reg 1 (32.95 KiB) Viewed 72 times
Consider A Dataset With A Continuous Response Y And Only One Covariate X We Model This Dataset By A Weighted Linear Reg 2
Consider A Dataset With A Continuous Response Y And Only One Covariate X We Model This Dataset By A Weighted Linear Reg 2 (92.68 KiB) Viewed 72 times
Consider a dataset with a continuous response Y and only one covariate X. We model this dataset by a weighted linear regression model: Yi = a + Bw;X; + €; with e; ~ Normal(0,0%), (6) where • Yi is the response of the ith observation, • Xi is the value of covariate X of the įth observation, W; is the positive weight of the ith observation, Ei is the error term of the ith observation, .

a is intercept, B is coefficient of covariate X, and 92 is the error variance. (7) The weighted least squares estimates of a and B are â=y-Baw, B = (usai – a)(1 – 9) 2:21 (Wiki – Tw2 N with Iw= Lizi Wix, (8) N Write a function, called bootWLRegCoef, that calculates the standard errors of â and ß, using the bootstrap method and equations (7) and (8). The bootWLRegCoef function have the following features. Arguments: • x is a numeric vector representing the values of covariate X. • y is a numeric vector representing the values of the response and has the same length as x. w is a numeric vector representing the values of the positive weights and has the same length as x. • bootCount is a positive integer representing the number of bootstrap replicates to be used. Computation: • Use the bootstrap method to calculate se(â) and se(f), which are the standard errors of â and Ê respectively. . Return: A numeric vector, where the first element is the bootstrap estimate of se(a), and the second element is the bootstrap estimate of se(B).