predict.rpms: predict.rpms

Description Usage Arguments Value Examples

View source: R/sfun_rpm_20_04_04.R

Description

Predicted values based on rpms object

Usage

1
2
## S3 method for class '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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
{

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

}

rpms documentation built on June 26, 2021, 1:07 a.m.