startvec0              package:mixstock              R Documentation

_P_r_o_d_u_c_e (_r_a_w) _s_t_a_r_t_i_n_g _v_e_c_t_o_r _o_f _p_a_r_a_m_e_t_e_r_s _f_o_r _m_i_x_e_d _s_t_o_c_k _a_n_a_l_y_s_i_s

_D_e_s_c_r_i_p_t_i_o_n:

     Provides raw (untransformed) starting vector of source
     contribution parameters for mixed stock analysis.

_U_s_a_g_e:

     startvec0(sourcesamp, mixsamp=NULL, type="equal", sd=1, lmin=0.001)
     startvec(sourcesamp, mixsamp=NULL, type="equal", 
              marktype="sample",a=1,cond=FALSE,transf="full",
     fuzz=0,sd=1)
     lsolve(n, s, tol = 1e-05, warn = FALSE)

_A_r_g_u_m_e_n_t_s:

sourcesamp: Marker frequencies in sources, or a list with source and
          mixed samples, or a 'turtle.data' object.

 mixsamp: Marker frequencies in mixed stock

    type: Various options for setting starting contributions. 'equal':
          equal contributions from all sources. 'random': random
          multinomial sample with equal multinomial probabilities.
          'rand2': random sample from transformed normal variates with
          mean 0 and standard deviation 'sd'. A number 'n' between 1
          and the number of sources inclusive gives a starting
          condition with 95% of the contribution from source 'n' and
          the other 5% evenly split between the other sources.  The
          default is to attempt a solution of the linear equation
          ('sourcesamp*f=mixsamp') and use these values as the starting
          contributions.

      sd: standard deviations for starting type 'rand2'

    lmin: When doing linear solutions, the boundary values are {'lmin',
          '1-lmin'.

marktype: method for starting marker frequencies: 'sample' uses the
          observed sample probabilities; 'random' used observed sample
          probabilities; 'weighted' does a Bayes-weighted start (a la
          Masuda and Pella)

    cond: Conditional likelihood?  (i.e. 'cond=TRUE' gives just the
          parameters for source contributions, not parameters for
          source marker frequencies)

       a: prior strength parameter

  transf: transform ("full","part", or "none")

    fuzz: fuzz parameter for moving parameters away from the boundary

       n: source samples (HxR matrix)

       s: mixed stock samples (vector)

     tol: tolerance for linear fit

    warn: warn if numeric problems with solution

_V_a_l_u_e:

     A parameter vector of the contributions from each of the sources:
     just the raw source contributions in the case of 'startvec0', or
     source contributions and possibly marker frequencies (transformed
     or untransformed) in the case of 'startvec'.

_N_o_t_e:

     'lsolve' attempts to get a starting value by solving the linear
     equation ('solve(n,s,tol=tol)')

_A_u_t_h_o_r(_s):

     Ben Bolker

_E_x_a_m_p_l_e_s:

      data(simex)
      startvec0(simex)
      startvec(simex,transf="part")
      startvec(simex)

