Comments (2)
To be consistent should that not be
|P <- if(length(idf)) 2 * pt(-abs(Z), idf)) else 2 * pnorm(-abs(Z)) |
On 09/30/2015 11:48 AM, Alexander Ploner wrote:
The function |contrast.rms| reports the p-values for all Wald
statistics absolutely larger than ca. 9 as an exact zero.Example adapted from the |contrast.rms| help page with Z=10.36:
|set.seed(1) x = rnorm(500) xb = 1+2*x y = ifelse(runif(500) <=
plogis(xb), 1, 0) f = lrm(y ~ x) ct = contrast(f, list(x=1)) ct
ct$P==0 ## Exact zero |The problem seems to be the line below in |contrast.s| where the
p-value is calculated:|P <- if(length(idf)) 2 * (1 - pt(abs(Z), idf)) else 2 * (1 -
pnorm(abs(Z))) |Replacing this with
|P <- if(length(idf)) 2 * (1 - pt(abs(Z), idf)) else 2 * pnorm(-abs(Z)) |
should do the trick.
|rms 4.3-1 _ platform x86_64-w64-mingw32 arch x86_64 os mingw32 system
x86_64, mingw32 status major 3 minor 2.2 year 2015 month 08 day 14 svn
rev 69053 language R version.string R version 3.2.2 (2015-08-14)
nickname Fire Safety |—
Reply to this email directly or view it on GitHub
#13.
Frank E Harrell Jr Professor and Chairman School of Medicine
Department of *Biostatistics* *Vanderbilt University*
from rms.
Of course! Sorry, completely blinded to dfs :) /alexander
On 2015-09-30 19:16, Frank Harrell wrote:
To be consistent should that not be
|P <- if(length(idf)) 2 * pt(-abs(Z), idf)) else 2 * pnorm(-abs(Z)) |
On 09/30/2015 11:48 AM, Alexander Ploner wrote:
The function |contrast.rms| reports the p-values for all Wald
statistics absolutely larger than ca. 9 as an exact zero.Example adapted from the |contrast.rms| help page with Z=10.36:
|set.seed(1) x = rnorm(500) xb = 1+2*x y = ifelse(runif(500) <=
plogis(xb), 1, 0) f = lrm(y ~ x) ct = contrast(f, list(x=1)) ct
ct$P==0 ## Exact zero |The problem seems to be the line below in |contrast.s| where the
p-value is calculated:|P <- if(length(idf)) 2 * (1 - pt(abs(Z), idf)) else 2 * (1 -
pnorm(abs(Z))) |Replacing this with
|P <- if(length(idf)) 2 * (1 - pt(abs(Z), idf)) else 2 *
pnorm(-abs(Z)) |should do the trick.
|rms 4.3-1 _ platform x86_64-w64-mingw32 arch x86_64 os mingw32 system
x86_64, mingw32 status major 3 minor 2.2 year 2015 month 08 day 14 svn
rev 69053 language R version.string R version 3.2.2 (2015-08-14)
nickname Fire Safety |—
Reply to this email directly or view it on GitHub
#13.
Frank E Harrell Jr Professor and Chairman School of Medicine
Department of Biostatistics Vanderbilt University
—
Reply to this email directly or view it on GitHub
#13 (comment).
Alexander Ploner
Medical Epidemiology & Biostatistics
Karolinska Institutet
http://ki.se/meb
from rms.
Related Issues (20)
- Fatal error in Gls(B > 0)
- allow to pass argument to solver (SparseM)
- Anova command does not run with lapply
- How to include time-vary covariates using tt=function from coxph in rcs code?
- print.Gls() using corSymm() returns error message.
- lrm and Rcmdr conflict HOT 2
- rexVar in survival model (cph) HOT 1
- How to estimate OR and 95%CI using Predict funtion for svyglm model?
- RCS curve in competing risk model
- Estimating contrasts and marginal effects from aregImpute multiply imputed data
- Accidentally turning on backward step-down procedure in `validate` and `calibrate`
- Compare absolute effects with Contrast function HOT 1
- Error with nomogram: Error in reformulate(attr(termobj, "term.labels")[-dropx], response = if (keep.response) termobj[[2L]], : 'termlabels' must be a character vector of length at least one HOT 1
- "nomogram" function dosn't work HOT 3
- Trouble with definition of "D" in `val.prob`.
- Blank screen - survplot HOT 1
- Warning when using summary() for a logistic regression model for long model formulas HOT 1
- survplot - set your own axis
- lrtest() accepts models fit on different number of observations HOT 1
- Predict(): Error in reformulate(attr(termobj, "term.labels")[-dropx], response = if (keep.response) termobj[[2L]] HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rms.