Hello everyone,
I would like to ask you for help regarding a typology for parenting styles with the replace command.
I want to differentiate between four styles via the combination of four variables and the replace command.
However, the replace code doesn't work the error says "invalid replace".
This my code:
gen erziehungsstile = 1
replace erziehungsstile = 2 if warmth_pacs<3.66 | negcomm_pacs>3 ///
| inconsist_pacs<2.75 ///
| monitor_pacs>3.5 ///
replace erziehungsstile = 3 if warmth_pacs<3.66 | negcomm_pacs>3 ///
| inconsist_pacs<2.75 ///
| monitor_pacs<3.5 ///
replace erziehungsstile = 4 if warmth_pacs>3.66 | negcomm_pacs<3 ///
| inconsist_pacs>2.75 ///
| monitor_pacs<3.5
Do you have any ideas what could be an alternative to combine these four variables into one?
Thanks in advance!
I would like to ask you for help regarding a typology for parenting styles with the replace command.
I want to differentiate between four styles via the combination of four variables and the replace command.
However, the replace code doesn't work the error says "invalid replace".
This my code:
gen erziehungsstile = 1
replace erziehungsstile = 2 if warmth_pacs<3.66 | negcomm_pacs>3 ///
| inconsist_pacs<2.75 ///
| monitor_pacs>3.5 ///
replace erziehungsstile = 3 if warmth_pacs<3.66 | negcomm_pacs>3 ///
| inconsist_pacs<2.75 ///
| monitor_pacs<3.5 ///
replace erziehungsstile = 4 if warmth_pacs>3.66 | negcomm_pacs<3 ///
| inconsist_pacs>2.75 ///
| monitor_pacs<3.5
Do you have any ideas what could be an alternative to combine these four variables into one?
Thanks in advance!
Comment