matloff / matloff/regtools

Error with qe(): handling one predictor and one response variable

Open
#8 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
124
Forks
33
PR merge metrics
No merged PRs in 30d

Description

**What is the issue?**

Improper handling of the data frame with only 1 predictor variable and 1 response variable.

**Steps to reproduce the error**

data(peFactors)
names(peFactors)

pef <- peFactors[,c(1,8)]

lmout <- qeLin(pef , 'wageinc')

parvsnonparplot(lmout,qeKNN(pef , 'wageinc', 25))

**Expected error**

**1. error message from qeLin()**
Error in eval(predvars, data, env) :
numeric 'envir' arg not of length one

**2 error message from qeKNN()**
Error in getXY(newx, NULL, TRUE, FALSE, object$factorsInfo) :
data must be a data frame

![Screenshot 2020-11-06 at 12 59 08 AM](https://user-images.githubusercontent.com/24616330/98346784-516f4180-1fcb-11eb-84c6-966e6ba55bd4.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the reported peFactors subset and the qeLin(), qeKNN(), and parvsnonparplot() calls to reproduce both errors. Trace the data-frame handling around these entry points and compare behavior with inputs containing more predictors. Done means the one-predictor, one-response example completes without either reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.