Skip to main content
Post Locked by chl
Notice added Content dispute by chl
Rollback to Revision 5
Source Link
chl
  • 54.4k
  • 23
  • 227
  • 388

Delet sdasdasdasdas Deletion residuals

2111111111111111111111111111111111111111111111111111111111111111111111111111 Please can you help me to solve this problem. It should be calculated by vectorization. The question is:

The i-th deletion residual $e_{(-i)}$ is defined as $e_{(-i)} = y_i - X^\top B_{(-i)}$
where $(X^\top)$ is the i-th row of the design matrix $X$ and $B_{(-i)}$ is a column vector of least square parameter estimates calculated without the i-th observation. Write some annotated R code to calculate the deletion residuals when the linear model $y_i = B_0 + B_1 X_i + B_2X_i^2 + E_i$
is fitted to the data in the file quadratic.txt. By drawing suitable plot, comment on the distribution of these deletion residuals.


Edit

I wrote some r codes , but it just gives me residual. I want to calculate deletion residual for i-th cases.

> quad<-read.table("quadratic.txt", header=T)
> quad
    

tha data is like this

x=(0.75078002, 0.70959645 ,0.07482854,0.60755927 ,0.55037327 ,0.55037327,   
0.35458257 ,0.21994714,0.66369585,0.12381099, 0.12381099,0.12381099,  
0.77869635,0.63917962) 

and

y=(18.715191,17.394049,-2.346149,5.528978,6.765831,6.324425,13.803874,  
15.007047,4.034973,12.383765,14.823395)

> quad.lm<-lm(y~x+I(x^2), data=quad)
> resid(quad.lm)
        1          2          3          4          5          6          7 
3.7933593  3.2646946 -4.9080046 -6.6589585 -4.3477835 -1.1856694  8.7046506 
        8          9         10         11 
1.7549092  0.6237708 -3.0781575  2.0371889 

Delet sdasdasdasdas

2111111111111111111111111111111111111111111111111111111111111111111111111111

Deletion residuals

Please can you help me to solve this problem. It should be calculated by vectorization. The question is:

The i-th deletion residual $e_{(-i)}$ is defined as $e_{(-i)} = y_i - X^\top B_{(-i)}$
where $(X^\top)$ is the i-th row of the design matrix $X$ and $B_{(-i)}$ is a column vector of least square parameter estimates calculated without the i-th observation. Write some annotated R code to calculate the deletion residuals when the linear model $y_i = B_0 + B_1 X_i + B_2X_i^2 + E_i$
is fitted to the data in the file quadratic.txt. By drawing suitable plot, comment on the distribution of these deletion residuals.


Edit

I wrote some r codes , but it just gives me residual. I want to calculate deletion residual for i-th cases.

> quad<-read.table("quadratic.txt", header=T)
> quad
    

tha data is like this

x=(0.75078002, 0.70959645 ,0.07482854,0.60755927 ,0.55037327 ,0.55037327,   
0.35458257 ,0.21994714,0.66369585,0.12381099, 0.12381099,0.12381099,  
0.77869635,0.63917962) 

and

y=(18.715191,17.394049,-2.346149,5.528978,6.765831,6.324425,13.803874,  
15.007047,4.034973,12.383765,14.823395)

> quad.lm<-lm(y~x+I(x^2), data=quad)
> resid(quad.lm)
        1          2          3          4          5          6          7 
3.7933593  3.2646946 -4.9080046 -6.6589585 -4.3477835 -1.1856694  8.7046506 
        8          9         10         11 
1.7549092  0.6237708 -3.0781575  2.0371889 
`12`12`121``2`
Source Link
nina
  • 21
  • 1
  • 4

Deletion residuals Delet sdasdasdasdas

Please can you help me to solve this problem. It should be calculated by vectorization. The question is:

The i-th deletion residual $e_{(-i)}$ is defined as $e_{(-i)} = y_i - X^\top B_{(-i)}$
where $(X^\top)$ is the i-th row of the design matrix $X$ and $B_{(-i)}$ is a column vector of least square parameter estimates calculated without the i-th observation. Write some annotated R code to calculate the deletion residuals when the linear model $y_i = B_0 + B_1 X_i + B_2X_i^2 + E_i$
is fitted to the data in the file quadratic.txt. By drawing suitable plot, comment on the distribution of these deletion residuals.


Edit

I wrote some r codes , but it just gives me residual. I want to calculate deletion residual for i-th cases.

> quad<-read.table("quadratic.txt", header=T)
> quad
    

tha data is like this

x=(0.75078002, 0.70959645 ,0.07482854,0.60755927 ,0.55037327 ,0.55037327,   
0.35458257 ,0.21994714,0.66369585,0.12381099, 0.12381099,0.12381099,  
0.77869635,0.63917962) 

and2111111111111111111111111111111111111111111111111111111111111111111111111111

y=(18.715191,17.394049,-2.346149,5.528978,6.765831,6.324425,13.803874,  
15.007047,4.034973,12.383765,14.823395)

> quad.lm<-lm(y~x+I(x^2), data=quad)
> resid(quad.lm)
        1          2          3          4          5          6          7 
3.7933593  3.2646946 -4.9080046 -6.6589585 -4.3477835 -1.1856694  8.7046506 
        8          9         10         11 
1.7549092  0.6237708 -3.0781575  2.0371889 

Deletion residuals

Please can you help me to solve this problem. It should be calculated by vectorization. The question is:

