Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Conformability error after using -nldecompose- with survey data
From
Steve Samuels <[email protected]>
To
[email protected]
Subject
Re: st: Conformability error after using -nldecompose- with survey data
Date
Tue, 12 Nov 2013 09:46:39 -0500
To clarify: For things to work in this example, dim1 = 3 and e(b) should
have 3+1 = 4 columns, counting one for the constant. It has only
three.
This can happen if -logit- drops a collinear variable or one that predicts perfectly in one of the -by- groups. The dropped variable results in a discrepancy between the local `dim1' which counts the original independent variables, and the number of columns in e(b).
*****************************************
sysuse auto, clear
gen r78 = rep78>=3
gen high = turn >33
svyset _n
logit: high r78 mpg weight if foreign==0
set trace on
nldeompose, by(foreign):logit high r78 mpg weight
set trace off
**************************************************
Stev
On Nov 11, 2013, at 9:28 PM, Saidé Salazar wrote:
Thank you for the advice Sergiy. Below is the location of the error in
the trace.
Any help will be very appreciated!
------------------------------------------------------------------------------------------------------------------
end est ---
- mat `getbA' = e(b)
= mat __00000F = e(b)
- local dim1 = wordcount("`indvar'")
= local dim1 = wordcount("s_size_1 s_size_3 S_SECTOR_2 S_SECTOR_3
TL_TAM_LOC_2 TL_TAM_LOC_3")
- local dim2 = colsof(`getbA')
= local dim2 = colsof(__00000F)
- if ("`regcmd'"!="zip" & "`regcmd'"!="zinb" & "`regcmd'"!="ologit"
& "`regcmd'"!="oprobit") {
= if ("logit"!="zip" & "logit"!="zinb" & "logit"!="ologit" &
"logit"!="oprobit") {
- mat `betaA' = `getbA'[1,1..`dim1'+1]
= mat __00000G = __00000F[1,1..6+1]
conformability error
local k1 = `dim1'+1
}
------------------------------------------------------------------------------------------
end nldecompose.nld_decomposition ---
if "`bs_step'" == "" {
nld_setreturns
ereturn clear
sreturn clear
}
}
--------------------------------------------------------------------------------------------------------------
end nldecompose ---
r(503);
On Mon, Nov 11, 2013 at 6:23 PM, Sergiy Radyakin <[email protected]> wrote:
> Saide, insert
> set trace on
> before calling nldecompose... and show us what is the location of the
> error in the trace.
>
> In general no command (official or user written) should report this
> error. It is evidence of unforeseen situation, for example of rare
> combination of inputs. -nldecompose- is doing a lot of matrix
> operations, see source:
> http://www.stata-journal.com/software/sj8-4/st0152/nldecompose.ado
>
> Best, Sergiy
>
>
>
> On Mon, Nov 11, 2013 at 6:34 PM, Saidé Salazar <[email protected]> wrote:
>> Dear Statalist members
>>
>> I am using -nldecompose- after a logistic regression with survey data,
>> and I am getting a "conformability error". Can anyone help me to
>> understand why is this happening?
>>
>> Here is my command line:
>>
>> . nldecompose, by(country):svy: logit y x1 x2 x3 x4 x5 x6
>> conformability error
>> r(503);
>>
>> The -logit- runs okay without the -nldecompose- option.
>>
>> Thank you very much!
>>
>> Saide
>> *
>> * For searches and help try:
>> * http://www.stata.com/help.cgi?search
>> * http://www.stata.com/support/faqs/resources/statalist-faq/
>> * http://www.ats.ucla.edu/stat/stata/
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/