Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: Return r(111) this time


From   jjc.li@utoronto.ca
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: Return r(111) this time
Date   Mon, 16 Mar 2009 10:23:57 -0400

Hi Eva,

I did it again.


program nlsurwellbehav

        version 10.1

....................

matrix a = J(1,62,0)

gen copy_lnc = lnc

gen copy_sl = sl

gen copy_sm = sm

gen copy_sk = sk

set trace on


nlsurwellbehav copy_lnc copy_sl copy_sk copy_sm lnpl lnpk lnpm lnpe
lnq t d1 d2 d3 d4 d5 d6, at (a)

This time it goes to the end:


	begin nlsurwellbehav ---
-	version 10.1
-	syntax varlist(min=16 max=16) [if], at(name)
-	tokenize `varlist'
= tokenize copy_lnc copy_sl copy_sk copy_sm lnpl lnpk lnpm lnpe lnq t d1 d2 d3 d4 d5 d6
-	args lnc sl sk sm lnpl lnpk lnpm lnpe lnq t d1 d2 d3 d4 d5 d6
-	tempname al ak am ae
-	scalar `al'=`at'[1,1]
=	scalar __00001U=a[1,1]
-	scalar `ak'=`at'[1,2]
=	scalar __00001V=a[1,2]
-	scalar `am'=`at'[1,3]
=	scalar __00001W=a[1,3]
-	scalar `ae'=1-`al'-`ak'-`am'
=	scalar __00001X=1-__00001U-__00001V-__00001W
-	tempname aq aqq
-	scalar `aq'=`at'[1,4]
=	scalar __00001Y=a[1,4]
-	scalar `aqq'=`at'[1,5]
=	scalar __00001Z=a[1,5]
-	tempname blq bkq bmq beq
-	scalar `blq'=`at'[1,6]
=	scalar __000020=a[1,6]
-	scalar `bkq'=`at'[1,7]
=	scalar __000021=a[1,7]
-	scalar `bmq'=`at'[1,8]
=	scalar __000022=a[1,8]
-	scalar `beq'=-`blq'-`bkq'-`bmq'
=	scalar __000023=-__000020-__000021-__000022
-	tempname bqt bq1 bq2 bq3 bq4 bq5 bq6
-	scalar `bqt'=`at'[1,9]
=	scalar __000024=a[1,9]
-	scalar `bq1'=`at'[1,10]
=	scalar __000025=a[1,10]
-	scalar `bq2'=`at'[1,11]
=	scalar __000026=a[1,11]
-	scalar `bq3'=`at'[1,12]
=	scalar __000027=a[1,12]
-	scalar `bq4'=`at'[1,13]
=	scalar __000028=a[1,13]
-	scalar `bq5'=`at'[1,14]
=	scalar __000029=a[1,14]
-	scalar `bq6'=`at'[1,15]
=	scalar __00002A=a[1,15]
-	tempname ai aii blt bkt bmt bet
-	scalar `ai'=`at'[1,16]
=	scalar __00002B=a[1,16]
-	scalar `aii'=`at'[1,17]
=	scalar __00002C=a[1,17]
-	scalar `blt'=`at'[1,18]
=	scalar __00002D=a[1,18]
-	scalar `bkt'=`at'[1,19]
=	scalar __00002E=a[1,19]
-	scalar `bmt'=`at'[1,20]
=	scalar __00002F=a[1,20]
-	scalar `bet'=-`blt'-`bkt'-`bmt'
=	scalar __00002G=-__00002D-__00002E-__00002F
-	tempname ad1 ad2 ad3 ad4 ad5 ad6 bt1 bt2 bt3 bt4 bt5 bt6
-	scalar `ad1'=`at'[1,21]
=	scalar __00002H=a[1,21]
-	scalar `ad2'=`at'[1,22]
=	scalar __00002I=a[1,22]
-	scalar `ad3'=`at'[1,23]
=	scalar __00002J=a[1,23]
-	scalar `ad4'=`at'[1,24]
=	scalar __00002K=a[1,24]
-	scalar `ad5'=`at'[1,25]
=	scalar __00002L=a[1,25]
-	scalar `ad6'=`at'[1,26]
=	scalar __00002M=a[1,26]
-	scalar `bt1'=`at'[1,27]
=	scalar __00002N=a[1,27]
-	scalar `bt2'=`at'[1,28]
=	scalar __00002O=a[1,28]
-	scalar `bt3'=`at'[1,29]
=	scalar __00002P=a[1,29]
-	scalar `bt4'=`at'[1,30]
=	scalar __00002Q=a[1,30]
-	scalar `bt5'=`at'[1,31]
=	scalar __00002R=a[1,31]
-	scalar `bt6'=`at'[1,32]
=	scalar __00002S=a[1,32]
- tempname bl1 bl2 bl3 bl4 bl5 bl6 bk1 bk2 bk3 bk4 bk5 bk6 bm1 bm2 bm3 bm4 bm5 bm6 be1 be
	2 be3 be4 be5 be6
