[R] Plot with residuals in mgcv

2012-11-28 Thread silje skår
Hi, I am using the mgcv package (version 1.7-22.) running the model works fine, but when I want to have a plot with residuals I get an error. fit29<-gam(IV~s(G3)+s(V3)+factor(AAR)+s(D3)+s(RUTE,bs="re"),data=subsf,gamma=1.4,method="ML") plot(fit29,residuals=T) Error in X[, first:last] %*% object

[R] Random effects in gam (mgcv 1.7-19)

2012-08-14 Thread silje skår
ve is if anyone knows how I can compare two gam models that includes "re" terms? As far as I understand an anova is not the best way when I have "re" terms. Best regards Silje Skår [[alternative HTML version deleted]] __ R-h

[R] NA in R package randomForest

2012-03-26 Thread silje skår
I have a question regarding NA in randomForest (in R). I have a dataset which include both numerical and non-numerical variables, and the data includes some NA. I tried to use na.roughfix but then i get an error message "na.roughfix only works for numeric or factor". I also tried rfImpute but this

[R] Different cp values in rpart() using plotcp() and printcp()

2012-02-17 Thread silje skår
hi, I have a question regarding cp values in rpart(). When I use plotcp() I get a figure with cp values on the x-axsis, but then I use printcp() the cp values in that list are different from the values in the figure by plotcp(). Does someone know why? Silje [[alternative HTML version del

[R] Different cp values by plotcp() and printcp() in rpart()

2012-02-16 Thread silje skår
hi, I have a question regarding cp values in rpart(). When I use plotcp() I get a figure with cp values on the x-axsis, but then I use printcp() the cp values in that list are different from the values in the figure by plotcp(). Does someone know why? Silje [[alternative HTML version del