The i-th deletion residual $e_{(-i)}$ is defined as $e_{(-i)} = y_i - X^\top B_{(-i)}$
where $(X^\top)$ is the i-th row of the design matrix $X$ and $B_{(-i)}$ is a column vector of least square parameter estimates calculated without the i-th observation. Write some annotated R code to calculate the deletion residuals when the linear model $y_i = B_0 + B_1 X_i + B_2X_i^2 + E_i$
is fitted to the data in the file quadratic.txt. By drawing suitable plot, comment on the distribution of these deletion residuals.


Edit

I wrote some r codes , but it just gives me residual. I want to calculate deletion residual for i-th cases.

> quad<-read.table("quadratic.txt", header=T)
> quad
    

tha data is like this

x=(0.75078002, 0.70959645 ,0.07482854,0.60755927 ,0.55037327 ,0.55037327,   
0.35458257 ,0.21994714,0.66369585,0.12381099, 0.12381099,0.12381099,  
0.77869635,0.63917962) 

and

y=(18.715191,17.394049,-2.346149,5.528978,6.765831,6.324425,13.803874,  
15.007047,4.034973,12.383765,14.823395)

> quad.lm<-lm(y~x+I(x^2), data=quad)
> resid(quad.lm)
        1          2          3          4          5          6          7 
3.7933593  3.2646946 -4.9080046 -6.6589585 -4.3477835 -1.1856694  8.7046506 
        8          9         10         11 
1.7549092  0.6237708 -3.0781575  2.0371889 

Delet sdasdasdasdas

2111111111111111111111111111111111111111111111111111111111111111111111111111

Rollback to Revision 7
Source Link
user10525
user10525

1212131242353647586708Please can you help me to solve this problem. It should be calculated by vectorization. The question is:

The i-th deletion residual $e_{(-i)}$ is defined as $e_{(-i)} = y_i - X^\top B_{(-i)}$
where $(X^\top)$ is the i-th row of the design matrix $X$ and $B_{(-i)}$ is a column vector of least square parameter estimates calculated without the i-th observation. Write some annotated R code to calculate the deletion residuals when the linear model $y_i = B_0 + B_1 X_i + B_2X_i^2 + E_i$
is fitted to the data in the file quadratic.txt. By drawing suitable plot, comment on the distribution of these deletion residuals.


Edit

I wrote some r codes , but it just gives me residual. I want to calculate deletion residual for i-8655344123123414123212431231231212131312313`13131331th cases.

> quad<-read.table("quadratic.txt", header=T)
> quad
    

tha data is like this

x=(0.75078002, 0.70959645 ,0.07482854,0.60755927 ,0.55037327 ,0.55037327,   
0.35458257 ,0.21994714,0.66369585,0.12381099, 0.12381099,0.12381099,  
0.77869635,0.63917962) 

and

y=(18.715191,17.394049,-2.346149,5.528978,6.765831,6.324425,13.803874,  
15.007047,4.034973,12.383765,14.823395)

> quad.lm<-lm(y~x+I(x^2), data=quad)
> resid(quad.lm)
        1          2          3          4          5          6          7 
3.7933593  3.2646946 -4.9080046 -6.6589585 -4.3477835 -1.1856694  8.7046506 
        8          9         10         11 
1.7549092  0.6237708 -3.0781575  2.0371889 

1212131242353647586708-8655344123123414123212431231231212131312313`13131331

Please can you help me to solve this problem. It should be calculated by vectorization. The question is:

The i-th deletion residual $e_{(-i)}$ is defined as $e_{(-i)} = y_i - X^\top B_{(-i)}$
where $(X^\top)$ is the i-th row of the design matrix $X$ and $B_{(-i)}$ is a column vector of least square parameter estimates calculated without the i-th observation. Write some annotated R code to calculate the deletion residuals when the linear model $y_i = B_0 + B_1 X_i + B_2X_i^2 + E_i$
is fitted to the data in the file quadratic.txt. By drawing suitable plot, comment on the distribution of these deletion residuals.


Edit

I wrote some r codes , but it just gives me residual. I want to calculate deletion residual for i-th cases.

> quad<-read.table("quadratic.txt", header=T)
> quad
    

tha data is like this

x=(0.75078002, 0.70959645 ,0.07482854,0.60755927 ,0.55037327 ,0.55037327,   
0.35458257 ,0.21994714,0.66369585,0.12381099, 0.12381099,0.12381099,  
0.77869635,0.63917962) 

and

y=(18.715191,17.394049,-2.346149,5.528978,6.765831,6.324425,13.803874,  
15.007047,4.034973,12.383765,14.823395)

> quad.lm<-lm(y~x+I(x^2), data=quad)
> resid(quad.lm)
        1          2          3          4          5          6          7 
3.7933593  3.2646946 -4.9080046 -6.6589585 -4.3477835 -1.1856694  8.7046506 
        8          9         10         11 
1.7549092  0.6237708 -3.0781575  2.0371889 
12312413423543452342342342
Source Link
nina
  • 21
  • 1
  • 4
Loading
Rollback to Revision 5
Source Link
user10525
user10525
Loading
1111111111111111111111111111111111111111
Source Link
nina
  • 21
  • 1
  • 4
Loading
deleted 2 characters in body; edited title
Source Link
chl
  • 54.4k
  • 23
  • 227
  • 388
Loading
appended answer 44915 as supplemental
Source Link
chl
  • 54.4k
  • 23
  • 227
  • 388
Loading
edited tags
Link
chl
  • 54.4k
  • 23
  • 227
  • 388
Loading
Tweeted twitter.com/#!/StackStats/status/275177965845901313
attempt to improve on screen appearance by preventing math overwriting text
Source Link
Glen_b
  • 290.5k
  • 37
  • 652
  • 1.1k
Loading
Source Link
nina
  • 21
  • 1
  • 4
Loading