ProfileLikelihood (version 1.1)

dataglm: Example Data for a Profile Likelihood in Generalized Linear Models

Description

This data is used to illustrate how to obtain values for a profile likelihood of a parameter of interest in a generalized linear model.

Usage

data(dataglm)

Arguments

Format

A data frame with 100 observations on the following 5 variables.

id

a numeric vector; unique identification number

y

a numeric vector; binary outcome variable

x1

a numeric vector; covariate

x2

a numeric vector; covariate

group

a numeric vector; covariate and a parameter of interest

Details

This data is used to illustrate how to obtain values for a profile likelihood of a parameter of interest in a logistic regression model. A parameter of interest is group indicator variable, y is a binary outcome, and x1 and x2 are covariates in a logistic regression model.

Examples

Run this code
# NOT RUN {
data(dataglm)
xx <- profilelike.glm(y ~ x1 + x2, data=dataglm, profile.theta="group", 
				family=binomial(link="logit"), length=500, round=2)
profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=2)
# }

Run the code above in your browser using DataCamp Workspace