gpFunction: Illustration of gpFunction

Description Usage Arguments Value Examples

View source: R/titanicFunction.R

Description

Returns the probability of the given person surviving or not.

Usage

1
gpFunction(Sex, Class, Age, Family, Embarked, Fare, model = NULL)

Arguments

Sex

male, female: include quotation marks ("male" or "female")

Class

First, Second, Third,; include quotation marks ("First" or "Second" or "Third")

Age

real number

Family

integer

Embarked

C,Q,S; include quotation marks ("C" or "Q" or "S")

Fare

real number

model

By default this is the model given by stepwise regression using the starting model 3 (Model including all three-way interaction terms and lower terms, plus some polynomial terms). Can be changed.

Value

The probability of someone with those characteristics surviving is returned.

Examples

1
2
3
4
Test1 <- gpFunction("male", "Third", 20, 0, "S", 8.05)
Test2 <- gpFunction("female", "Third", 21, 0, "Q", 7.8792)
Test3 <- gpFunction("male", "First", 40, 0, "C", 27.7208)
Test4 <- gpFunction("female", "Second", 3, 3, "C", 41.5792)

Betsy010/myPackage2 documentation built on May 5, 2019, 2:42 p.m.