After using the lm and step functions, I found that my model has outlier
issues. To remedy this, I switched to the MASS package using rlm and
stepAIC to produce a robust regression. When conducting the stepAIC process
I am receiving an error I didn't receive when using the non-robust
regression,

AIC is not defined for this model, so 'stepAIC' cannot proceed
Still finding my way around R, I came across some language I am not
familiar with regarding setting the scope within stepAIC, is my scope
language incorrect? I am sure this is very basic, but am struggling to
correct.

I appreciate any help you may be able to provide me.

Sincerely,

John


> FVM10Yr <- read.table("10FVM.txt", header = T)

> attach (FVM10)

> names (FVM10)

 [1] "DATE"                    "X1"           "X2"           "X3"
"X4"
  "X5"      "X6"

 [8] “X7"                         "X8"          "X9"            "X10"

> head (FVM10)

DATE

X1

X2

X3

X4

X5

X6

X7

X8

X9

X10

1

6/26/2009

3.557

1.77

94.04

51.9

159

598

0.216

-18.9

6618

6.551

2

7/3/2009

3.519

1.78

93.98

35.8

149.1

593

0.201

10.9

6169

6.169

3

7/10/2009

3.329

1.76

92.82

37.9

135.9

581

0.194

4.3

6148

6.255

4

7/17/2009

3.677

1.75

95.36

35.4

156.3

569

0.191

2.8

6111

5.847

5

7/24/2009

3.691

1.61

94.82

32.6

143.6

567

0.196

-6.3

6169

5.613

6

7/31/2009

3.513

1.51

94.47

30.9

138.5

562

0.201

4.4

6111

5.563



















































> RFVM1 <- rlm (X1 ~ X2 + X3 + X4 + X5 + X6 + X7 + X8 +X9 + X10)

> summary (RFVM1)

Call: rlm(formula = X1 ~ X2 + X3 + X4 + X5 + X6 + X7 + X8 + X9 + X10)

Residuals:

     Min                                          1Q
                                 Median                       3Q
                    Max

-0.78425                                -0.23427
0.01972                 0.21072                 0.70794

Coefficients:

                                Value                      Std. Error
t value

(Intercept)           -4.2828                  1.7518
-2.4448

X2                          -1.1240                  0.1586
               -7.0880

X3                           0.0619                   0.0174
3.5688

X4                           0.0010                   0.0006
1.7372

X5                           0.0151                   0.0019
8.1630

X6                           0.0094                   0.0028
3.3725

X7                           3.7905                    0.7922
4.7847

X8                           0.0014                   0.0029
0.4862

X9                           -0.0005                   0.0002
              -2.1168

X10                         -0.2425                   0.0556
              -4.3647

Residual standard error: 0.3323 on 204 degrees of freedom

> RFVM2 <- stepAIC(RFVM1, scale = 0, scope = list(lower = .~1, upper = .~X2
+ X3 + X4 + X5 + X6 + X7 + X8 +X9 + X10), k=2)

Error in stepAIC(RFVM1, scale = 0, scope = list(lower = . ~ 1, upper = . ~  :


  AIC is not defined for this model, so 'stepAIC' cannot proceed

	[[alternative HTML version deleted]]

