random experimental data with prespecified odds ratio and CI

#1
for experimental purposes I want to produce random data ( 4 variables each containig 120 data) with prespecified mean and SD and that will result prespecified odds ratio and CI after multivariate regression analysis
 

hlsmith

Not a robit
#3
But your outcome is binary, right? Continuous predictors resulting in a prespecified OR seems tricky. Are you just trying to simulate data from an existing study. Also, are you assuming independence between the predictors, null covariance?
 
#4
Yes outcome is binary , let say I have an outcome as death 0 or 1 ,lets say 20 of 100 predisposed person is death . independant predictors are height , weight and hemoglobin , After multivariate regresssion analysis , OR for weight 2.1(1.3-1.8), OR for height is 3.2 ( 2.2-12) and OR for hb 1.4 (1.2-1.8) . How can I find such 100 random numbers ( each should have a prespecified range hb values shoul be between 9.2 - 16 for example)
 

hlsmith

Not a robit
#5
Just for clarification, you are ignoring that weight is associated with height, and hb is associated with weight? Also, you understand this would represent cross-sectional data, so when is mortality status collected for subjects? Also given your above description, a 1 pound or kilogram increase in weight increases your relative odds of death by 2.1 times, correct?

This seems very difficult to do overall. And then you add the confidence intervals on the ORs, and it gets way more technical, that and the use of continuous variables.
 
#6
Dear hlsmith , I chose height weight and hb as example , I know there is multicollinarity, but it can be any three variable , I want it to give me prespecified odds after multivariate regression analysis, so I need random numbers , but it should be in a range, for example hb should be between 8- and 14 for example.
 
#7
Dear hlsmith , I want to produce arrtificial data that will give me the results that ı want as output from multivariate regression analysis
 

Dason

Ambassador to the humans
#10
If your goal is just to practice - why is your goal to create such a specific dataset where the data itself (not just the data generating process) meets very specific criteria? That kind of raises a few red flags to me.
 

Dason

Ambassador to the humans
#12
So if you could specify the 'true' underlying means, standard deviations, and odds ratios (which would in turn hopefully have the sample values be close to those) then that would be good enough?
 
#14
Practical way without coding - never seen an option with such specific criteria. Even with coding this would be a tricky ask.

There are likely infinite sets that could generate certain results given the rounding off of results. If you want to practice just simulate a very large set that has approximate parameters, then reproduce it again with a small sample (n=100). Given sampling variability the smaller sample with vary some, but may be something you can work with.

You would need to simulate the individual parameters then their relationship and incorporate a logit link.
 
#15
Practical way without coding - never seen an option with such specific criteria. Even with coding this would be a tricky ask.

There are likely infinite sets that could generate certain results given the rounding off of results. If you want to practice just simulate a very large set that has approximate parameters, then reproduce it again with a small sample (n=100). Given sampling variability the smaller sample with vary some, but may be something you can work with.

You would need to simulate the individual parameters then their relationship and incorporate a logit link.
 

ondansetron

TS Contributor
#18
Yes outcome is binary , let say I have an outcome as death 0 or 1 ,lets say 20 of 100 predisposed person is death . independant predictors are height , weight and hemoglobin , After multivariate regresssion analysis , OR for weight 2.1(1.3-1.8), OR for height is 3.2 ( 2.2-12) and OR for hb 1.4 (1.2-1.8) . How can I find such 100 random numbers ( each should have a prespecified range hb values shoul be between 9.2 - 16 for example)
If you want a multivariate regression, you need more outcomes since multivariate refers to at least 2 outcomes analyzed simultaneously. Perhaps you meant multivariable which refers to at least 2 predictors...?