-	scalar `bl1'=`at'[1,33]
=	scalar __00002T=a[1,33]
-	scalar `bl2'=`at'[1,34]
=	scalar __00002U=a[1,34]
-	scalar `bl3'=`at'[1,35]
=	scalar __00002V=a[1,35]
-	scalar `bl4'=`at'[1,36]
=	scalar __00002W=a[1,36]
-	scalar `bl5'=`at'[1,37]
=	scalar __00002X=a[1,37]
-	scalar `bl6'=`at'[1,38]
=	scalar __00002Y=a[1,38]
-	scalar `bk1'=`at'[1,39]
=	scalar __00002Z=a[1,39]
-	scalar `bk2'=`at'[1,40]
=	scalar __000030=a[1,40]
-	scalar `bk3'=`at'[1,41]
=	scalar __000031=a[1,41]
-	scalar `bk4'=`at'[1,42]
=	scalar __000032=a[1,42]
-	scalar `bk5'=`at'[1,43]
=	scalar __000033=a[1,43]
-	scalar `bk6'=`at'[1,44]
=	scalar __000034=a[1,44]
-	scalar `bm1'=`at'[1,45]
=	scalar __000035=a[1,45]
-	scalar `bm2'=`at'[1,46]
=	scalar __000036=a[1,46]
-	scalar `bm3'=`at'[1,47]
=	scalar __000037=a[1,47]
-	scalar `bm4'=`at'[1,48]
=	scalar __000038=a[1,48]
-	scalar `bm5'=`at'[1,49]
=	scalar __000039=a[1,49]
-	scalar `bm6'=`at'[1,50]
=	scalar __00003A=a[1,50]
-	scalar `be1'=`at'[1,51]
=	scalar __00003B=a[1,51]
-	scalar `be2'=`at'[1,52]
=	scalar __00003C=a[1,52]
-	scalar `be3'=`at'[1,53]
=	scalar __00003D=a[1,53]
-	scalar `be4'=`at'[1,54]
=	scalar __00003E=a[1,54]
-	scalar `be5'=`at'[1,55]
=	scalar __00003F=a[1,55]
- scalar `be6'=-`bl1'-`bl2'-`bl3'-`bl4'-`bl5'-`bl6'-`bm1'-`bm2'-`bm3'-`bm4'-`bm5'-`bm6'-`
	bk1'-`bk2'-`bk3'-`bk4'-`bk5'-`bk6'-`be1'-`be2'-`be3'-`be4'-`be5'
= scalar __00003G=-__00002T-__00002U-__00002V-__00002W-__00002X-__00002Y-__000035-__00003
	6-__000037-__000038-__000039-__00003A-__00002Z-__000030-__000031-__000032-__000033-__00
	0034-__00003B-__00003C-__00003D-__00003E-__00003F
