Cross Validated
2023-02-26 19:34 UTC
By KLee
AI-113-20230226-social-media-89ce55c1
Simulated data (with the outcome and predictors) from a GLM model
The goal of simulation is to produce a number of synthetic datasets, where the outcomes are a function of the known regression coefficients. I would like to know if my reasoning behind creating synthetic data is valid. The steps involved are: STEP 1: Based on the true (observed) data, fit GLM (e.g., gamma family). STEP 2: Make a synthetic predictors. STEP 3: Based on the output from STEP 2 and the fitted or predict function in R, obtain the expected outcome. STEP 4: Based on the expected outcome, get the estimated shape and scale parameters (based on E(X) and Var(X)). STEP 5: Obtain simulated outcome using the rgamma function in R. STEP 6: Combine the output from STEP 5 and the synthetic predictors from STEP 2 to obtain the full simulated data. In this manner, I am able to generate a synthetic dataset with the same dimension as the true (observed) dataset. However, I am wondering if this is a right way and if I can (or need to) remove STEP 4 - 6.
The goal of simulation is to produce a number of synthetic datasets, where the outcomes are a function of the known regression coefficients. I would like to know if my reasoning behind creating synthetic data is valid. The steps involved are: STEP 1: Based on the true (observed) data, fit GLM (e.g., gamma family). STEP 2: Make a synthetic predictors. STEP 3: Based on the output from STEP 2 and the fitted or predict function in R, obtain the expected outcome. STEP 4: Based on the expected outcome, get the estimated shape and scale parameters (based on E(X) and Var(X)). STEP 5: Obtain simulated outcome using the rgamma function in R. STEP 6: Combine the output from STEP 5 and the synthetic predictors from STEP 2 to obtain the full simulated data. In this manner, I am able to generate a synthetic dataset with the same dimension as the true (observed) dataset. However, I am wondering if this is a right way and if I can (or need to) remove STEP 4 - 6.
Full article content could not be extracted automatically. Read the original below.
Source:
Cross Validated
· stats.stackexchange.com