| predict.rpms | R Documentation |
Predicted values based on rpms object
## S3 method for class 'rpms' predict(object, newdata, ...)
object |
Object inheriting from |
newdata |
data frame with variables to use for predicting new values. |
... |
further arguments passed to or from other methods. |
vector of predicticed values for each row of newdata
{
# get rpms model of mean Soc Security income for families headed by a
# retired person by several factors
r1 <-rpms(SOCRRX~EDUCA+AGE+BLS_URBN+REGION,
data=CE[which(CE$INCNONWK==1),], clusters=~CID)
r1
# first 10 predicted means
predict(r1, CE[10:20, ])
}