Giter Club home page Giter Club logo

simcormultres's People

Contributors

anestistouloumis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

simcormultres's Issues

rbin: biased correlation parameter estimate using GEE

I've noticed that the correlation estimate from fitting a GEE model (package gee) is consistently smaller than the true correlation parameter I enter in the rbin statement. In the example below, my true rho = 0.5 (exchangeable correlation structure) but the estimated rho in GEE is 0.2999. I've conducted a small simulation (n = 1000) and the estimated rho is consistently smaller. Fixed effects seem asymptotically unbiased. I would like to obtain unbiased correlation estimates as well as unbiased fixed effects. Please advise.

library(SimCorMultRes)
library(gee)

N <- 100
x <- rbinom(N, 1, prob = 0.5)
xvec <- rep(x, each = 3)

intercepts <- -1
betas <- 0.5

clsize <- 3
rho <- 0.5

cor.matrix <- matrix(ncol = 3, nrow = 3,
c(1, rho, rho,
rho, 1, rho,
rho, rho, 1))

CorBinRes <- rbin(clsize = clsize, intercepts = intercepts, betas = betas,
xformula = ~xvec, cor.matrix = cor.matrix, link = "logit")

binGEEmod <- gee(y ~ xvec, family = binomial("logit"), id = id,
corstr = "exchangeable",
data = CorBinRes$simdata)
summary(binGEEmod)

summary(binGEEmod)

GEE: GENERALIZED LINEAR MODELS FOR DEPENDENT DATA
gee S-function, version 4.13 modified 98/01/27 (1998)

Model:
Link: Logit
Variance to Mean Relation: Binomial
Correlation Structure: Exchangeable

Call:
gee(formula = y ~ xvec, id = id, data = CorBinRes$simdata, family = binomial("logit"),
corstr = "exchangeable")

Summary of Residuals:
Min 1Q Median 3Q Max
-0.4184397 -0.4184397 -0.3270440 0.5815603 0.6729560

Coefficients:
Estimate Naive S.E. Naive z Robust S.E. Robust z
(Intercept) -0.7215851 0.2145247 -3.363646 0.2303582 -3.132448
xvec 0.3924033 0.3048868 1.287046 0.3020483 1.299141

Estimated Scale Parameter: 1.006711
Number of Iterations: 1

Working Correlation
[,1] [,2] [,3]
[1,] 1.000000 0.299852 0.299852
[2,] 0.299852 1.000000 0.299852
[3,] 0.299852 0.299852 1.000000

may you share info about similar softwaer

Great package, thank you, may you share links to similar software to compare performance of your package with other packages
Even if another software is written in another computer language
Thanks a lot in advance

simple example for several variables with several values with correlation matrix

Anestis
great code thank
seems only you managed to have such a package for several last years
only
can you share example how to generate for example for 5 variables
when each variable has 3 or 7 values
and some how correlation ( dependency, similarity) between each value pairs are given
for example for 2 values for 3 variables
variable 1 : green 30%, red 70%
variable 2 : big 40%, small 60%
variable 3 : table 10%, car 90%

Corrections are:
green big - 0.3
green small - 0.1
green table - 0.2
green car - 0.8

red big - 0.7
red small - 0.6
red table - 0.5
red car - 0.2

big table - 0.3
big car - 0.2

small table - 0.3
small car - 0.2

it it correctly set problem for your package?

Thank you very much in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.