Home » Data » Weighting data » Error occurred when svy executed logistic
Error occurred when svy executed logistic [message #6818] 
Mon, 20 July 2015 08:31 
Abisiku
Messages: 8 Registered: June 2014 Location: Lusaka

Member 


I was trying to run a logistic regression and got the following result.
xi: svy: logistic age_fmarcat i.highest_ed i.occupation i.religion i.wealth_index i.residence i.region i.ethnicity i.mass_med
i.highest_ed _Ihighest_e_02 (naturally coded; _Ihighest_e_0 omitted)
i.occupation _Ioccupatio_04 (naturally coded; _Ioccupatio_0 omitted)
i.religion _Ireligion_13 (naturally coded; _Ireligion_1 omitted)
i.wealth_index _Iwealth_in_13 (naturally coded; _Iwealth_in_1 omitted)
i.residence _Iresidence_12 (naturally coded; _Iresidence_1 omitted)
i.region _Iregion_110 (naturally coded; _Iregion_1 omitted)
i.ethnicity _Iethnicity_17 (naturally coded; _Iethnicity_1 omitted)
i.mass_med _Imass_med_01 (naturally coded; _Imass_med_0 omitted)
(running logistic on estimation sample)
an error occurred when svy executed logistic
r(2000);
end of dofile
r(2000);
Am kindly asking for help as I am failing to figure out what went wrong. Thanks.
ENSI



Re: Error occurred when svy executed logistic [message #6834 is a reply to message #6818] 
Mon, 20 July 2015 16:10 
ReducedFor(u)m
Messages: 292 Registered: March 2013

Senior Member 


This is really a question for the Stata forum (Statalist), but two quick possibilities:
1  from Nick Cox, Stata guru: "Nevertheless your problem is likely to be very simple. error 2000 here often means that you have one or more variables that should be numeric in string form. logit requires all of the variables fed to it to be numeric. Look carefully at the results of describe to see if any of the variables you use is actually string. If so, consider using destring or encode as appropriate to produce numeric variables."
http://stackoverflow.com/questions/20377682/logisticregress ioninstataerrorcode
2  what is the variable "age_fmarcat"? Does it only take on the values of 0 and 1? If it is a category with more variables, it cannot be the left hand side of a logistic regression.




Goto Forum:
Current Time: Tue May 30 21:25:29 Coordinated Universal Time 2023
