Closed nvanzuy closed 5 years ago
Hi, this error is checking whether there are enough instrumental variables to run the method. Since we are running a regression model on the instrumental variables (as observations) the number of instrumental variables must be greater than the number of estimated parameters in the model for the estimations and statistical tests to run. Best.
Hi Ron, I cannot understand this Prerequisite- "if(nrow(data) <= length(BetaExposure) + 2) stop("Not enough intrumental variables")". Why did "nrow(data)" not equate to "length(BetaExposure)"? What is the minimum number of genetic variants as instrumental variables? I look forward to your reply. Best regards, Wenqiang.
Hi Steven-ZWQ, I am also confused by "if(nrow(data) <= length(BetaExposure) + 2) stop("Not enough intrumental variables")", do you got any idea about this issue? is the data mean harmonise result here? then nrow(data) should be equate to "length(BetaExposure), looking forward to reply. Best regards, Yanfeng.
Hi there,
Just wondering if you could clarify something?
I'm wondering what this particular error message is checking. If I am providing a dataframe with my Beta and standard errors for Exposure and outcome for the same number of SNPs when would nrow(data)>length(BetaExposure)+2?
Thanks, Natalie