Library: | stats |
See also: | linregbs linregfs2 linregstep |
Quantlet: | linregopt | |
Description: | sets optional parameters for linregbs, linregfs2 and linregstep. |
Usage: | opt = linregopt (s1 {, s2{, s3, ... {,s10} }}) | |
Input: | ||
s1, s3, s5, s7, s9 | strings containing keywords, e.g. "mode", "Fin", "Fout" (see Notes for further explanations) | |
s4, s2, s6, s8, s10 | numerical values corresponding to the preceding keyword | |
Output: | ||
opt | list of optional parameters |
The following string values can be used:
"mode" set "mode" = 1 if you want to choose the parameters interactively
"Fin" minimally accepted value to enter into the model (F-to-enter), has to be > "Fout"
"Fout" maximimally accepted value to remove from the model (F-to-remove ), has to be < "Fin"
"entry" significance level alpha for entry (probability of F-to-enter), has to be < "out"
"out" significance level alpha for removal (probability of F-to-remove), has to be > "entry"
;loads the libraries stats library("stats") ; load the boston housing data x = read("bostonh") y = x[,14] x = x[,1:13] ;choose name for independent variables colname=string("X %2.0f",1:rows(x)) ; generate some optional parameters opt = linregopt("Fin", 4.0, "Fout", 3.9) ; set F values {b,bse,bstan,bpval}=linregstep(x,y,colname,opt)
produces optional parameters and uses them in linregstep