PROC IMPORT OUT= sasuser.publish_succession_to_farm
            DATAFILE= "C:\Users\fertig\Desktop\publish_succession_to_farm.csv" /*enter your own correct path here*/
            DBMS=CSV REPLACE;
     GETNAMES=YES;
     DATAROW=2;
RUN;

PROC IMPORT OUT= sasuser.publish_marriage
            DATAFILE= "C:\Users\fertig\Desktop\publish_marriage.csv" /*enter your own correct path here*/
            DBMS=CSV REPLACE;
     GETNAMES=YES;
     DATAROW=2;
RUN;

PROC IMPORT OUT= sasuser.publish_first_pregnancy
            DATAFILE= "C:\Users\fertig\Desktop\publish_first_pregnancy.csv" /*enter your own correct path here*/
            DBMS=CSV REPLACE;
     GETNAMES=YES;
     DATAROW=2;
RUN;



/* Table 8, column 1 */

PROC PHREG DATA=sasuser.publish_succession_to_farm;
MODEL duration * censored_observation(0) =
age1821 age2224 age2830 age3139
first_pregnancy
marriage
father_dead
mother_dead
parents_dead
siblings
rye_price
linen_price
/RIDGING=NONE TIES=EFRON ;
RUN;

/* Table 8, column 2 */

PROC PHREG DATA=sasuser.publish_marriage;
MODEL duration * censored_observation(0) =
age1821 age2224 age2830 age3139
first_pregnancy
father_dead
mother_dead
parents_dead
succeeded_to_farm
siblings
sibling_succeeded_to_farm
all_access_to_land
rye_price
linen_price
/RIDGING=NONE TIES=EFRON ;
RUN;

/* Table 8, column 3 */

PROC PHREG DATA=sasuser.publish_first_pregnancy;
MODEL duration * censored_observation(0) =
age1821 age2224 age2830 age3139
marriage
father_dead
mother_dead
parents_dead
succeeded_to_farm
siblings
sibling_succeeded_to_farm
all_access_to_land
rye_price
linen_price
/RIDGING=NONE TIES=EFRON ;
RUN;

/* Table 9, columns 1 to 4 */

PROC SORT DATA=sasuser.publish_marriage; BY from_owner_family female;
PROC PHREG DATA=sasuser.publish_marriage; BY from_owner_family female;
MODEL duration * censored_observation(0) =
age1821 age2224 age2830 age3139
first_pregnancy
father_dead
mother_dead
parents_dead
succeeded_to_farm
siblings
sibling_succeeded_to_farm
all_access_to_land
rye_price
linen_price
/RIDGING=NONE TIES=EFRON ;
RUN;

/* Table 9, column 5 */

PROC PHREG DATA=sasuser.publish_marriage; WHERE loehne;
MODEL duration * censored_observation(0) =
age1821 age2224 age2830 age3139
first_pregnancy
father_dead
mother_dead
parents_dead
succeeded_to_farm
siblings
sibling_succeeded_to_farm
all_access_to_land
rye_price
linen_price
/RIDGING=NONE TIES=EFRON ;
RUN;

/* Table 9, column 6 */

PROC PHREG DATA=sasuser.publish_marriage; WHERE oberkirchen;
MODEL duration * censored_observation(0) =
age1821 age2224 age2830 age3139
first_pregnancy
father_dead
mother_dead
parents_dead
succeeded_to_farm
siblings
sibling_succeeded_to_farm
all_access_to_land
rye_price
linen_price
/RIDGING=NONE TIES=EFRON ;
RUN;

/* Table 9, column 7 */

PROC PHREG DATA=sasuser.publish_marriage; WHERE borgeln;
MODEL duration * censored_observation(0) =
age1821 age2224 age2830 age3139
first_pregnancy
father_dead
mother_dead
parents_dead
succeeded_to_farm
siblings
sibling_succeeded_to_farm
all_access_to_land
rye_price
linen_price
/RIDGING=NONE TIES=EFRON ;
RUN;