-	tempname dll dkl dkk dml dmk dmm a0
-	scalar `dll'=`at'[1,56]
=	scalar __00003H=a[1,56]
-	scalar `dkl'=`at'[1,57]
=	scalar __00003I=a[1,57]
-	scalar `dkk'=`at'[1,58]
=	scalar __00003J=a[1,58]
-	scalar `dml'=`at'[1,59]
=	scalar __00003K=a[1,59]
-	scalar `dmk'=`at'[1,60]
=	scalar __00003L=a[1,60]
-	scalar `dmm'=`at'[1,61]
=	scalar __00003M=a[1,61]
-	scalar `a0'=`at'[1,62]
=	scalar __00003N=a[1,62]
-	quietly {
- replace `lnc' =`a0'+`aq'*`lnq'+`al'*`lnpl'+`ak'*`lnpk'+`am'*`lnpm'+(1-`al'-`ak'-`am')*`
	lnpe'+`blq'*`lnpl'*`lnq'+`bkq'*`lnpk'*`lnq'+`bmq'*`lnpm'*`lnq'+(-`blq'-`bkq'-`bmq')*`ln
	pe'*`lnq'+`aqq'*0.5*`lnq'*`lnq'+`ai'*`t'+`aii'*0.5*`t'*`t'+`blt'*`lnpl'*`t'+`bkt'*`lnpk
	'*`t'+`bmt'*`lnpm'*`t'+(-`blt'-`bkt'-`bmt')*`lnpe'*`t'+`bqt'*`lnq'*`t'+`ad1'*`d1'+`ad2'
	*`d2'+`ad3'*`d3'+`ad4'*`d4'+`ad5'*`d5'+`ad6'*`d6'+`bl1'*`lnpl'*`d1'+`bl2'*`lnpl'*`d2'+`
	bl3'*`lnpl'*`d3'+`bl4'*`lnpl'*`d4'+`bl5'*`lnpl'*`d5'+`bl6'*`lnpl'*`d6'+`bk1'*`lnpk'*`d1
	'+`bk2'*`lnpk'*`d2'+`bk3'*`lnpk'*`d3'+`bk4'*`lnpk'*`d4'+`bk5'*`lnpk'*`d5'+`bk6'*`lnpk'*
	`d6'+`bm1'*`lnpm'*`d1'+`bm2'*`lnpm'*`d2'+`bm3'*`lnpm'*`d3'+`bm4'*`lnpm'*`d4'+`bm5'*`lnp
	m'*`d5'+`bm6'*`lnpm'*`d6'+`be1'*`lnpe'*`d1'+`be2'*`lnpe'*`d2'+`be3'*`lnpe'*`d3'+`be4'*`
	lnpe'*`d4'+`be5'*`lnpe'*`d5'+(-`bl1'-`bl2'-`bl3'-`bl4'-`bl5'-`bl6'-`bm1'-`bm2'-`bm3'-`b
	m4'-`bm5'-`bm6'-`bk1'-`bk2'-`bk3'-`bk4'-`bk5'-`bk6'-`be1'-`be2'-`be3'-`be4'-`be5')*`lnp
	e'*`d6'+`bq1'*`lnq'*`d1'+`bq2'*`lnq'*`d2'+`bq3'*`lnq'*`d3'+`bq4'*`lnq'*`d4'+`bq5'*`lnq'
	*`d5'+`bq6'*`lnq'*`d6'+`bt1'*`t'*`d1'+`bt2'*`t'*`d2'+`bt3'*`t'*`d3'+`bt4'*`t'*`d4'+`bt5
	'*`t'*`d5'+`bt6'*`t'*`d6'+(-`dll'*`dll'+`al'-`al'*`al')*0.5*`lnpl'*`lnpl'+(-`dll'*`dkl'
	-`al'*`ak')*`lnpl'*`lnpk'+(-`dll'*`dml'-`al'*`am')*`lnpl'*`lnpm'+(`dll'*`dll'-`al'+`al'
	*`al'+`dll'*`dkl'+`al'*`ak'+`dll'*`dml'+`al'*`am')*`lnpl'*`lnpe'+(-`dkl'*`dkl'-`dkk'*`d
	kk'+`ak'-`ak'*`ak')*0.5*`lnpk'*`lnpk'+(-`dkl'*`dml'-`dkk'*`dmk'-`ak'*`am')*`lnpk'*`lnpm
	'+(`dll'*`dkl'+`al'*`ak'+`dkl'*`dkl'+`dkk'*`dkk'-`ak'+`ak'*`ak'+`dkl'*`dml'+`dkk'*`dmk'
	+`ak'*`am')*`lnpk'*`lnpe'+(-`dml'*`dml'-`dmk'*`dmk'-`dmm'*`dmm'+`am'-`am'*`am')*0.5*`ln
	pm'*`lnpm'+(`dll'*`dml'+`al'*`am'+`dkl'*`dml'+`dkk'*`dmk'+`ak'*`am'+`dml'*`dml'+`dmk'*`
	dmk'+`dmm'*`dmm'-`am'+`am'*`am')*`lnpm'*`lnpe'+(-`dll'*`dll'+`al'-`al'*`al'-`dll'*`dkl'
	-`al'*`ak'-`dll'*`dml'-`al'*`am'-`dll'*`dml'-`al'*`am'-`dkl'*`dml'-`dkk'*`dmk'-`ak'*`am
	'-`dml'*`dml'-`dmk'*`dmk'-`dmm'*`dmm'+`am'-`am'*`am'-`dll'*`dkl'-`al'*`ak'-`dkl'*`dkl'-
	`dkk'*`dkk'+`ak'-`ak'*`ak'-`dkl'*`dml'-`dkk'*`dmk'-`ak'*`am')*0.5*`lnpe'*`lnpe'`if'
= replace copy_lnc =__00003N+__00001Y*lnq+__00001U*lnpl+__00001V*lnpk+__00001W*lnpm+(1-__
	00001U-__00001V-__00001W)*lnpe+__000020*lnpl*lnq+__000021*lnpk*lnq+__000022*lnpm*lnq+(-
	__000020-__000021-__000022)*lnpe*lnq+__00001Z*0.5*lnq*lnq+__00002B*t+__00002C*0.5*t*t+_
	_00002D*lnpl*t+__00002E*lnpk*t+__00002F*lnpm*t+(-__00002D-__00002E-__00002F)*lnpe*t+__0
	00024*lnq*t+__00002H*d1+__00002I*d2+__00002J*d3+__00002K*d4+__00002L*d5+__00002M*d6+__0
	0002T*lnpl*d1+__00002U*lnpl*d2+__00002V*lnpl*d3+__00002W*lnpl*d4+__00002X*lnpl*d5+__000
	02Y*lnpl*d6+__00002Z*lnpk*d1+__000030*lnpk*d2+__000031*lnpk*d3+__000032*lnpk*d4+__00003
	3*lnpk*d5+__000034*lnpk*d6+__000035*lnpm*d1+__000036*lnpm*d2+__000037*lnpm*d3+__000038*
	lnpm*d4+__000039*lnpm*d5+__00003A*lnpm*d6+__00003B*lnpe*d1+__00003C*lnpe*d2+__00003D*ln
	pe*d3+__00003E*lnpe*d4+__00003F*lnpe*d5+(-__00002T-__00002U-__00002V-__00002W-__00002X-
	__00002Y-__000035-__000036-__000037-__000038-__000039-__00003A-__00002Z-__000030-__0000
	31-__000032-__000033-__000034-__00003B-__00003C-__00003D-__00003E-__00003F)*lnpe*d6+__0
	00025*lnq*d1+__000026*lnq*d2+__000027*lnq*d3+__000028*lnq*d4+__000029*lnq*d5+__00002A*l
	nq*d6+__00002N*t*d1+__00002O*t*d2+__00002P*t*d3+__00002Q*t*d4+__00002R*t*d5+__00002S*t*
	d6+(-__00003H*__00003H+__00001U-__00001U*__00001U)*0.5*lnpl*lnpl+(-__00003H*__00003I-__
	00001U*__00001V)*lnpl*lnpk+(-__00003H*__00003K-__00001U*__00001W)*lnpl*lnpm+(__00003H*_
	_00003H-__00001U+__00001U*__00001U+__00003H*__00003I+__00001U*__00001V+__00003H*__00003
	K+__00001U*__00001W)*lnpl*lnpe+(-__00003I*__00003I-__00003J*__00003J+__00001V-__00001V*
	__00001V)*0.5*lnpk*lnpk+(-__00003I*__00003K-__00003J*__00003L-__00001V*__00001W)*lnpk*l
	npm+(__00003H*__00003I+__00001U*__00001V+__00003I*__00003I+__00003J*__00003J-__00001V+_
	_00001V*__00001V+__00003I*__00003K+__00003J*__00003L+__00001V*__00001W)*lnpk*lnpe+(-__0
	0003K*__00003K-__00003L*__00003L-__00003M*__00003M+__00001W-__00001W*__00001W)*0.5*lnpm
	*lnpm+(__00003H*__00003K+__00001U*__00001W+__00003I*__00003K+__00003J*__00003L+__00001V
	*__00001W+__00003K*__00003K+__00003L*__00003L+__00003M*__00003M-__00001W+__00001W*__000
	01W)*lnpm*lnpe+(-__00003H*__00003H+__00001U-__00001U*__00001U-__00003H*__00003I-__00001
	U*__00001V-__00003H*__00003K-__00001U*__00001W-__00003H*__00003K-__00001U*__00001W-__00
	003I*__00003K-__00003J*__00003L-__00001V*__00001W-__00003K*__00003K-__00003L*__00003L-_
	_00003M*__00003M+__00001W-__00001W*__00001W-__00003H*__00003I-__00001U*__00001V-__00003
	I*__00003I-__00003J*__00003J+__00001V-__00001V*__00001V-__00003I*__00003K-__00003J*__00
	003L-__00001V*__00001W)*0.5*lnpe*lnpe
- replace `sl' = `al'+`blq'*`lnq'+(-`dll'+`al'-`al'*`al')*`lnpl'+(-`dll'*`dkl'-`al'*`ak')
	*`lnpk'+(-`dll'*`dml'-`al'*`am')*`lnpm'+(`dll'-`al'+`al'*`al'+`dll'*`dkl'+`al'*`ak'+`dl
	l'*`dml'+`al'*`am')*`lnpe'+`blt'*`t'+`bl1'*`d1'+`bl2'*`d2'+`bl3'*`d3'+`bl4'*`d4'+`bl5'*
	`d5'+`bl6'*`d6'`if'
= replace copy_sl = __00001U+__000020*lnq+(-__00003H+__00001U-__00001U*__00001U)*lnpl+(-_
	_00003H*__00003I-__00001U*__00001V)*lnpk+(-__00003H*__00003K-__00001U*__00001W)*lnpm+(_
	_00003H-__00001U+__00001U*__00001U+__00003H*__00003I+__00001U*__00001V+__00003H*__00003
	K+__00001U*__00001W)*lnpe+__00002D*t+__00002T*d1+__00002U*d2+__00002V*d3+__00002W*d4+__
	00002X*d5+__00002Y*d6
- replace `sk' = `ak'+`bkq'*`lnq'+(-`dll'*`dkl'-`al'*`ak')*`lnpl'+(-`dkl'*`dkl'-`dkk'*`dk
	k'+`ak'-`ak'*`ak')*`lnpk'+(-`dkl'*`dml'-`dkk'*`dmk'-`ak'*`am')*`lnpm'+(`dll'*`dkl'+`al'
	*`ak'+`dkl'*`dkl'+`dkk'*`dkk'-`ak'+`ak'*`ak'+`dkl'*`dml'+`dkk'*`dmk'+`ak'*`am')*`lnpe'+
	`bkt'*`t'+`bk1'*`d1'+`bk2'*`d2'+`bk3'*`d3'+`bk4'*`d4'+`bk5'*`d5'+`bk6'*`d6'`if'
= replace copy_sk = __00001V+__000021*lnq+(-__00003H*__00003I-__00001U*__00001V)*lnpl+(-_
	_00003I*__00003I-__00003J*__00003J+__00001V-__00001V*__00001V)*lnpk+(-__00003I*__00003K
	-__00003J*__00003L-__00001V*__00001W)*lnpm+(__00003H*__00003I+__00001U*__00001V+__00003
	I*__00003I+__00003J*__00003J-__00001V+__00001V*__00001V+__00003I*__00003K+__00003J*__00
	003L+__00001V*__00001W)*lnpe+__00002E*t+__00002Z*d1+__000030*d2+__000031*d3+__000032*d4
	+__000033*d5+__000034*d6
- replace `sm' = `am'+`bmq'*`lnq'+(-`dll'*`dml'-`al'*`am')*`lnpl'+(-`dkl'*`dml'-`dkk'*`dm
	k'-`ak'*`am')*`lnpk'+(-`dml'*`dml'-`dmk'*`dmk'-`dmm'*`dmm'+`am'-`am'*`am')*`lnpm'+(`dll
	'*`dml'+`al'*`am'+`dkl'*`dml'+`dkk'*`dmk'+`ak'*`am'+`dml'*`dml'+`dmk'*`dmk'+`dmm'*`dmm'
	-`am'+`am'*`am')*`lnpe'+`bmt'*`t'+`bm1'*`d1'+`bm2'*`d2'+`bm3'*`d3'+`bm4'*`d4'+`bm5'*`d5
	'+`bm6'*`d6'`if'
= replace copy_sm = __00001W+__000022*lnq+(-__00003H*__00003K-__00001U*__00001W)*lnpl+(-_
	_00003I*__00003K-__00003J*__00003L-__00001V*__00001W)*lnpk+(-__00003K*__00003K-__00003L
	*__00003L-__00003M*__00003M+__00001W-__00001W*__00001W)*lnpm+(__00003H*__00003K+__00001
	U*__00001W+__00003I*__00003K+__00003J*__00003L+__00001V*__00001W+__00003K*__00003K+__00
	003L*__00003L+__00003M*__00003M-__00001W+__00001W*__00001W)*lnpe+__00002F*t+__000035*d1
	+__000036*d2+__000037*d3+__000038*d4+__000039*d5+__00003A*d6
-	}
	end nlsurwellbehav ---

.

Jingjing






Quoting Eva Poen <eva.poen@gmail.com>:

Almost there. Lose the quotes, and call your program directly.


nlsurwellbehav copy_lnc copy_sl copy_sk copy_sm lnpl lnpk lnpm lnpe
lnq t d1 d2 d3 d4 d5 d6, at (a)

Eva

2009/3/15  <jjc.li@utoronto.ca>:
Thank you Eva for not giving me up. I typed


matrix a = J(1,62,0)

gen copy_lnc = lnc

gen copy_sl = sl

gen copy_sm = sm

gen copy_se = se

set trace on

nlsur wellbehav "copy_lnc copy_sl copy_sk copy_sm' "lnpl lnpk lnpm lnpe lnq
t d1 d2 d3 d4 d5 d6", at (a)

Is it right? Here's the return:

 ------------------------------------------------------------- end
_on_colon_parse ---
 - local ZERO `"`s(before)'"'
 = local ZERO `"nlsur, jkopts(eclass) noeqlist"'
 - local 0 `"`s(after)'"'
 = local 0 `" wellbehav "copy_lnc copy_sl copy_sk copy_sm' "lnpl lnpk lnpm
lnpe lnq t d1

 d2 d3 d4 d5 d6", at (a)"'

 - quietly syntax [anything(equalok)] [if] [in] [fw aw pw iw] [, VCE(string
asis) VCE1(s

tring asis) * ]

invalid something: quotes do not match

 ----------------------------------------------------------------- end
_vce_parserun ---
---------------------------------------------------------------------------
end nlsur ---
r(198);




Quoting Eva Poen <eva.poen@gmail.com>:

Jingjing,

As Nick pointed out, you know the names of your own variables. We
don't. So, when I said "right hand side variables" I meant the list of
right hand side variables in your equations, in the order that your
program needs them. Your program reads something like

args lnc sl sk sm lnpl lnpk lnpm lnpe lnq t d1 d2 d3 d4 d5 d6

, and only you know what these names stand for. All we know is that
the first four are left hand side variables, and the rest are right
hand side variables in your equations.

So, besides

matrix a = J(1,62,0)

you need to create copies of your left hand side variables, which  you can
do by

gen copy_var1 = var1

assuming that var1 is the name of your variable. Do this for all your
left hand side variables, and then call your program with the list of
all 16 variables that you need for your equations, in the order

lnc sl sk sm lnpl lnpk lnpm lnpe lnq t d1 d2 d3 d4 d5 d6

because this is what your program asks for. Just make sure that,
instead of providing the names of your left hand side variables, you
provide the names of their _copies_.  -set trace on- and see what
happens.


As a general remark, you might find it useful to attend a NetCourse by
Statacorp, especially NC151.


Eva



2009/3/15  <jjc.li@utoronto.ca>:

Sorry but could you take a example?



Quoting Nick Cox <n.j.cox@durham.ac.uk>:

Eva's text was not meant to be taken literally!

Your own syntax commits you to supplying 16 variable names and the  name
of a matrix in an option.

Nick
n.j.cox@durham.ac.uk

jjc.li@utoronto.ca

Here's the return:


. matrix a = J(1,62,0)

. set trace on

.
. nlsurwellbehav "copies of dep. variables" "right hand side
variables" , at(a)
---------------------------------------------------------------- begin
nlsurwellbehav ---
- version 10.1
- syntax varlist(min=16 max=16) [if], at(name)
time-series operators not allowed
------------------------------------------------------------------ end
nlsurwellbehav ---
r(101);

Quoting Eva Poen <eva.poen@gmail.com>:

I'm not sure I understand you here. Are you referring to the line

replace `lnc' = 5+`aq'*`lnq' ...

where there is a hard coded 5 (not a starting value! This is a set
value.), and did you replace this value of 5 by another parameter,
e.g. `a0'? In terms of the program, that is not a problem as long as
you adjust your code. It would be easiest if you put this parameter
last, since this saves you the pain of changing all your `at'[1,x]
statements to `at'[1,x+1]. Therefore, my suggestion would be to code

      scalar `dmm'=`at'[1,61]
      tempname a0
      scalar `a0'    =`at'[1,62]


      quietly {
         replace `lnc' = `a0'+ ....
      }

Now, for the debugging, just follow my suggestions earlier, and invoke
your program directly. You need to create a matrix of initial values,
e.g. zeros for all coefficients. If you have 62 parameters, you do

matrix a = J(1,62,0)

which gives you a row vector of 62 zeros. Next create copies of all
your dependent variables, and invoke your program:

set trace on
nlsurwellbehav "copies of dep. variables" "right hand side  variables"
,
at(a)

and see where the problem lies.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index