[R] Multi-variate rcs() error

x to_rent_2000 at yahoo.com
Thu Apr 30 23:53:39 CEST 2009


Hi,

My code, output, error message, and sample data are all below. As always, all help is appreciated.

Code:
====
library(Design); library(lattice)

df = read.table("./data_cub4.txt", header=TRUE, nrows=100)
attach(df); dd = datadist(df); options(datadist = 'dd'); describe(df);

m = (y1 ~ ( rcs(x1,3) + rcs(x2,3) ) )
f = ols(m, data=df)
print(f)
print( Function(f) )
detach(df)

Output:
======
Linear Regression Model ...
         n Model L.R.       d.f.         R2      Sigma 
       100      720.7          4     0.9993      82.44 
Residuals:
    Min      1Q  Median      3Q     Max 
-113.21  -70.46  -20.09   65.77  214.77 
Coefficients:
           Value Std. Error         t Pr(>|t|)
Intercept 757.85  1.647e+17 4.601e-15        1
x1         35.58  9.080e+14 3.919e-14        1
x1'        85.92  6.475e+14 1.327e-13        1
x2            NA  1.797e+14        NA       NA
x2'           NA  6.475e+14        NA       NA

Residual standard error: 82.44 on 95 degrees of freedom
Adjusted R-Squared: 0.9992 

Error in if (coef[i] > 0 & (i > 2 | coef[1] != 0 | Intc != 0)) "+" else NULL : missing value where TRUE/FALSE needed

Sample data:
=================
config	benchmark	y1	x1	x2	noise
1	verify2	1008.2	1	1000	0.72
2	verify2	1019	2	999	1.6




More information about the R-help mailing list