Hello all!
I am working with two independent datasets, (1) a nationally-representative psychiatric epidemiological survey, and (2) ten years of the National Survey on Drug Use and Health, to examine clinical correlates of firearm access for my dissertation. One of my goals is to extrapolate firearm access from dataset 1 (which has the depvar "guns") to dataset 2 (which does not). I have not had any problems creating a prediction model in dataset 1 and applying the resulting predicted probabilities (pps) to dataset 2 using frames like so:
However, I have run into a problem with the output from my sensitivity analyses. Specifically, I conducted lasso logit, followed by calibration and discrimination analyses. I used cvauroc to conduct the discrimination analysis and get adjusted pps (automatically generated in a variable called _fit). Here is where I'm getting stuck. I don't know how to apply these adjusted pps to my second dataset. Usually, I would generate coefficient and standard error variables for my model variables and use those to generate my dependent variable in the new dataset, like so:
But I don't know how to adjust the coefficient and standard error values to match the cross validation results used by cvauroc to generate those adjusted pps. Is there a way for me to accomplish this?
Thanks so much for the help!
~ Miranda Baumann
I am working with two independent datasets, (1) a nationally-representative psychiatric epidemiological survey, and (2) ten years of the National Survey on Drug Use and Health, to examine clinical correlates of firearm access for my dissertation. One of my goals is to extrapolate firearm access from dataset 1 (which has the depvar "guns") to dataset 2 (which does not). I have not had any problems creating a prediction model in dataset 1 and applying the resulting predicted probabilities (pps) to dataset 2 using frames like so:
Code:
// Create frames frame create ds1 frame ds1: use ds1 frame create ds12 frame ds2: use ds2 // Run prediction model frame change ds1 svy: logistic guns <indvars> <ctrlvars> // Apply prediction model to ds2 frame change ds2 predict pp, pr
However, I have run into a problem with the output from my sensitivity analyses. Specifically, I conducted lasso logit, followed by calibration and discrimination analyses. I used cvauroc to conduct the discrimination analysis and get adjusted pps (automatically generated in a variable called _fit). Here is where I'm getting stuck. I don't know how to apply these adjusted pps to my second dataset. Usually, I would generate coefficient and standard error variables for my model variables and use those to generate my dependent variable in the new dataset, like so:
Code:
gen coefv1 = _b[v1]
gen sev1 = _se[v1]
.
.
.
gen coefvn = _b[vn]
gen sev1 = _se[vn]
// Generate dependent variable
gen guns = 1 + coefv1 + sev1 +...+ coefvn + sevn
Thanks so much for the help!
~ Miranda Baumann

Comment