0

I am currently working a Propensity Score Analysis based of off "Propensity score matching with R: conventional methods and new features" by Qin-Yu Zhao1#, Jing-Chao Luo2#, Ying Su2, Yi-Jie Zhang2, Guo-Wei Tu2, Zhe Luo3. https://atm.amegroups.com/article/view/61857/html

While doing MatchIt with logistic regression I encounter an issue with the provided code.

matchit(formula, data, method = "nearest", distance = "logit", 
       distance.op-tions = list(), discard = "none", reestimate = FALSE) 

m.out <- matchit(Smoke~x.Age+x.Gender, 
                        data=data.complete,
                        distance='logit')

m.out$model
call: glm(formula = formula, family = binomial(logit), data = 
            data)

Where I just get the error "Error: object 'Call' not found" I cannot find any examples of Call: online and I am not familiar with the syntax of a single ":".

I've tried searching online for similar implementations and have as of yet fallen short. I am not sure what the output of the code would be.

Lunde
  • 1
  • 1
  • 2
    That looks like output from a previous command (`m.out$model`, probably), rather than code. If you just run up to and including `m.out$model`, do you see the `call` line printed? – Hobo May 05 '23 at 11:09
  • 1
    Hey, you are correct. It is the first line of the output of m.out$model, Thank you! – Lunde May 05 '23 at 11:50
  • Please provide enough code so others can better understand or reproduce the problem. – Community May 05 '23 at 18:37

0 Answers0