I've been using Stata 17 for my research and after analyzing and cleaning I need to use R for a specific reason but when I'm using the following command to read the data , it drops a huge chunk of observations without following any pattern. Can anyone tell me is it the problem of stata 17 or there is any fault in my way coding to read the data in R ?

This is the following method of code I'm using to read the data created from stata 17 in R :

#

library(tidyverse)

library(readstata13)

dat <- as_tibble(read.dta13("edited treat.dta"))

#

Any kind advice would be much appreciated