Skip to content

Commit

Permalink
fix firth regression
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanxw committed Apr 2, 2015
1 parent d2f8a38 commit 622bf3d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2015-04-02 Xiaowei Zhan <zhanxw@dumbo.csgstat.sph.umich.edu>

* Fix output formats for Firth regression

2015-04-01 Xiaowei Zhan <zhanxw@fantasia.csgstat.sph.umich.edu>

* Fix bug when dealing binary phenotypes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Rvtests, which stands for Rare Variant tests, is a flexible software package for
# Download

Source files can be downloaded from [github](https://github.com/zhanxw/rvtests/archive/master.zip) or [github page](https://github.com/zhanxw/rvtests).
Executable binary files (for Linux 64bit) can be downloaded from [here](https://github.com/zhanxw/rvtests/releases/download/v1.9.0/rvtests-20150401.tar.gz).
Executable binary files (for Linux 64bit) can be downloaded from [here](https://github.com/zhanxw/rvtests/releases/download/v1.9.1/rvtests-20150402.tar.gz).


# Quick tutorial
Expand Down
2 changes: 1 addition & 1 deletion src/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

Logger* logger = NULL;

const char* VERSION = "20150401";
const char* VERSION = "20150402";

void banner(FILE* fp) {
const char* string =
Expand Down
8 changes: 5 additions & 3 deletions src/Model.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,19 +211,18 @@ class SingleVariantFirthTest : public ModelFitter {
}
// write model output
void writeOutput(FileWriter* fp, const Result& siteInfo) {
siteInfo.writeValueTab(fp);

// skip interecept (column 0)
for (int i = 1; i < this->X.cols; ++i) {
siteInfo.writeValueTab(fp);
result.clearValue();
result.updateValue("Test", this->X.GetColumnLabel(i));
if (fitOK) {
result.updateValue("Beta", firth.GetCovEst()[i]);
result.updateValue("SE", sqrt(firth.GetCovB()[i][i]));
result.updateValue("Pvalue", firth.GetAsyPvalue()[i]);
}
result.writeValueLine(fp);
}
result.writeValueLine(fp);
}

private:
Expand Down Expand Up @@ -3652,9 +3651,12 @@ class MetaCovTest : public ModelFitter {
}
}
} else {
#if 0
//// allow binary traits
/// for binary, no need to center. and not support family.
fprintf(stderr, "Not supported mode!\n");
abort();
#endif
}
fitOK = true;
return (fitOK ? 0 : -1);
Expand Down

0 comments on commit 622bf3d

Please sign in to comment.