Learn R Programming

rpms (version 0.5.1)

predict.rpms: predict.rpms

Description

Predicted values based on rpms object

Usage

# S3 method for rpms
predict(object, newdata, ...)

Arguments

object

Object inheriting from rpms

newdata

data frame with variables to use for predicting new values.

...

further arguments passed to or from other methods.

Value

vector of predicticed values for each row of newdata

Examples

Run this code
# NOT RUN {
{

# 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, ])

}

# }

Run the code above in your browser using DataLab